Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bd82 opened this issue Jul 28, 2020 · 0 comments

Comments

@bd82
Copy link
Member

bd82 commented Jul 28, 2020

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant