public class SemanticHighlightingReconciler
extends java.lang.Object
implements org.eclipse.jface.util.IPropertyChangeListener, org.eclipse.jface.text.ITextInputListener
This is the main class for Ptolemy semantic highlighting. It parses the Java source in the editor on-the-fly, and add Ptolemy semantic coloring to the presentation.
Modifier and Type | Class and Description |
---|---|
protected static class |
SemanticHighlightingReconciler.HighlightedPosition
The position of a semantic highlighting.
|
protected static class |
SemanticHighlightingReconciler.HighlightingStyle
The semantic highlighting style.
|
Constructor and Description |
---|
SemanticHighlightingReconciler() |
Modifier and Type | Method and Description |
---|---|
void |
aboutToBeReconciled()
Prepare to reconcile the document.
|
void |
inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument oldInput,
org.eclipse.jface.text.IDocument newInput)
Prepare for the change of the input document.
|
void |
inputDocumentChanged(org.eclipse.jface.text.IDocument oldInput,
org.eclipse.jface.text.IDocument newInput)
Handle the change of input document.
|
void |
install(PtolemyEditor editor,
IColorManager colorManager)
Install this reconciler to the editor, and enable it if it is set to be
enabled.
|
boolean |
isEnabled()
Return whether the semantic highlighting is enabled.
|
void |
propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
Handle the change of a property in the preference.
|
void |
reconciled(org.eclipse.jdt.core.dom.CompilationUnit ast,
boolean forced,
org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Perform operation after the reconcilation is finished.
|
public void aboutToBeReconciled()
public void inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument oldInput, org.eclipse.jface.text.IDocument newInput)
inputDocumentAboutToBeChanged
in interface org.eclipse.jface.text.ITextInputListener
oldInput
- The old input document.newInput
- The new input document.public void inputDocumentChanged(org.eclipse.jface.text.IDocument oldInput, org.eclipse.jface.text.IDocument newInput)
inputDocumentChanged
in interface org.eclipse.jface.text.ITextInputListener
oldInput
- The old input document.newInput
- The new input document.public void install(PtolemyEditor editor, IColorManager colorManager)
editor
- The editor.colorManager
- The color manager.public boolean isEnabled()
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
propertyChange
in interface org.eclipse.jface.util.IPropertyChangeListener
event
- The property change event.public void reconciled(org.eclipse.jdt.core.dom.CompilationUnit ast, boolean forced, org.eclipse.core.runtime.IProgressMonitor progressMonitor)
ast
- The compilation unit of the Java source.forced
- Whether the reconcilation is forced.progressMonitor
- The progress monitor.