Completely changed the structure and switched to Eclipse Plugin.
[Mograsim.git] / net.mograsim.plugin.core / src / net / mograsim / plugin / asm / editor / AsmReconciler.java
1 package net.mograsim.plugin.asm.editor;
2
3 import org.eclipse.jface.text.IDocument;
4 import org.eclipse.jface.text.ITextViewer;
5 import org.eclipse.jface.text.reconciler.Reconciler;
6 import org.eclipse.jface.text.source.projection.ProjectionViewer;
7
8 public class AsmReconciler extends Reconciler
9 {
10
11         private AsmReconcilerStrategy fStrategy;
12
13         public AsmReconciler()
14         {
15                 fStrategy = new AsmReconcilerStrategy();
16                 this.setReconcilingStrategy(fStrategy, IDocument.DEFAULT_CONTENT_TYPE);
17         }
18
19         @Override
20         public void install(ITextViewer textViewer)
21         {
22                 super.install(textViewer);
23                 ProjectionViewer pViewer = (ProjectionViewer) textViewer;
24                 fStrategy.setProjectionViewer(pViewer);
25         }
26 }