Skip to content

VSCODE / BAS Feature requests that would really help  #82

@erlethor

Description

@erlethor

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)

  1. 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.

  2. 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" />

  3. 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'}"
  1. 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() in sap/fe/core/helpers/StableIdHelper.js as defined
    in the template: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

  1. UI5 Binding for properties, aggregations or context binding, e.g.
    {path: 'entitySet>$Type', formatter: 'FIELD.getBindingForDraftAdminBlockInline'}
  2. 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

  1. UI5 Binding
  2. UI5 Expression Bindings

Thanks,
Thorsten

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions