|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingPresenter
public class HighlightingPresenter
Highlighting presenter - UI thread implementation. Initially copied from org.eclipse.jdt.internal.ui.javaeditor.SemanticHighlightingPresenter
Constructor Summary | |
---|---|
HighlightingPresenter()
|
Method Summary | |
---|---|
void |
addAllPositions(java.util.List<AttributedPosition> list)
Adds all current positions to the given list. |
void |
applyTextPresentation(org.eclipse.jface.text.TextPresentation textPresentation)
|
AttributedPosition |
createHighlightedPosition(int offset,
int length,
org.eclipse.jface.text.TextAttribute highlighting)
Creates and returns a new highlighted position with the given offset, length and highlighting. |
org.eclipse.jface.text.TextPresentation |
createPresentation(java.util.List<AttributedPosition> addedPositions,
java.util.List<AttributedPosition> removedPositions)
Create a text presentation in the background. |
java.lang.Runnable |
createSimpleUpdateRunnable()
|
java.lang.Runnable |
createUpdateRunnable(org.eclipse.jface.text.TextPresentation textPresentation,
java.util.List<AttributedPosition> addedPositions,
java.util.List<AttributedPosition> removedPositions)
Create a runnable for updating the presentation. |
void |
documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent event)
|
void |
documentChanged(org.eclipse.jface.text.DocumentEvent event)
|
void |
highlightingStyleChanged(org.eclipse.jface.text.TextAttribute highlighting)
Invalidate text presentation of positions with the given highlighting. |
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(XtextSourceViewer sourceViewer,
XtextPresentationReconciler backgroundPresentationReconciler)
Install this presenter on the given source viewer and background presentation reconciler. |
boolean |
isCanceled()
|
void |
setCanceled(boolean isCanceled)
Set whether or not the current reconcile is canceled. |
void |
uninstall()
Uninstall this presenter. |
void |
updatePresentation(org.eclipse.jface.text.TextPresentation textPresentation,
AttributedPosition[] addedPositions,
AttributedPosition[] removedPositions)
Invalidate the presentation of the positions based on the given added positions and the existing deleted positions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HighlightingPresenter()
Method Detail |
---|
public AttributedPosition createHighlightedPosition(int offset, int length, org.eclipse.jface.text.TextAttribute highlighting)
NOTE: Also called from background thread.
offset
- The offsetlength
- The lengthhighlighting
- The highlighting
public void addAllPositions(java.util.List<AttributedPosition> list)
NOTE: Called from background thread.
list
- The listpublic org.eclipse.jface.text.TextPresentation createPresentation(java.util.List<AttributedPosition> addedPositions, java.util.List<AttributedPosition> removedPositions)
NOTE: Called from background thread.
addedPositions
- the added positionsremovedPositions
- the removed positions
null
, if reconciliation should be canceledpublic java.lang.Runnable createUpdateRunnable(org.eclipse.jface.text.TextPresentation textPresentation, java.util.List<AttributedPosition> addedPositions, java.util.List<AttributedPosition> removedPositions)
NOTE: Called from background thread.
textPresentation
- the text presentationaddedPositions
- the added positionsremovedPositions
- the removed positions
null
, if reconciliation should be canceledpublic java.lang.Runnable createSimpleUpdateRunnable()
public void updatePresentation(org.eclipse.jface.text.TextPresentation textPresentation, AttributedPosition[] addedPositions, AttributedPosition[] removedPositions)
NOTE: Indirectly called from background thread by UI runnable.
textPresentation
- the text presentation or null
, if the presentation should computed in the UI threadaddedPositions
- the added positionsremovedPositions
- the removed positionspublic void applyTextPresentation(org.eclipse.jface.text.TextPresentation textPresentation)
applyTextPresentation
in interface org.eclipse.jface.text.ITextPresentationListener
public void inputDocumentAboutToBeChanged(org.eclipse.jface.text.IDocument oldInput, org.eclipse.jface.text.IDocument newInput)
inputDocumentAboutToBeChanged
in interface org.eclipse.jface.text.ITextInputListener
public void inputDocumentChanged(org.eclipse.jface.text.IDocument oldInput, org.eclipse.jface.text.IDocument newInput)
inputDocumentChanged
in interface org.eclipse.jface.text.ITextInputListener
public void documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent event)
documentAboutToBeChanged
in interface org.eclipse.jface.text.IDocumentListener
public void documentChanged(org.eclipse.jface.text.DocumentEvent event)
documentChanged
in interface org.eclipse.jface.text.IDocumentListener
public boolean isCanceled()
true
iff the current reconcile is canceled.
NOTE: Also called from background thread.
public void setCanceled(boolean isCanceled)
isCanceled
- true
iff the current reconcile is canceledpublic void install(XtextSourceViewer sourceViewer, XtextPresentationReconciler backgroundPresentationReconciler)
sourceViewer
- the source viewerbackgroundPresentationReconciler
- the background presentation reconciler, can be null
, in that case
createPresentation(List, List)
should not be calledpublic void uninstall()
public void highlightingStyleChanged(org.eclipse.jface.text.TextAttribute highlighting)
highlighting
- The highlighting
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |