diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/SuppressWarningsSubProcessor.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/SuppressWarningsSubProcessor.java index 42da67747c..f091e0311c 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/SuppressWarningsSubProcessor.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corrections/SuppressWarningsSubProcessor.java @@ -60,4 +60,14 @@ protected ProposalKindWrapper createFixCorrectionProposal(IProposableFix fix, IC return CodeActionHandler.wrap(proposal, CodeActionKind.QuickFix); } + @Override + protected boolean alreadyHasProposal(Collection proposals, String warningToken) { + for (ProposalKindWrapper element : proposals) { + if (element.getProposal() instanceof SuppressWarningsProposalCore swp && warningToken.equals(swp.getWarningToken())) { + return true; // only one at a time + } + } + return false; + } + }