-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hi Colleagues,
Working for years with UI5 XML Views in the Fiori Elements library I would like to share my ideas about what would really be helpful in a UI5 XMLView assistant.
Navigation / go to definition (most helpful)
-
In general: Any of the targets (js code, fragments) may be in the local repository (app as well
as library repo), in a different cloned repository on the local machine, or is only in the "remote"
ui5 distribution. It would be very helpful that the navigation would always try to find a local
version and if not available locally go to the sapui5 documentation instead. -
Fragments. Ctrl/Cmd Click on a
fragmentName
reference should open the fragment in the
editor.
<core:Fragment fragmentName="sap.fe.templates.ObjectPage.view.fragments.HeaderImage" type="XML" />
-
template:require
/core:require
should open the corresponding file if locally available or the
sapui5 documentation if not.
template:require="{
macroLibrary: 'sap/fe/macros/macroLibrary',
CORE: 'sap/fe/core/AnnotationHelper',
MODEL: 'sap/ui/model/odata/v4/AnnotationHelper',
ID: 'sap/fe/core/helpers/StableIdHelper'
}"
core:require="{FilterBarRuntime: 'sap/fe/macros/FilterBarRuntime'}"
- Navigate to controller (if it function starts with
.
) or static function defined by
template:require / core:require.
E.g.idPrefix="{= ID.generate([${this>id}, 'FilterFieldValueHelp']) }"
should allow navigation
to the function definition of generate() insap/fe/core/helpers/StableIdHelper.js
as defined
in thetemplate:require
above. This should work no matter if it is about formatter, expression
binding or event handler.
Type ahead / suggest (awesome)
It would be very helpful if auto suggest would work when typing all of the navigation examples.
1.<core:Fragment fragmentName="
would give a list of locally available fragments
2. template:require: '
would give a list of classes defined locally or in ui5. Ideally path segment
wise (first suggest of sap/, then sap/{second segement} and so on
3. For event handlers, formatters and expression binding: Starting with the .
would suggest
functions from the controller. If it starts with a word defined in template:require
or
core:require
it would suggest functions from that javascript file.
Syntax validation
A minimal syntax check for the following notations would help
- UI5 Binding for properties, aggregations or context binding, e.g.
{path: 'entitySet>$Type', formatter: 'FIELD.getBindingForDraftAdminBlockInline'}
- UI5 Expression Binding
visible="{= !${IsActiveEntity} || ${HasDraftEntity}}"
In the example 1. above, in case FIELD
is not defined in either template:require
or core:require` it should be marked as an error.
Parenthesis / Brackets / Curly Braces highlighting for
- UI5 Binding
- UI5 Expression Bindings
Thanks,
Thorsten