use of net.heartsome.cat.ts.websearch.ui.view.BrowserViewPart in project translationstudio8 by heartsome.
the class WebSearchHandler method execute.
/** (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
IEditorPart editor = HandlerUtil.getActiveEditor(event);
String selectPureText = "";
if (editor instanceof IXliffEditor) {
IXliffEditor xliffEditor = (IXliffEditor) editor;
selectPureText = xliffEditor.getSelectPureText();
}
try {
IViewPart showView = getActivePage().showView(BrowserViewPart.ID);
if (showView instanceof BrowserViewPart) {
BrowserViewPart browserViewPart = (BrowserViewPart) showView;
browserViewPart.setKeyWord(selectPureText, true);
}
} catch (PartInitException e) {
e.printStackTrace();
logger.error("", e);
}
return null;
}
Aggregations