|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.internal.ui.editor.SemanticHighlightingPresenter
public class SemanticHighlightingPresenter
Semantic highlighting presenter - UI thread implementation. Cloned from JDT.
Constructor Summary | |
---|---|
SemanticHighlightingPresenter()
|
Method Summary | |
---|---|
void |
addAllPositions(java.util.List list)
Adds all current positions to the given list. |
void |
applyTextPresentation(org.eclipse.jface.text.TextPresentation textPresentation)
|
org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightedPosition |
createHighlightedPosition(int offset,
int length,
org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightingStyle highlighting)
Creates and returns a new highlighted position with the given offset, length and highlighting. |
org.eclipse.jface.text.TextPresentation |
createPresentation(java.util.List addedPositions,
java.util.List removedPositions)
Create a text presentation in the background. |
java.lang.Runnable |
createUpdateRunnable(org.eclipse.jface.text.TextPresentation textPresentation,
java.util.List addedPositions,
java.util.List 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.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightingStyle 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(CSourceViewer sourceViewer,
CPresentationReconciler 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,
org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightedPosition[] addedPositions,
org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightedPosition[] 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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SemanticHighlightingPresenter()
Method Detail |
---|
public org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightedPosition createHighlightedPosition(int offset, int length, org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightingStyle highlighting)
NOTE: Also called from background thread.
offset
- The offsetlength
- The lengthhighlighting
- The highlighting
public void addAllPositions(java.util.List list)
NOTE: Called from background thread.
list
- The listpublic org.eclipse.jface.text.TextPresentation createPresentation(java.util.List addedPositions, java.util.List 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 addedPositions, java.util.List removedPositions)
NOTE: Called from background thread.
textPresentation
- the text presentationaddedPositions
- the added positionsremovedPositions
- the removed positions
null
, if reconciliation should be canceledpublic void updatePresentation(org.eclipse.jface.text.TextPresentation textPresentation, org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightedPosition[] addedPositions, org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightedPosition[] 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(CSourceViewer sourceViewer, CPresentationReconciler 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.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightingStyle highlighting)
highlighting
- The highlighting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |