|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jface.text.Position org.eclipse.xtext.ui.editor.syntaxcoloring.AttributedPosition
public class AttributedPosition
Field Summary |
---|
Fields inherited from class org.eclipse.jface.text.Position |
---|
isDeleted, length, offset |
Constructor Summary | |
---|---|
AttributedPosition(int offset,
int length,
org.eclipse.jface.text.TextAttribute attribute,
java.lang.Object lock)
Initialize the position with the given offset, length and foreground color. |
Method Summary | |
---|---|
org.eclipse.swt.custom.StyleRange |
createStyleRange()
|
void |
delete()
Marks this position as deleted. |
org.eclipse.jface.text.TextAttribute |
getHighlighting()
|
boolean |
isContained(int off,
int len)
Is this position contained in the given range (inclusive)? |
boolean |
isEqual(int off,
int len,
org.eclipse.jface.text.TextAttribute other)
Uses reference equality for the highlighting. |
void |
setLength(int length)
Changes the length of this position to the given length. |
void |
setOffset(int offset)
Changes the offset of this position to the given offset. |
void |
undelete()
Marks this position as not deleted. |
void |
update(int off,
int len)
|
Methods inherited from class org.eclipse.jface.text.Position |
---|
equals, getLength, getOffset, hashCode, includes, isDeleted, overlapsWith, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributedPosition(int offset, int length, org.eclipse.jface.text.TextAttribute attribute, java.lang.Object lock)
offset
- The position offsetlength
- The position lengthhighlighting
- The position's highlightinglock
- The lock objectMethod Detail |
---|
public org.eclipse.swt.custom.StyleRange createStyleRange()
public boolean isEqual(int off, int len, org.eclipse.jface.text.TextAttribute other)
off
- The offsetlen
- The lengthhighlighting
- The highlighting
true
iff the given offset, length and highlighting are equal to the internal ones.public boolean isContained(int off, int len)
off
- The range offsetlen
- The range length
true
iff this position is not delete and contained in the given range.public void update(int off, int len)
public void setLength(int length)
org.eclipse.jface.text.Position
setLength
in class org.eclipse.jface.text.Position
length
- the new length of this positionpublic void setOffset(int offset)
org.eclipse.jface.text.Position
setOffset
in class org.eclipse.jface.text.Position
offset
- the new offset of this positionpublic void delete()
org.eclipse.jface.text.Position
delete
in class org.eclipse.jface.text.Position
public void undelete()
org.eclipse.jface.text.Position
undelete
in class org.eclipse.jface.text.Position
public org.eclipse.jface.text.TextAttribute getHighlighting()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |