|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.search.ui.text.Match
public class Match
A textual match in a given object. This class may be instantiated and also 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(java.lang.Object element,
int offset,
int length)
Constructs a new Match object. |
|
Match(java.lang.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. |
java.lang.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. |
boolean |
isFiltered()
Returns whether this match is filtered or not. |
void |
setFiltered(boolean value)
Marks this match as filtered or not. |
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(java.lang.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 match
public Match(java.lang.Object element,
int offset,
int length)
element - the element that contains the matchoffset - the offset the match starts atlength - the length of the match| Method 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 java.lang.Object getElement()
public int getBaseUnit()
public void setFiltered(boolean value)
value - true if the match is filtered;
otherwise falsepublic boolean isFiltered()
true if the match is filtered;
otherwise false- Since:
- 3.1
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.