Completely changed the structure and switched to Eclipse Plugin.
[Mograsim.git] / net.mograsim.plugin.core / src / net / mograsim / plugin / asm / editor / AsmReconciler.java
diff --git a/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/editor/AsmReconciler.java b/net.mograsim.plugin.core/src/net/mograsim/plugin/asm/editor/AsmReconciler.java
new file mode 100644 (file)
index 0000000..876878f
--- /dev/null
@@ -0,0 +1,26 @@
+package net.mograsim.plugin.asm.editor;
+
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.reconciler.Reconciler;
+import org.eclipse.jface.text.source.projection.ProjectionViewer;
+
+public class AsmReconciler extends Reconciler
+{
+
+       private AsmReconcilerStrategy fStrategy;
+
+       public AsmReconciler()
+       {
+               fStrategy = new AsmReconcilerStrategy();
+               this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
+       }
+
+       @Override
+       public void install(ITextViewer textViewer)
+       {
+               super.install(textViewer);
+               ProjectionViewer pViewer = (ProjectionViewer) textViewer;
+               fStrategy.setProjectionViewer(pViewer);
+       }
+}
\ No newline at end of file