Skip to content

getUI5NodeFromXMLElementNamespace utility may return a too wide "namespace" type #262

Open
@bd82

Description

@bd82

The namespace property returned is a BaseUI5Node, Should it be a plain UI5Namespace instead?

  • /**
    * Return the UI5 Namespace from the specified or default XML Element namespace
    *
    * @param xmlElement
    * @param model
    */
    export function getUI5NodeFromXMLElementNamespace(
    xmlElement: XMLElement,
    model: UI5SemanticModel
    ): {
    namespace: BaseUI5Node | undefined;
    isDefault: boolean;
    isXmlnsDefined: boolean;
    };

This is due to some possible edge cases that existed or may exist in the UI5 SDK.

  • Some namespaces were mistakenly defined as an enum.
  • In theory a UI5 Class may appear as a member of another UI5 Class (although no relevant instance is known).

Such a change may affect the behavior of some features, for example:

  • Unknown namespace error in XMLView, how to treat a completely unknown namespace (foo.bar.x) versus a partially known but invalid namespace (sap.ui.core.x).

Relevant draft PR:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions