File moduleFile,
IFile fileInWorkspace,
String searchString) throws CoreException
{
IWorkbenchPage page = getEditor().getSite().getPage();
IEditorPart editor = page.findEditor(new FileEditorInput(fileInWorkspace));
if (editor instanceof PerlEditor)
{
return searchEditor((PerlEditor) editor, searchString);
}
else
{
Result res = searchExternalFile(moduleFile, searchString);
if (!res.isFound()) return res;
try
{
FileEditorInput input = new FileEditorInput(fileInWorkspace);
PerlEditor newEditor = (PerlEditor)
getEditor().getSite().getPage().openEditor(
input,
getEditor().getSite().getId());