Search in sources :

Example 16 with IViewPart

use of org.eclipse.ui.IViewPart in project translationstudio8 by heartsome.

the class AcceptMatch1 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.translation.view.matchview");
    if (viewPart != null && viewPart instanceof IMatchViewPart) {
        IMatchViewPart matchView = (IMatchViewPart) viewPart;
        matchView.acceptMatchByIndex(0);
    }
    return null;
}
Also used : IViewPart(org.eclipse.ui.IViewPart) IMatchViewPart(net.heartsome.cat.ts.ui.view.IMatchViewPart)

Example 17 with IViewPart

use of org.eclipse.ui.IViewPart 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 18 with IViewPart

use of org.eclipse.ui.IViewPart 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 19 with IViewPart

use of org.eclipse.ui.IViewPart 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 20 with IViewPart

use of org.eclipse.ui.IViewPart 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)

Aggregations

IViewPart (org.eclipse.ui.IViewPart)95 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)52 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)38 IEditorPart (org.eclipse.ui.IEditorPart)31 PartInitException (org.eclipse.ui.PartInitException)25 IViewReference (org.eclipse.ui.IViewReference)23 IFile (org.eclipse.core.resources.IFile)15 ArrayList (java.util.ArrayList)14 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)14 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)14 IEditorInput (org.eclipse.ui.IEditorInput)11 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)10 IXliffEditor (net.heartsome.cat.ts.ui.editors.IXliffEditor)10 ITermViewPart (net.heartsome.cat.ts.ui.view.ITermViewPart)10 IWorkbenchPart (org.eclipse.ui.IWorkbenchPart)10 Shell (org.eclipse.swt.widgets.Shell)9 IEditorReference (org.eclipse.ui.IEditorReference)9 XLFHandler (net.heartsome.cat.ts.core.file.XLFHandler)8 XLIFFEditorImplWithNatTable (net.heartsome.cat.ts.ui.xliffeditor.nattable.editor.XLIFFEditorImplWithNatTable)8 IProject (org.eclipse.core.resources.IProject)8