public boolean isShownInEditor(Match match, IEditorPart editor) {
boolean isShown = false;
IEditorInput ei = editor.getEditorInput();
if (ei instanceof IFileEditorInput) {
FileEditorInput fi = (FileEditorInput) ei;
isShown = match.getElement().equals(fi.getFile());
}
return isShown;
}
public Match[] computeContainedMatches(
AbstractTextSearchResult result, IEditorPart editor) {
Match matches [];
IEditorInput ei = editor.getEditorInput();
if (ei instanceof IFileEditorInput) {
FileEditorInput fi = (FileEditorInput) ei;
matches = getMatches(fi.getFile());
} else {
matches = new Match[0];
}
return matches;