Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkolovos2013-02-10 11:26:04 -0500
committerdkolovos2013-02-10 11:26:04 -0500
commit7bed011c9210235536d50418f9668ddb78dcbadd (patch)
tree9dcea39937cbebef730fb9229bf47d9241b8daf9
parentacdf858747b8a01ae347b78f2f728f14e508c95f (diff)
downloadorg.eclipse.emfatic-7bed011c9210235536d50418f9668ddb78dcbadd.tar.gz
org.eclipse.emfatic-7bed011c9210235536d50418f9668ddb78dcbadd.tar.xz
org.eclipse.emfatic-7bed011c9210235536d50418f9668ddb78dcbadd.zip
Removed dependency to ui.editors
-rw-r--r--plugins/org.eclipse.gymnast.runtime.core/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.gymnast.runtime.core/src/org/eclipse/gymnast/runtime/core/util/MarkerUtil.java19
2 files changed, 17 insertions, 3 deletions
diff --git a/plugins/org.eclipse.gymnast.runtime.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.gymnast.runtime.core/META-INF/MANIFEST.MF
index e2a41fa..e28d1e4 100644
--- a/plugins/org.eclipse.gymnast.runtime.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.gymnast.runtime.core/META-INF/MANIFEST.MF
@@ -18,6 +18,5 @@ Require-Bundle: org.eclipse.ui.ide,
org.eclipse.core.resources,
org.eclipse.ui,
org.eclipse.core.runtime,
- org.eclipse.ui.editors,
org.eclipse.jface.text
Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.gymnast.runtime.core/src/org/eclipse/gymnast/runtime/core/util/MarkerUtil.java b/plugins/org.eclipse.gymnast.runtime.core/src/org/eclipse/gymnast/runtime/core/util/MarkerUtil.java
index cceb6eb..f96e216 100644
--- a/plugins/org.eclipse.gymnast.runtime.core/src/org/eclipse/gymnast/runtime/core/util/MarkerUtil.java
+++ b/plugins/org.eclipse.gymnast.runtime.core/src/org/eclipse/gymnast/runtime/core/util/MarkerUtil.java
@@ -12,16 +12,19 @@
package org.eclipse.gymnast.runtime.core.util;
import java.util.HashMap;
+import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRunnable;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.gymnast.runtime.core.parser.ParseContext;
import org.eclipse.gymnast.runtime.core.parser.ParseError;
import org.eclipse.gymnast.runtime.core.parser.ParseMessage;
import org.eclipse.gymnast.runtime.core.parser.ParseWarning;
-import org.eclipse.ui.texteditor.MarkerUtilities;
/**
@@ -84,12 +87,24 @@ public class MarkerUtil {
map.put(IMarker.TRANSIENT, new Boolean(true));
try {
- MarkerUtilities.createMarker(file, map, getMarkerType());
+ createMarker(file, map, getMarkerType());
}
catch (CoreException ex) {
ex.printStackTrace();
}
}
+
+ protected static void createMarker(final IResource resource, final Map attributes, final String markerType) throws CoreException {
+
+ IWorkspaceRunnable r= new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ IMarker marker= resource.createMarker(markerType);
+ marker.setAttributes(attributes);
+ }
+ };
+ resource.getWorkspace().run(r, null,IWorkspace.AVOID_UPDATE, null);
+ }
+
}

Back to the top