-
Notifications
You must be signed in to change notification settings - Fork 26
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
VSCODE / BAS Feature requests that would really help #82
Comments
Thanks for the feedback @erlethor 👍
This seems very useful, it is also fairly complex as we currently do not yet any representation of the user's workspace in the extension, also some of this representation would require parsing JavaScript files while we (currently) only "understand" UI5 api.json files. I am not saying this cannot be done, just noting the technical gaps.
Similar to above the suggestions here seem to require expending the model we are working on, basically what we know of the user's workspace (custom libraries / JS files / other...).
The first step to adding any feature on for the "binding expressions" would be to parse these expressions. For XML we build our own parser which has advanced features to support editor scenarios, e.g error recovery:
Questions;
|
Thank you @bd82 The UI5 documentation is the only reference I know about bindings:
About the contribution. Although it would be very interesting I am afraid I won't find the time to actively contribute here. |
BindingParser: https://github.com/SAP/openui5/blob/master/src/sap.ui.core/src/sap/ui/base/BindingParser.js Can this somehow be ported to the language assistant? With some guidance I might try this myself @bd82 |
Hello @mschleeweiss It will likely be require more than a porting of said parser. However, in general a parser meant to enable language service capabilities if often more complex than one
Basically if you want to implement advance capabilities such as content assist, tooltips, advanced highlights I don't know which of these capabilities the existing |
As this issue contains multiple feature requests, we should have smaller ones for each individual enhancement and link them to this one.
|
|
|
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 theeditor.
<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 thesapui5 documentation if not.
.
) or static function defined bytemplate:require / core:require.
E.g.
idPrefix="{= ID.generate([${this>id}, 'FilterFieldValueHelp']) }"
should allow navigationto the function definition of generate() in
sap/fe/core/helpers/StableIdHelper.js
as definedin the
template:require
above. This should work no matter if it is about formatter, expressionbinding 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 fragments2.
template:require: '
would give a list of classes defined locally or in ui5. Ideally path segmentwise (first suggest of sap/, then sap/{second segement} and so on
3. For event handlers, formatters and expression binding: Starting with the
.
would suggestfunctions from the controller. If it starts with a word defined in
template:require
orcore:require
it would suggest functions from that javascript file.Syntax validation
A minimal syntax check for the following notations would help
{path: 'entitySet>$Type', formatter: 'FIELD.getBindingForDraftAdminBlockInline'}
visible="{= !${IsActiveEntity} || ${HasDraftEntity}}"
In the example 1. above, in case
FIELD
is not defined in eithertemplate:require
or core:require` it should be marked as an error.Parenthesis / Brackets / Curly Braces highlighting for
Thanks,
Thorsten
The text was updated successfully, but these errors were encountered: