Search in sources :

Example 1 with ITermViewPart

use of net.heartsome.cat.ts.ui.view.ITermViewPart in project translationstudio8 by heartsome.

the class AcceptTerm0 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(10);
    }
    return null;
}
Also used : IViewPart(org.eclipse.ui.IViewPart) ITermViewPart(net.heartsome.cat.ts.ui.view.ITermViewPart)

Example 2 with ITermViewPart

use of net.heartsome.cat.ts.ui.view.ITermViewPart in project translationstudio8 by heartsome.

the class AcceptTerm1 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(0);
    }
    return null;
}
Also used : IViewPart(org.eclipse.ui.IViewPart) ITermViewPart(net.heartsome.cat.ts.ui.view.ITermViewPart)

Example 3 with ITermViewPart

use of net.heartsome.cat.ts.ui.view.ITermViewPart in project translationstudio8 by heartsome.

the class AcceptTerm2 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(1);
    }
    return null;
}
Also used : IViewPart(org.eclipse.ui.IViewPart) ITermViewPart(net.heartsome.cat.ts.ui.view.ITermViewPart)

Example 4 with ITermViewPart

use of net.heartsome.cat.ts.ui.view.ITermViewPart in project translationstudio8 by heartsome.

the class AcceptTerm4 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(3);
    }
    return null;
}
Also used : IViewPart(org.eclipse.ui.IViewPart) ITermViewPart(net.heartsome.cat.ts.ui.view.ITermViewPart)

Example 5 with ITermViewPart

use of net.heartsome.cat.ts.ui.view.ITermViewPart 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;
}
Also used : IViewPart(org.eclipse.ui.IViewPart) ITermViewPart(net.heartsome.cat.ts.ui.view.ITermViewPart)

Aggregations

ITermViewPart (net.heartsome.cat.ts.ui.view.ITermViewPart)10 IViewPart (org.eclipse.ui.IViewPart)10