Added refactoring for changing with section to let#563
Open
AlexXuChen wants to merge 1 commit intoredhat-developer:masterfrom
Open
Added refactoring for changing with section to let#563AlexXuChen wants to merge 1 commit intoredhat-developer:masterfrom
AlexXuChen wants to merge 1 commit intoredhat-developer:masterfrom
Conversation
00f52fa to
9fee111
Compare
Member
|
As discussed, I think a good starting point would be to highlight the entire range as opposed to just the start element. It's likely that we won't need to set the deprecated tag. |
9b2f96c to
9a87820
Compare
7e81a8e to
cd32991
Compare
AlexXuChen
commented
Feb 25, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteDiagnostics.java
Outdated
Show resolved
Hide resolved
rgrunber
reviewed
Feb 25, 2022
Member
rgrunber
left a comment
There was a problem hiding this comment.
Overall, works well. Just a few minor fixes and one special case.
....ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/diagnostics/QuteErrorCode.java
Outdated
Show resolved
Hide resolved
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteDiagnostics.java
Outdated
Show resolved
Hide resolved
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
45867a2 to
037a9fa
Compare
Contributor
|
In the demo, the code action doesn't generate properly the #let fix (yo can see warning on name and price. The code action should generate: After that, please write tests with diagnostic and code action. |
fee85eb to
e15e8fa
Compare
angelozerr
reviewed
Mar 3, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 3, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 3, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
e15e8fa to
aa1604d
Compare
angelozerr
reviewed
Mar 3, 2022
...ava/com/redhat/qute/services/diagnostics/QuteDiagnosticsInExpressionWithWithSectionTest.java
Show resolved
Hide resolved
b6ac712 to
d2d635a
Compare
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteCodeActions.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteDiagnostics.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/services/QuteDiagnostics.java
Outdated
Show resolved
Hide resolved
angelozerr
reviewed
Mar 4, 2022
...redhat.qute.ls/src/main/java/com/redhat/qute/services/diagnostics/DiagnosticDataFactory.java
Outdated
Show resolved
Hide resolved
Contributor
Author
|
If we use deprecated tags in the future, create public static Diagnostic createDiagnosticWithTags(Range range, DiagnosticSeverity severity,
IQuteErrorCode errorCode, List<DiagnosticTag> tags, Object... arguments) {
String message = errorCode.getMessage(arguments);
Diagnostic diagnostic = new Diagnostic(range, message, severity, QUTE_SOURCE,
errorCode != null ? errorCode.getCode() : null);
diagnostic.setTags(tags);
return diagnostic;
}in |
8029c9b to
cc21c50
Compare
cc21c50 to
416a9f6
Compare
angelozerr
reviewed
Mar 8, 2022
| } | ||
|
|
||
| @SuppressWarnings("null") | ||
| public static CodeAction replace(String title, List<Range> ranges, String replaceText, TextDocumentItem document, |
23d4294 to
7806f85
Compare
Signed-off-by: Alexander Chen <alchen@redhat.com>
7806f85 to
11955cf
Compare
Collaborator
|
Collaborator
|
the code action should appear as a refactoring item |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added diagnostic for deprecated

#withsection and CodeAction to use#let.Fixes #489
Signed-off-by: Alexander Chen alchen@redhat.com