Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2011-09-27 20:41:31 +0000
committerAndrew Gvozdev2011-09-27 20:41:31 +0000
commita4d4dec51fd31d09a92c669267d069b333b84ec9 (patch)
tree7ad9310d30cd07ac374fbc7380f238b33355ed7a /core/org.eclipse.cdt.core.tests/misc
parentfe0611ef330dfd6c08aec5a8eeb8566e844ff990 (diff)
downloadorg.eclipse.cdt-a4d4dec51fd31d09a92c669267d069b333b84ec9.tar.gz
org.eclipse.cdt-a4d4dec51fd31d09a92c669267d069b333b84ec9.tar.xz
org.eclipse.cdt-a4d4dec51fd31d09a92c669267d069b333b84ec9.zip
bug 359140: Allow ErrorParserManager create workspace level markers
Diffstat (limited to 'core/org.eclipse.cdt.core.tests/misc')
-rw-r--r--core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
index d13659d8cd..ba7b678556 100644
--- a/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
+++ b/core/org.eclipse.cdt.core.tests/misc/org/eclipse/cdt/core/internal/errorparsers/tests/ErrorParserManagerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 QNX Software Systems and others.
+ * Copyright (c) 2008, 2011 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,6 +30,7 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.testplugin.CProjectHelper;
import org.eclipse.cdt.core.testplugin.CTestPlugin;
import org.eclipse.core.internal.registry.ExtensionRegistry;
+import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceDescription;
@@ -305,4 +306,24 @@ public class ErrorParserManagerTest extends TestCase {
assertEquals(" la la 99 ",end);
}
+ public static class TestParser4 implements IErrorParser {
+ public boolean processLine(String line, ErrorParserManager eoParser) {
+ ProblemMarkerInfo problemMarkerInfo = new ProblemMarkerInfo(null, 0, "Workspace level marker", IMarker.SEVERITY_INFO, null);
+ eoParser.addProblemMarker(problemMarkerInfo);
+ return true;
+ }
+ }
+ public void testWorkspaceLevelError() throws IOException {
+ String id = addErrorParserExtension("test4", TestParser4.class);
+ epManager = new ErrorParserManager(null, markerGenerator, new String[] { id });
+
+ StringBuffer buf = new StringBuffer("errorT: ");
+ output(buf.toString()+"\n");
+ end();
+ assertEquals(1, errorList.size());
+ ProblemMarkerInfo problemMarkerInfo = errorList.get(0);
+ assertEquals("Workspace level marker", problemMarkerInfo.description);
+ assertTrue(problemMarkerInfo.file instanceof IWorkspaceRoot);
+ }
+
}

Back to the top