public class NonRuleBasedDamagerRepairer
extends java.lang.Object
implements org.eclipse.jface.text.presentation.IPresentationDamager, org.eclipse.jface.text.presentation.IPresentationRepairer
| Modifier and Type | Field and Description |
|---|---|
protected org.eclipse.jface.text.TextAttribute |
mDefaultTextAttribute
The default text attribute if non is returned as data by the current token.
|
protected org.eclipse.jface.text.IDocument |
mDocument
The document this object works on .
|
| Constructor and Description |
|---|
NonRuleBasedDamagerRepairer(org.eclipse.jface.text.TextAttribute pDefaultTextAttribute)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addRange(org.eclipse.jface.text.TextPresentation pPresentation,
int pOffset,
int pLength,
org.eclipse.jface.text.TextAttribute pAttr)
Adds style information to the given text presentation.
|
void |
createPresentation(org.eclipse.jface.text.TextPresentation pPresentation,
org.eclipse.jface.text.ITypedRegion pRegion) |
protected int |
endOfLineOf(int pOffset)
Returns the end offset of the line that contains the specified offset.
|
org.eclipse.jface.text.IRegion |
getDamageRegion(org.eclipse.jface.text.ITypedRegion pPartition,
org.eclipse.jface.text.DocumentEvent pEvent,
boolean pDocumentPartitioningChanged) |
void |
setDocument(org.eclipse.jface.text.IDocument pDocument) |
protected org.eclipse.jface.text.IDocument mDocument
protected org.eclipse.jface.text.TextAttribute mDefaultTextAttribute
public NonRuleBasedDamagerRepairer(org.eclipse.jface.text.TextAttribute pDefaultTextAttribute)
pDefaultTextAttribute - the attribute to assign to default textpublic void setDocument(org.eclipse.jface.text.IDocument pDocument)
setDocument in interface org.eclipse.jface.text.presentation.IPresentationDamagersetDocument in interface org.eclipse.jface.text.presentation.IPresentationRepairerprotected int endOfLineOf(int pOffset)
throws org.eclipse.jface.text.BadLocationException
pOffset - the offset whose line end offset must be computedorg.eclipse.jface.text.BadLocationException - if offset is invalid in the current documentpublic org.eclipse.jface.text.IRegion getDamageRegion(org.eclipse.jface.text.ITypedRegion pPartition,
org.eclipse.jface.text.DocumentEvent pEvent,
boolean pDocumentPartitioningChanged)
getDamageRegion in interface org.eclipse.jface.text.presentation.IPresentationDamagerpublic void createPresentation(org.eclipse.jface.text.TextPresentation pPresentation,
org.eclipse.jface.text.ITypedRegion pRegion)
createPresentation in interface org.eclipse.jface.text.presentation.IPresentationRepairerprotected void addRange(org.eclipse.jface.text.TextPresentation pPresentation,
int pOffset,
int pLength,
org.eclipse.jface.text.TextAttribute pAttr)
pPresentation - the text presentation to be extendedpOffset - the offset of the range to be styledpLength - the length of the range to be styledpAttr - the attribute describing the style of the range to be styled