Skip to content
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

Support EvaluatableExpressions #10027

Closed
Tracked by #9863
tsmaeder opened this issue Sep 1, 2021 · 6 comments · Fixed by #11484
Closed
Tracked by #9863

Support EvaluatableExpressions #10027

tsmaeder opened this issue Sep 1, 2021 · 6 comments · Fixed by #11484
Labels
debug issues that related to debug functionality vscode issues related to VSCode compatibility

Comments

@tsmaeder
Copy link
Contributor

tsmaeder commented Sep 1, 2021

Feature Description:

Implement support for plugins providing evalutable epressions. see https://code.visualstudio.com/api/references/vscode-api#EvaluatableExpression

Currently, the the debugger scans the current line to guess what expressions to evaluate and show in the hover widget. Instead, the debuggers should forward that work to plugins. It may be necessary to keep the current logic as a fallback when no expressions are provided for a particular location.

@tsmaeder tsmaeder added vscode issues related to VSCode compatibility debug issues that related to debug functionality labels Sep 1, 2021
@ndoschek
Copy link
Contributor

I will pick up this issue

ndoschek added a commit to eclipsesource/theia that referenced this issue Mar 31, 2022
- Implement support for plugins providing evalutable epressions

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>

Fixes eclipse-theia#10027
ndoschek added a commit to eclipsesource/theia that referenced this issue Mar 31, 2022
- Implement support for plugins providing evalutable epressions

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>

Fixes eclipse-theia#10027
@alvsan09
Copy link
Contributor

Hi @ndoschek,
I am wondering what the status of your current commit is?
Are you planning to continue with it?

@ndoschek
Copy link
Contributor

Hi @alvsan09!
Sorry I was a bit delayed, but I'm planning to complete it this month.

ndoschek added a commit to eclipsesource/vscode that referenced this issue Jun 30, 2022
Add types to monaco.languages for 
- EvaluatableExpression feature microsoft#10027 (registerEvaluatableExpressionProvider, EvaluatableExpression, EvaluatableExpressionProvider)
- InlineValue feature microsoft#10028 (registerInlineValuesProvider, InlineValue, InlineValueContext, InlineValueExpression, InlineValuesProvider, InlineValueText, InlineValueVariableLookup)

Part of eclipse-theia/theia#10027 and eclipse-theia/theia#10028

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>
ndoschek added a commit to eclipsesource/vscode that referenced this issue Jun 30, 2022
Add types to monaco.languages for 
- EvaluatableExpression feature (registerEvaluatableExpressionProvider, EvaluatableExpression, EvaluatableExpressionProvider)
- InlineValue feature (registerInlineValuesProvider, InlineValue, InlineValueContext, InlineValueExpression, InlineValuesProvider, InlineValueText, InlineValueVariableLookup)

Part of eclipse-theia/theia#10027 and eclipse-theia/theia#10028

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>
ndoschek added a commit to eclipsesource/theia that referenced this issue Jun 30, 2022
- Implement support for plugins providing evalutable epressions

Awaiting uplift of monaco
- PR: theia-ide/vscode#1

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>

Fixes eclipse-theia#10027
@ndoschek
Copy link
Contributor

ndoschek commented Jun 30, 2022

Awaits uplift of monaco to add the necessary types in the monaco.languages namespace.
Please see PR: theia-ide/vscode#1

@tsmaeder @colin-grant-work
I had a look and noticed the missing types in the monaco.languages namespace. After some investigation I found the branch uplift-monaco-2022-06 on theia's fork of vscode.
Is it sufficient to add those types there or would you suggest to add them to vscode directly? TIA!

@colin-grant-work
Copy link
Contributor

colin-grant-work commented Jun 30, 2022

@ndoschek, in general, we avoid modifying the code of VSCode directly, so I would probably avoid the change in theia-ide/vscode#1. I'm also a little bit confused by the code in that PR. It appears that it adds declarations to monaco.d.ts for the functions registerEvaluatableExpressionProvider and registerInlineValuesProvider but doesn't modify the source code to actually provide those functions in the API object? To actually support new languages API, changes would be required in the createMonacoLanguagesAPI function in src/vs/editor/standalone/browser/standaloneLanguages.ts.

I have opened a PR to uplift our Monaco dependency to VSCode 1.67.2, and I believe that the EvaluatableExpression and EvaluatableExpressionProvider types are available there - not from the API, but via imports from the source - and it appears that the registration should be possible using the ILanguageFeaturesService, which we can access using Monaco's InstantiationService:

StandaloneServices.get(ILanguageFeaturesService).documentSymbolProvider.onDidChange(
debounce(() => this.updateOutline())
);

const providers = StandaloneServices.get(ILanguageFeaturesService).documentSymbolProvider.all(model);

Given that, I would wait until the uplift / rebase your work on the uplift branch here in the Theia project and work from there, rather than modifying the VSCode source.

@ndoschek
Copy link
Contributor

ndoschek commented Jul 1, 2022

Hi @colin-grant-work!
Thanks for your input! I have a WIP branch and I will try your suggested way of using the ILanguageFeaturesService in the meantime and I will abandon my PR and wait for the uplift then. Thanks again!

ndoschek added a commit to eclipsesource/theia that referenced this issue Jul 29, 2022
- Implement support for plugins providing evalutable epressions
- Update the debug hover widget to consume evaluatable expressions from the registered providers. Keep the former implementation of guessing the expression from the current line as fallback.

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>

Fixes eclipse-theia#10027
ndoschek added a commit to eclipsesource/theia that referenced this issue Jul 29, 2022
- Implement support for plugins providing evalutable epressions
- Update the debug hover widget to consume evaluatable expressions from the registered providers. Keep the former implementation of guessing the expression from the current line as fallback.

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>

Fixes eclipse-theia#10027
ndoschek added a commit to eclipsesource/theia that referenced this issue Aug 1, 2022
- Implement support for plugins providing evalutable epressions
- Update the debug hover widget to consume evaluatable expressions from the registered providers. Keep the former implementation of guessing the expression from the current line as fallback.

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>

Fixes eclipse-theia#10027
ndoschek added a commit to eclipsesource/theia that referenced this issue Aug 3, 2022
- Implement support for plugins providing evalutable epressions
- Update the debug hover widget to consume evaluatable expressions from the registered providers. Keep the former implementation of guessing the expression from the current line as fallback.

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>

Fixes eclipse-theia#10027
JonasHelming pushed a commit that referenced this issue Aug 4, 2022
- Implement support for plugins providing evalutable epressions
- Update the debug hover widget to consume evaluatable expressions from the registered providers. Keep the former implementation of guessing the expression from the current line as fallback.

Contributed on behalf of STMicroelectronics

Signed-off-by: Nina Doschek <ndoschek@eclipsesource.com>

Fixes #10027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants