Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlena Laskavaia2010-06-22 02:15:20 +0000
committerAlena Laskavaia2010-06-22 02:15:20 +0000
commit3d0baee8fbf7d49e63c4f25be3dbad0de94cb590 (patch)
tree4501eb2f2173ffa93395bdccac67921e6f5e052c /codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
parentc5a58d72a10aad390d126fcfd3eb0a7b2214775c (diff)
downloadorg.eclipse.cdt-3d0baee8fbf7d49e63c4f25be3dbad0de94cb590.tar.gz
org.eclipse.cdt-3d0baee8fbf7d49e63c4f25be3dbad0de94cb590.tar.xz
org.eclipse.cdt-3d0baee8fbf7d49e63c4f25be3dbad0de94cb590.zip
Bug 317538: added framework to store arguments in a marker (add added intermediate object between reporter and marker)
Diffstat (limited to 'codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
index 188be3c1d52..29d876aef7c 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
@@ -15,7 +15,8 @@ import java.util.Collection;
import org.eclipse.cdt.codan.core.CodanRuntime;
import org.eclipse.cdt.codan.core.Messages;
-import org.eclipse.cdt.codan.internal.core.model.CodanMarkerProblemReporter;
+import org.eclipse.cdt.codan.core.model.AbstractProblemReporter;
+import org.eclipse.cdt.codan.core.model.ICodanProblemMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
@@ -46,13 +47,13 @@ public class CodanApplication implements IApplication {
extractArguments(args);
CodanBuilder codanBuilder = new CodanBuilder();
CodanRuntime runtime = CodanRuntime.getInstance();
- runtime.setProblemReporter(new CodanMarkerProblemReporter() {
+ runtime.setProblemReporter(new AbstractProblemReporter() {
@Override
- public void reportProblem(String id, String markerType,
- int severity, IResource file, int lineNumber,
- int startChar, int endChar, String message) {
- System.out.println(file.getLocation() + ":" + lineNumber + ": " //$NON-NLS-1$ //$NON-NLS-2$
- + message);
+ protected void reportProblem(ICodanProblemMarker pm) {
+ IResource file = pm.getResource();
+ System.out.println(file.getLocation()
+ + ":" + pm.getLocation().getLineNumber() + ": " //$NON-NLS-1$ //$NON-NLS-2$
+ + pm.createMessage());
}
});
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();

Back to the top