-
Notifications
You must be signed in to change notification settings - Fork 8
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
API and implementation of codefixes and code actions for Rascal itself #478
Conversation
@DavyLandman @toinehartman this is still a draft but if you are interested and perhaps have feedback... that would be nice. I'm trying to prepare us for the inevitable removed of |
|
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.
Nice improvement! I like how this allows to write transformations and other code actions relatively easily. I am curious how you'll tackle contribution code actions from the type checker!
I was planning on learning that from you @toinehartman But for the actions that can be attached to an error or warning message, it will be simply a The only small problem is that the type definitions for
|
…Becomes functionn from dsl tests
…hird option in the menu
… that adds a license
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.
I like how most of it looks 👍🏼 great reuse of the existing code-actions added the previous PR. My only concern is with the extra evaluator.
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/RascalLanguageServices.java
Outdated
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/RascalLanguageServices.java
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/RascalLanguageServices.java
Outdated
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/RascalLanguageServices.java
Outdated
Show resolved
Hide resolved
…with respect to code actions
I think this is ready if you do too @toinehartman @DavyLandman. Note that this does not test any quickfix CodeActions attached to error or warning messages from the checker, yet. That's because the checker does not produce them yet. I plan to add a test here anway, as soon as one of those quickfixes starts popping up by the checker. But that's after merging IMHO. |
I fixed the evaluator but the PR still thinks this is open? Help, where do I click? |
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.
Some small remarks after a second review. I've changed my vote to approve, such that if you've went through them, and dealt with them to your discretion, you can merge.
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/BaseWorkspaceService.java
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/parametric/ParametricTextDocumentService.java
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/RascalTextDocumentService.java
Outdated
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/RascalTextDocumentService.java
Outdated
Show resolved
Hide resolved
rascal-lsp/src/main/java/org/rascalmpl/vscode/lsp/rascal/RascalTextDocumentService.java
Outdated
Show resolved
Hide resolved
@toinehartman right. Maybe we could make a Position to Position method like: |
@toinehartman @DavyLandman we now have single-point-of-change for translations from LSP startLine/column to Rascal's lines and columns with |
Quality Gate passedIssues Measures |
Thanks @jurgenvinju! Nice work. Looking forward to trying out the initial refactorings and use of this framework to add others. |
Command
andCodeAction
definitions to rascal-core, such that the checker can annotate messages with quickfixesRascalActions.mov