-
Notifications
You must be signed in to change notification settings - Fork 318
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
Drop down for Text.trim 'where' attribute #3407
Conversation
…gs to use in pull-down menus
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm so far
e4c7267
to
8ba0630
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice in its simplicity, but way too brittle I'm afraid. The IDE needs slightly more understanding – like what Location
is and where it comes from. What I'm saying is, pasting the string Location.Both
is rather incorrect, if Location
is not an imported symbol. Or if someone did:
import Standard.Base.Text.Location as Text_Location
The IDE must understand how to handle such renames or auto-imports.
Intentionally oversimplified.
Imports! NetBeans IDE has a special TreeMaker support to create a qualified identifier; Simple name will automatically be used if appropriate, adding any needed imports, following user's preferences. To follow the same approach we could say that The other approach is to delegate the responsibility to the engine runtime & its language server. The engine would then be responsible for updating the source:
Specifying this in advance as part of every |
I think this is the most sensible approach for now. And the IDE already deals with qualified names in other places, I think. And they have systems for deciding "is this symbol imported already?" and other such queries. Summoning @4e6 to make sure. |
OK, let's treat the names as qualified. |
This PR is no longer relevant after Marcin implemented his #3422 - closing. |
1 similar comment
This PR is no longer relevant after Marcin implemented his #3422 - closing. |
Pull Request Description
Based on Dmitry's hints:
This PR expands the
Suggestion.Attribute
structure with optionaltagValues
hints. It hard-codes these data for theText.trim
method. If we managed to transfer these data to the IDE, display it and use it, we'd have a solid 1st prototype of trivial static drop downs.TODO
Dmitry also noted:
That might be necessary step before IDE can accept the newly transmitted
tagValues
and use them.Important Notes
It is not the goal of this PR to extract the information directly from the standard library. Enhancing the Enso language type system to provide enough information and extracting them for the
Text.trim
method is a task for another, orthogonal PR.Checklist
Please include the following checklist in your PR:
./run dist
and./run watch
.