This VS Code extension provides SAPUI5 language editor support.
The tool provides the following support:
-
Relevant filters to suggestions. For example:
- Only classes that match the parent aggregation's type are offered.
- In a "full" aggregation with cardinality
0..1
, no more suggestions are made. - Only classes inside the
xmlns
prefix used are offered. - Deprecated and experimental SAPUI5 nodes are not be offered by default (configurable).
-
Additional text for ease of use. For example:
- Auto-insertion of name for closing tags for classes and aggregations.
- Auto-insertion of
=""
for attribute key suggestions. - Auto-insertion of the
xmlns
prefix for classes and aggregation tags.
-
Tooltips displayed while browsing the suggestions including a clickable link to the SAPUI5 SDK (Demo Kit).
The feature is available in the following:
-
XML tags:
- Classes
- Aggregations
-
XML attribute keys:
- Properties
- Events
- Associations
- Namespace prefixes
-
XML attribute values:
- Enum values
- Boolean values
- Namespaces fully qualified names
The list of validations and their severity are currently hard-coded and cannot be configured by the end user.
-
Errors:
- Invalid boolean values
- Unknown attribute keys
- Unknown
eum
values - Unknown
xmlns
namespace - Unknown tag names
- Duplicate ID tags
- Wrong cardinality of aggregation
- Wrong type of tags inside aggregations
- Missing or empty ID when
flexEnabled
is true (stableID)
-
Warnings:
- Use of deprecated classes
- Use of deprecated aggregations
- Use of deprecated properties
- Use of deprecated events
- Use of deprecated associations
Quick Fix will be shown for some validations when hovering over a diagnostic or from the problems view.
- Missing or empty ID when
flexEnabled
is true (stableID).- Will add a generated ID.
- Supports both fixing a single missing ID or all missing IDs in an entire file.
Tooltips will be shown when hovering over an item.
The feature is available in the following:
-
XML tags:
- Classes
- Aggregations
-
XML attribute keys:
- Properties
- Events
- Associations
- Aggregations
-
XML attribute values:
- Enum values
- SAPUI5 Namespaces
Implemented using the UI5 manifest.json schema.
In the UI5 Language Assistant VS Code marketplace page, click Install.
- Go to GitHub Releases.
- Search for the
.vsix
archive underui5-language-assist\@x.y.z
releases. (Replacex.y.z
with the desired version number.) - Follow the instructions for installing an extension from a
.vsix
file in the VSCode's guide.
This extension's features are automatically enabled when opening/editing relevant SAPUI5 source files.
For SAPUI5 XML views, this means:*.view.xml
or *.fragment.xml
files.
Note that the extension lazily downloads the SAPUI5 metadata needed for its features. This means that there may be a delay between starting VS Code and having the relevant features available.
This extension currently uses a hard-coded (1.71.x) version for the SAPUI5 metadata.
This extension does not currently support custom controls, some features, such as validations, may use heuristics to guess that a tag is a custom control. However, no auto-complete is currently offered for custom controls.
You can open issues on GitHub.
See CONTRIBUTING.md.