-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
inline values #16067
inline values #16067
Conversation
@isidorn, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jrieken, @alexandrudima and @bpasero to be potential reviewers. |
I have added an empty method in the right place with documentation on how this should behave @nojvek give it a try and let me know how it goes. I plan to continue on this on Monday unless you take it over. You should be able to fork my branch and continue your work on top of that. |
I'll take a stab. For this version, the scope ranges are not coming from the debugger API's right? The idea is to go through stack frames until global. Do a regex search for variable names and show decorators after line? |
For the first version just ignore the scope ranges - since they are only supported by the node2 debug adapter, and it would be cool to have this feature for all 20+ adapters that exist. Once we have that we can improve it for adapters that support scope ranges. No, the idea is to just go through the focused stack frame and go inside all the non expenisve scopes fo that stack frame. No regex search, just a regular compar of does a variable name match a word - similar how debugHover does it. |
Yeah that's what I meant.
Basically.
Scopes = getCheapScopes(activeFrame)
Ranges = Scopes.map(scope => active editor.getText().match(/\b${scope.name
}\b/g)
Decoratortype = new decoratortype(...)
DecoratorInstances = createDecoratorInstances(scopes, ranges)
Activeeditor.setDecorator(decoratortype, DecoratorInstances)
Writing this from a phone so camelcasing is misplaced
…On Friday, November 25, 2016, Isidor Nikolic ***@***.***> wrote:
For the first version just ignore the scope ranges - since they are only
supported by the node2 debug adapter, and it would be cool to have this
feature for all 20+ adapters that exist.
No, the idea is to just go through the focused stack frame and go inside
all the non expenisve scopes fo that stack frame. No regex search, just a
regular compar of does a variable name match a word.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16067 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-JVNbAFaZmVO03jH5R7QL6TTeqc6owks5rBwTMgaJpZM4K8i31>
.
|
Instead of mathcing against scope.name, you would match against something like scope.getChildern().then(children=> children.forEach(variable => match variable.name)) Also not sure about doing regex across whole text content of editor. I would prefer if you instead go through all the words in the text document since editor already parses the words nicely, and then word by word you can try to find across all variable names |
I see. I didn't realize that.
I would guess that for showing the gray highlights for matching words,
monaco builds an internal word => ranges map.
I'll hunt for the API and use that.
…On Friday, November 25, 2016, Isidor Nikolic ***@***.***> wrote:
Instead of mathcing against scope.name, you would match against something
like scope.getChildern().then(children=> children.forEach(child => match
child.name))
Also not sure about doing regex across whole text content of editor. I
would prefer if you instead go through all the words in the text document
since editor already parses the words nicely, and then word by word you can
try to find across all variable names
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16067 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-JVHzaaeGshYauu59AvadAaZITfiDpks5rBxHngaJpZM4K8i31>
.
|
For gray highlihgts we are using a json parser and look for keys. Not useful for this scenario. |
I have a prototype working. Have some issues though.
|
Closing this ass all the interesting work is done in #16129 |
To address #13424
Chrome dev tools does this feature nicely, a picture for reference
![screen shot 2016-11-25 at 16 24 13](https://cloud.githubusercontent.com/assets/1926584/20629887/17bc897e-b32e-11e6-8d16-0fa9507ad65d.png)