Permalink
Browse files

Rename marker ID to com.coala.core.problem

  • Loading branch information...
arafsheikh committed Jun 21, 2016
1 parent 9774379 commit 844b84ec9dc7fa5f7accb609f30d8d363a7356fc
@@ -56,7 +56,7 @@ public void test() throws IOException, CoreException, ExecutionException {
removeMarkers.removeAllMarkers(file);
ExternalUtils.createCoolMarker(file, 0, 0, "First marker");
ExternalUtils.createCoolMarker(file, 0, 0, "Second marker");
IMarker[] markers = file.findMarkers("com.coala.core.coolproblem", true,
IMarker[] markers = file.findMarkers("com.coala.core.problem", true,
IResource.DEPTH_INFINITE);
assertEquals(markers.length, 2);
}
@@ -57,7 +57,7 @@ public void test() throws InterruptedException, CoreException, ExecuteException,
removeMarkers.removeAllMarkers(file);
ExternalUtils.runBearOnFile(file, "CheckstyleBear");
sleep(15);
IMarker[] markers = file.findMarkers("com.coala.core.coolproblem", true,
IMarker[] markers = file.findMarkers("com.coala.core.problem", true,
IResource.DEPTH_INFINITE);
assertEquals(markers.length, 3);
}
@@ -63,7 +63,7 @@ public void test() throws ExecuteException, IOException, CoreException {
String folder = path.toOSString();
ExternalUtils.runcoafile(folder, project);
sleep(15);
IMarker[] markers = file.findMarkers("com.coala.core.coolproblem", true,
IMarker[] markers = file.findMarkers("com.coala.core.problem", true,
IResource.DEPTH_INFINITE);
assertEquals(markers.length, 3);
}
@@ -103,7 +103,7 @@
</extension>
<extension id="coolmarker" point="org.eclipse.core.resources.markers"/>
<extension id="coolproblem" point="org.eclipse.core.resources.markers">
<extension id="problem" point="org.eclipse.core.resources.markers">
<super type="org.eclipse.core.resources.problemmarker"/>
<super type="com.coala.core.coolmarker"/>
<attribute name="coolFactor"/>
@@ -38,7 +38,7 @@ public void removeAllMarkers(IFile file) {
}
for (IMarker m : problems) {
try {
if (m.getType().equals("com.coala.core.coolproblem")) {
if (m.getType().equals("com.coala.core.problem")) {
m.delete();
}
} catch (CoreException ex) {
@@ -210,7 +210,7 @@ public static void processJsonAndMark(String json, IProject project) throws IOEx
public static void createCoolMarker(IFile file, int lineNum, int flag, String message) {
IResource resource = (IResource) file;
try {
IMarker marker = resource.createMarker("com.coala.core.coolproblem");
IMarker marker = resource.createMarker("com.coala.core.problem");
marker.setAttribute(IMarker.LINE_NUMBER, lineNum);
if (flag == 1) {
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);

0 comments on commit 844b84e

Please sign in to comment.