use of org.eclipse.ui.IViewPart in project translationstudio8 by heartsome.
the class AcceptTerm5 method execute.
/** (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("net.heartsome.cat.ts.ui.term.view.termView");
if (viewPart != null && viewPart instanceof ITermViewPart) {
ITermViewPart matchView = (ITermViewPart) viewPart;
matchView.acceptTermByIndex(4);
}
return null;
}
use of org.eclipse.ui.IViewPart in project translationstudio8 by heartsome.
the class AcceptTerm7 method execute.
/** (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("net.heartsome.cat.ts.ui.term.view.termView");
if (viewPart != null && viewPart instanceof ITermViewPart) {
ITermViewPart matchView = (ITermViewPart) viewPart;
matchView.acceptTermByIndex(6);
}
return null;
}
use of org.eclipse.ui.IViewPart in project translationstudio8 by heartsome.
the class AcceptTerm8 method execute.
/** (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("net.heartsome.cat.ts.ui.term.view.termView");
if (viewPart != null && viewPart instanceof ITermViewPart) {
ITermViewPart matchView = (ITermViewPart) viewPart;
matchView.acceptTermByIndex(7);
}
return null;
}
use of org.eclipse.ui.IViewPart in project translationstudio8 by heartsome.
the class AcceptTerm9 method execute.
/** (non-Javadoc)
* @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("net.heartsome.cat.ts.ui.term.view.termView");
if (viewPart != null && viewPart instanceof ITermViewPart) {
ITermViewPart matchView = (ITermViewPart) viewPart;
matchView.acceptTermByIndex(8);
}
return null;
}
use of org.eclipse.ui.IViewPart 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