org.eclipse.ocl.examples.xtext.console.xtfo
Class HighlightingReconciler

java.lang.Object
  extended by org.eclipse.ocl.examples.xtext.console.xtfo.HighlightingReconciler
All Implemented Interfaces:
org.eclipse.jface.text.ITextInputListener, org.eclipse.xtext.ui.editor.model.IXtextModelListener, org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightedPositionAcceptor

public class HighlightingReconciler
extends java.lang.Object
implements org.eclipse.jface.text.ITextInputListener, org.eclipse.xtext.ui.editor.model.IXtextModelListener, org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightedPositionAcceptor

Author:
Sebastian Zarnekow - Initial contribution and API

Constructor Summary
HighlightingReconciler()
           
 
Method Summary
 void addPosition(int offset, int length, java.lang.String... ids)
          Add a position with the given range and highlighting if it does not exist already.
 org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator getCalculator()
           
 void inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument oldInput, org.eclipse.jface.text.IDocument newInput)
           
 void inputDocumentChanged(org.eclipse.jface.text.IDocument oldInput, org.eclipse.jface.text.IDocument newInput)
           
 void install(org.eclipse.xtext.ui.editor.XtextSourceViewer sourceViewer, org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingPresenter presenter)
          Install this reconciler on the given editor and presenter.
 void modelChanged(org.eclipse.xtext.resource.XtextResource resource)
           
 void refresh()
          Refreshes the highlighting.
 void setCalculator(org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator calculator)
           
 void uninstall()
          Uninstall this reconciler from the editor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HighlightingReconciler

public HighlightingReconciler()
Method Detail

addPosition

public void addPosition(int offset,
                        int length,
                        java.lang.String... ids)
Add a position with the given range and highlighting if it does not exist already.

Specified by:
addPosition in interface org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightedPositionAcceptor
Parameters:
offset - The range offset
length - The range length

install

public void install(org.eclipse.xtext.ui.editor.XtextSourceViewer sourceViewer,
                    org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingPresenter presenter)
Install this reconciler on the given editor and presenter.

Parameters:
sourceViewer - the source viewer
presenter - the highlighting presenter

uninstall

public void uninstall()
Uninstall this reconciler from the editor


inputDocumentAboutToBeChanged

public void inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument oldInput,
                                          org.eclipse.jface.text.IDocument newInput)
Specified by:
inputDocumentAboutToBeChanged in interface org.eclipse.jface.text.ITextInputListener

inputDocumentChanged

public void inputDocumentChanged(org.eclipse.jface.text.IDocument oldInput,
                                 org.eclipse.jface.text.IDocument newInput)
Specified by:
inputDocumentChanged in interface org.eclipse.jface.text.ITextInputListener

refresh

public void refresh()
Refreshes the highlighting.


modelChanged

public void modelChanged(org.eclipse.xtext.resource.XtextResource resource)
Specified by:
modelChanged in interface org.eclipse.xtext.ui.editor.model.IXtextModelListener

setCalculator

public void setCalculator(org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator calculator)

getCalculator

public org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator getCalculator()