ui5-language-assistant icon indicating copy to clipboard operation
ui5-language-assistant copied to clipboard

getUI5NodeFromXMLElementNamespace utility may return a too wide "namespace" type

Open bd82 opened this issue 3 years ago • 0 comments

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

  • https://github.com/SAP/ui5-language-assistant/blob/f2d29237e633cf30454f7ecba03fed1e940e999f/packages/logic-utils/api.d.ts#L152-L165

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:

  • https://github.com/SAP/ui5-language-assistant/pull/144

bd82 avatar Jul 28 '20 12:07 bd82