Skip to content

Commit

Permalink
Fixed quick fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCockx committed Aug 31, 2023
1 parent dd16d1e commit 28d5548
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ public class RosettaQuickFixCodeActionService implements ICodeActionService2 {

@Override
public List<Either<Command, CodeAction>> getCodeActions(Options options) {

boolean handleQuickfixes = options.getCodeActionParams().getContext().getOnly() == null
|| options.getCodeActionParams().getContext().getOnly().isEmpty()
|| options.getCodeActionParams().getContext().getOnly().contains(CodeActionKind.QuickFix);
if (!handleQuickfixes) {
return Collections.emptyList();
}

List<Either<Command, CodeAction>> result = new ArrayList<>();
for (Diagnostic diagnostic : options.getCodeActionParams().getContext().getDiagnostics()) {
if (handlesDiagnostic(diagnostic)) {
Expand Down

0 comments on commit 28d5548

Please sign in to comment.