Skip to content

Commit

Permalink
RED-1419 Quick Fix - show message about empty fixer
Browse files Browse the repository at this point in the history
Change-Id: I873296ad7d3759d896c15afe7d621eaf1b713660
  • Loading branch information
lwlodarc committed Jul 24, 2020
1 parent f3722fd commit 52df8a6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.robotframework.ide.eclipse.main.plugin.model.RobotSuiteFile;
import org.robotframework.ide.eclipse.main.plugin.project.build.RobotProblem;
import org.robotframework.ide.eclipse.main.plugin.project.build.causes.IProblemCause;
import org.robotframework.ide.eclipse.main.plugin.project.build.fix.EmptyCompletionProposal;
import org.robotframework.ide.eclipse.main.plugin.project.build.fix.RedSuiteMarkerResolution;
import org.robotframework.ide.eclipse.main.plugin.project.build.fix.RedXmlConfigMarkerResolution;
import org.robotframework.ide.eclipse.main.plugin.tableeditor.source.assist.QuickAssistProvider;
Expand Down Expand Up @@ -97,7 +98,12 @@ public ICompletionProposal[] computeQuickAssistProposals(final IQuickAssistInvoc
final List<ICompletionProposal> proposals = new ArrayList<>();
proposals.addAll(computeQuickFixes(invocationContext));
proposals.addAll(computeQuickAssists(invocationContext));
return proposals.isEmpty() ? null : proposals.toArray(new ICompletionProposal[0]);
if (proposals.isEmpty()) {
// add empty proposal for informative purpose
proposals.add(
new EmptyCompletionProposal("No quick fix available", "No quick fix was found for this issue"));
}
return proposals.toArray(new ICompletionProposal[0]);
}

private List<ICompletionProposal> computeQuickAssists(
Expand Down

0 comments on commit 52df8a6

Please sign in to comment.