public void run() {
ISearchResultViewPart view = NewSearchUI.activateSearchResultView();
if (view != null) {
ISearchResultPage page = view.getActivePage();
if (page instanceof FileSearchPage) {
FileSearchPage filePage = (FileSearchPage) page;
Object[] elements = filePage.getInput().getElements();
IFile[] files = new IFile[elements.length];
System.arraycopy(elements, 0, files, 0, files.length);
new ReplaceAction2(filePage, files).run();
}
}