Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2017-02-03 23:12:43 +0000
committerJeff Johnston2017-04-18 00:01:27 +0000
commit795a90288b0a1331de1709da640433c6338c090c (patch)
treed986ff3dd730b2525848f10621d1947b8126e58b /build/org.eclipse.cdt.managedbuilder.core
parent908a609a53d2a1d171e74b93ad19e7727f891edb (diff)
downloadorg.eclipse.cdt-795a90288b0a1331de1709da640433c6338c090c.tar.gz
org.eclipse.cdt-795a90288b0a1331de1709da640433c6338c090c.tar.xz
org.eclipse.cdt-795a90288b0a1331de1709da640433c6338c090c.zip
Bug 497670 - Support compiler provided "fix-it" hints
- add new FixitErrorParser that extends RegexErrorParser and is used to replace the error parser for GNUCErrorParser - add new FixManager class to bind a fixit message with its problem marker - modify ProblemMarkerFilterManager to register the last accepted ProblemMarkerInfo for a particular resource so the FixitErrorParser can find the last error marker for the file that precedes the fixit message - FixitErrorParser looks for fix-it messages and binds them via FixitManager to the last error marker for the file - add new Fixit class to contain the details of a gcc fix-it - add new QuickFixForFixit which applies the gcc fix-it for the file - add new (.*) regex in codan.ui.checkers patterns that will trigger before any other error and will look for the fix-it message format - change cdt.core to expose cdt.internal.errorparsers to codan.checkers.ui - change codan.core to expose codan.internal.core.model to codan.checkers.ui - fix CDocumentProvider.setOverlay method to not overlay a CMarkerAnnotation that has a quick fix - when deleting all C problem markers, also make a call to FixManager.deleteAllMarkers() so markers aren't left referenced Change-Id: Ibf8ff7d8addb1bf092dc4ef35de0d92de0309589
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
index fd280ddfb5c..7053b05ff8a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
@@ -33,6 +33,7 @@ import org.eclipse.cdt.core.resources.ACBuilder;
import org.eclipse.cdt.core.resources.IConsole;
import org.eclipse.cdt.core.resources.RefreshScopeManager;
import org.eclipse.cdt.internal.core.BuildRunnerHelper;
+import org.eclipse.cdt.internal.errorparsers.FixitManager;
import org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildDescription;
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildIOType;
@@ -1162,6 +1163,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
*
* @param project
*/
+ @SuppressWarnings("restriction")
private void removeAllMarkers(IProject project) {
if (project == null || !project.isAccessible()) return;
@@ -1177,6 +1179,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
if (markers != null) {
try {
workspace.deleteMarkers(markers);
+ FixitManager.getInstance().deleteMarkers(markers);
} catch (CoreException e) {
// The only situation that might cause this is some sort of resource change event
return;

Back to the top