Search in sources :

Example 6 with IMatchViewPart

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

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

Aggregations

IMatchViewPart (net.heartsome.cat.ts.ui.view.IMatchViewPart)6 IViewPart (org.eclipse.ui.IViewPart)6 XLFHandler (net.heartsome.cat.ts.core.file.XLFHandler)2 IEditorPart (org.eclipse.ui.IEditorPart)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Entry (java.util.Map.Entry)1 ImportException (net.heartsome.cat.common.core.exception.ImportException)1 IXliffEditor (net.heartsome.cat.ts.ui.editors.IXliffEditor)1 XLIFFEditorImplWithNatTable (net.heartsome.cat.ts.ui.xliffeditor.nattable.editor.XLIFFEditorImplWithNatTable)1 AutomaticQATrigger (net.heartsome.cat.ts.ui.xliffeditor.nattable.qa.AutomaticQATrigger)1 NattableUtil (net.heartsome.cat.ts.ui.xliffeditor.nattable.utils.NattableUtil)1 IProject (org.eclipse.core.resources.IProject)1 Color (org.eclipse.swt.graphics.Color)1 Device (org.eclipse.swt.graphics.Device)1 RGB (org.eclipse.swt.graphics.RGB)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)1