Browse Source

registered adapter factory from IDiagramDocumentEditor to IHighlightSupport

Andreas Mülder 14 years ago
parent
commit
f6b3e5c79d

+ 2 - 2
plugins/org.yakindu.sct.simulation.ui/plugin.xml

@@ -5,10 +5,10 @@
    <extension
          point="org.eclipse.core.runtime.adapters">
       <factory
-            adaptableType="org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor"
+            adaptableType="org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor"
             class="org.yakindu.sct.simulation.ui.editor.IHighlightingSupportAdapterFactory">
          <adapter
-               type="org.yakindu.sct.simulation.ui.editor.IHighlightingSupportAdapterFactory">
+               type="de.itemis.gmf.runtime.commons.highlighting.IHighlightingSupport">
          </adapter>
       </factory>
    </extension>

+ 2 - 5
plugins/org.yakindu.sct.simulation.ui/src/org/yakindu/sct/simulation/ui/editor/HighlightingExecutionListener.java

@@ -42,11 +42,8 @@ public class HighlightingExecutionListener extends
 			return highlightingSupport;
 		IEditorPart activeEditor = ActiveEditorResolver.getActiveEditor();
 		if (activeEditor != null) {
-			// TODO The active editor should be adaptable to IHighlightSupport
-			// via registered factory
-			IHighlightingSupportAdapterFactory factory = new IHighlightingSupportAdapterFactory();
-			IHighlightingSupport support = (IHighlightingSupport) factory
-					.getAdapter(activeEditor, IHighlightingSupport.class);
+			IHighlightingSupport support = (IHighlightingSupport) activeEditor
+					.getAdapter(IHighlightingSupport.class);
 			if (support != null)
 				return highlightingSupport = support;
 		}