|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Computes a score that is used by the search dialog
to find the best fitting page for a selection when opened.
The score has no upper limit but must be at least
LOWEST
. Higher values means the page is better
suited for the given selection input.
For example, a Java-specific search page score computer could test if the page is a Java search page and returns high scores for Java elements as selection input.
Field Summary | |
static int |
LOWEST
Lowest possible valid score. |
static int |
UNKNOWN
Invalid score value indicating a score is unknown or undecided. |
Method Summary | |
int |
computeScore(String pageId,
Object input)
Computes and returns a score indicating how good the page with the given id can handle the given input element. |
Field Detail |
public static final int UNKNOWN
public static final int LOWEST
Method Detail |
public int computeScore(String pageId, Object input)
id
attribute of the
<page>
element contributed to the
search pages extension point ("org.eclipse.search.searchPages"
).
pageId
- the string id of the page for which the score is computedinput
- the object based on which the page should open
LOWEST
, or
UNKNOWN
if this computer cannot decide
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |