|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.search.ui.text.Match
A textual match in a given object. This class may be subclassed (to add additional match state like accuracy, etc). The element a match is reported against is assumed to contain the match, and the UI will group matches against the same element together. A match has an offset and a length which may be specified in characters or in lines.
Field Summary | |
static int |
UNIT_CHARACTER
A constant expressing that offset and length of this match are specified in characters |
static int |
UNIT_LINE
A constant expressing that offset and length of this match are specified in lines |
Constructor Summary | |
Match(Object element,
int offset,
int length)
Constructs a new Match object. |
|
Match(Object element,
int unit,
int offset,
int length)
Constructs a new Match object. |
Method Summary | |
int |
getBaseUnit()
Returns whether match length and offset are expressed in lines or characters. |
Object |
getElement()
Returns the element that contains this match. |
int |
getLength()
Returns the length of this match. |
int |
getOffset()
Returns the offset of this match. |
void |
setLength(int length)
Sets the length. |
void |
setOffset(int offset)
Sets the offset of this match. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UNIT_LINE
public static final int UNIT_CHARACTER
Constructor Detail |
public Match(Object element, int unit, int offset, int length)
element
- the element that contains the matchunit
- the unit offset and length are based onoffset
- the offset the match starts atlength
- the length of the matchpublic Match(Object element, int offset, int length)
element
- the element that contains the matchoffset
- the offset the match starts atlength
- the length of the matchMethod Detail |
public int getOffset()
public void setOffset(int offset)
offset
- the offset to setpublic int getLength()
public void setLength(int length)
length
- the length to setpublic Object getElement()
public int getBaseUnit()
|
Eclipse Platform Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.