Search in sources :

Example 6 with ExecutionException

use of org.eclipse.core.commands.ExecutionException in project translationstudio8 by heartsome.

the class PreTranslationHandler method execute.

@Override
public Object execute(ExecutionEvent event, List<IFile> list) {
    // 首先验证是否是合并打开的文件 --robert 2012-10-17
    if (isEditor) {
        try {
            IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
            IEditorReference[] editorRefe = window.getActivePage().findEditors(new FileEditorInput(list.get(0)), XLIFF_EDITOR_ID, IWorkbenchPage.MATCH_INPUT | IWorkbenchPage.MATCH_ID);
            if (editorRefe.length <= 0) {
                return null;
            }
            IXliffEditor xlfEditor = (IXliffEditor) editorRefe[0].getEditor(true);
            // 针对合并打开
            if (xlfEditor.isMultiFile()) {
                list = ResourceUtils.filesToIFiles(xlfEditor.getMultiFileList());
            }
        } catch (ExecutionException e) {
            logger.error("", e);
        }
    }
    CommonFunction.removeRepeateSelect(list);
    PreTransUitls.executeTranslation(list, shell);
    return null;
}
Also used : IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) IEditorReference(org.eclipse.ui.IEditorReference) FileEditorInput(org.eclipse.ui.part.FileEditorInput) ExecutionException(org.eclipse.core.commands.ExecutionException) IXliffEditor(net.heartsome.cat.ts.ui.editors.IXliffEditor)

Example 7 with ExecutionException

use of org.eclipse.core.commands.ExecutionException in project translationstudio8 by heartsome.

the class BatchQAHandler method execute.

@SuppressWarnings("unchecked")
public Object execute(ExecutionEvent event) throws ExecutionException {
    isMultiFile = false;
    preferenceStore = Activator.getDefault().getPreferenceStore();
    // UNDO 如果焦点在其他视图上时,获取的文件错误。
    IFile multiTempIFile = null;
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
    final Shell shell = window.getShell();
    //		ISelection currentSelection = HandlerUtil.getCurrentSelection(event);
    IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("net.heartsome.cat.common.ui.navigator.view");
    ArrayList<IFile> selectIFiles = new ArrayList<IFile>();
    if (HandlerUtil.getActivePart(event) instanceof IViewPart) {
        ISelection currentSelection = (StructuredSelection) viewPart.getSite().getSelectionProvider().getSelection();
        if (currentSelection != null && !currentSelection.isEmpty() && currentSelection instanceof IStructuredSelection) {
            IStructuredSelection structuredSelection = (IStructuredSelection) currentSelection;
            Iterator<Object> selectIt = structuredSelection.iterator();
            while (selectIt.hasNext()) {
                Object object = selectIt.next();
                if (object instanceof IFile) {
                    IFile selectFile = (IFile) object;
                    String fileExtension = selectFile.getFileExtension();
                    // 如果后缀名不是xlf,那么就进行提示
                    if (fileExtension == null || !CommonFunction.validXlfExtension(fileExtension)) {
                        boolean isSure = MessageDialog.openConfirm(shell, Messages.getString("qa.all.dialog.warning"), MessageFormat.format(Messages.getString("qa.all.tip.notXliff"), new Object[] { selectFile.getFullPath() }));
                        if (!isSure) {
                            return null;
                        }
                        continue;
                    }
                    selectIFiles.add(selectFile);
                } else if (object instanceof IProject) {
                    IProject selectProject = (IProject) object;
                    try {
                        ResourceUtils.getXliffs(selectProject, selectIFiles);
                    } catch (Exception e) {
                        e.printStackTrace();
                        logger.error(Messages.getString("qa.handlers.BatchQAHandler.log1"), e);
                    }
                } else if (object instanceof IContainer) {
                    IContainer selectContainer = (IContainer) object;
                    try {
                        ResourceUtils.getXliffs(selectContainer, selectIFiles);
                    } catch (Exception e) {
                        logger.error(Messages.getString("qa.handlers.BatchQAHandler.log1"), e);
                        e.printStackTrace();
                    }
                }
            }
        }
    } else {
        //如果左边未选择品质检查的类型,那么,获取nattable中打开的文件
        IEditorPart activeEditor = HandlerUtil.getActiveEditor(event);
        String XLIFF_EDITOR_ID = "net.heartsome.cat.ts.ui.xliffeditor.nattable.editor";
        if (activeEditor != null && !activeEditor.getSite().getId().equals(XLIFF_EDITOR_ID)) {
            MessageDialog.openWarning(shell, Messages.getString("qa.all.dialog.warning"), Messages.getString("qa.handlers.BatchQAHandler.tip2"));
            return null;
        }
        XLIFFEditorImplWithNatTable nattable = (XLIFFEditorImplWithNatTable) activeEditor;
        isMultiFile = nattable.isMultiFile();
        multiTempIFile = ((FileEditorInput) nattable.getEditorInput()).getFile();
        if (isMultiFile) {
            List<String> multiFilesList = new XLFHandler().getMultiFiles(multiTempIFile);
            for (String multiFileStr : multiFilesList) {
                selectIFiles.add(ResourceUtils.fileToIFile(multiFileStr));
            }
        } else {
            selectIFiles.add(multiTempIFile);
        }
    }
    CommonFunction.removeRepeateSelect(selectIFiles);
    if (selectIFiles.size() == 0) {
        MessageDialog.openWarning(shell, Messages.getString("qa.all.dialog.warning"), Messages.getString("qa.handlers.BatchQAHandler.tip1"));
        return null;
    }
    List<IFile> lstFiles = new ArrayList<IFile>();
    XLFValidator.resetFlag();
    for (IFile iFile : selectIFiles) {
        if (!XLFValidator.validateXliffFile(iFile)) {
            lstFiles.add(iFile);
        }
    }
    XLFValidator.resetFlag();
    selectIFiles.removeAll(lstFiles);
    if (selectIFiles.size() == 0) {
        return null;
    }
    model = new QAModel();
    model.setQaXlfList(selectIFiles);
    quality = new QualityAssurance(model);
    BatchQADialog dialog = new BatchQADialog(shell, model, isMultiFile);
    int result = dialog.open();
    if (result == IDialogConstants.OK_ID) {
        // 先调用方法,查看品质检查结果视图是否处于显示状态,如果显示了的。删除数据
        IWorkbenchPage workbenchPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IViewPart view = workbenchPage.findView(QAResultViewPart.ID);
        if (view != null) {
            // 运行时,将结果视图中列表的数据清除
            ((QAResultViewPart) view).clearTableData();
        }
        QAResult qaResult = new QAResult();
        // 存储品质检查的检查项
        model.setBatchQAItemIdList(getBatchQAItems());
        // 存储品质检查的检查时不包括的文本段
        model.setNotInclude(getNotIncludePara());
        //给品质检查结果视图发出通告,本次检查对象为合并打开文件
        //			qaResult.firePropertyChange(isMultiFile, new MultiFilesOper(selectIFiles.get(0).getProject(), selectIFiles, multiTempIFile));
        // 将当前所处理的文件传至 qaResult
        List<String> fileList = new ArrayList<String>();
        for (IFile iFIle : model.getQaXlfList()) {
            fileList.add(iFIle.getLocation().toOSString());
        }
        qaResult.setFilePathList(fileList);
        HsMultiActiveCellEditor.commit(true);
        if (isMultiFile) {
            model.setMuliFiles(true);
            model.setMultiOper(new MultiFilesOper(selectIFiles.get(0).getProject(), selectIFiles, multiTempIFile));
            qaResult.setMultiOper(model.getMultiOper());
            quality.beginMultiFileQA(qaResult);
        } else {
            model.setMuliFiles(false);
            qaResult.setMultiOper(model.getMultiOper());
            quality.beginQA(qaResult);
        }
    }
    return null;
}
Also used : IViewPart(org.eclipse.ui.IViewPart) XLIFFEditorImplWithNatTable(net.heartsome.cat.ts.ui.xliffeditor.nattable.editor.XLIFFEditorImplWithNatTable) IFile(org.eclipse.core.resources.IFile) ArrayList(java.util.ArrayList) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) QualityAssurance(net.heartsome.cat.ts.ui.qa.QualityAssurance) QAModel(net.heartsome.cat.ts.ui.qa.model.QAModel) BatchQADialog(net.heartsome.cat.ts.ui.qa.dialogs.BatchQADialog) Shell(org.eclipse.swt.widgets.Shell) ISelection(org.eclipse.jface.viewers.ISelection) IContainer(org.eclipse.core.resources.IContainer) MultiFilesOper(net.heartsome.cat.ts.ui.util.MultiFilesOper) IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) IEditorPart(org.eclipse.ui.IEditorPart) QAResult(net.heartsome.cat.ts.ui.qa.model.QAResult) QAResultViewPart(net.heartsome.cat.ts.ui.qa.views.QAResultViewPart) IProject(org.eclipse.core.resources.IProject) ExecutionException(org.eclipse.core.commands.ExecutionException) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) XLFHandler(net.heartsome.cat.ts.core.file.XLFHandler)

Example 8 with ExecutionException

use of org.eclipse.core.commands.ExecutionException in project translationstudio8 by heartsome.

the class TerminologyViewPart method createAction.

/**
	 * 创建视图工具栏的按钮。
	 */
private void createAction() {
    firstAction = new Action() {

        @Override
        public void run() {
            if (rowIndex < 0) {
                return;
            }
            if (tempEditor == null || rowIndex < 0) {
                return;
            }
            TransUnitBean transUnit = tempEditor.getRowTransUnitBean(rowIndex);
            Hashtable<String, String> tuProp = transUnit.getTuProps();
            if (tuProp != null) {
                String translate = tuProp.get("translate");
                if (translate != null && translate.equalsIgnoreCase("no")) {
                    MessageDialog.openInformation(getSite().getShell(), Messages.getString("view.TerminologyViewPart.msgTitle"), Messages.getString("view.TerminologyViewPart.msg1"));
                    return;
                }
            }
            String tarTerm = "";
            GridItem[] items = gridTable.getSelection();
            if (items.length <= 0) {
                return;
            } else {
                tarTerm = items[0].getText(2);
            }
            try {
                tempEditor.insertCell(rowIndex, tempEditor.getTgtColumnIndex(), tarTerm);
            // tempEditor.setFocus(); // 焦点给回编辑器
            } catch (ExecutionException e) {
                if (Constant.RUNNING_MODE == Constant.MODE_DEBUG) {
                    e.printStackTrace();
                }
                MessageDialog.openInformation(parent.getShell(), Messages.getString("view.TerminologyViewPart.msgTitle"), Messages.getString("view.TerminologyViewPart.msg2") + e.getMessage());
            }
        }
    };
    firstAction.setText(Messages.getString("view.TerminologyViewPart.menu.inserttermtarget"));
    firstAction.setImageDescriptor(Activator.getIconDescriptor(ImageConstants.ACCPTE_TERM));
    firstAction.setToolTipText(Messages.getString("view.TerminologyViewPart.firstAction"));
    firstAction.setEnabled(false);
//getViewSite().getActionBars().getToolBarManager().add(firstAction);
}
Also used : Action(org.eclipse.jface.action.Action) TransUnitBean(net.heartsome.cat.ts.core.bean.TransUnitBean) Hashtable(java.util.Hashtable) ExecutionException(org.eclipse.core.commands.ExecutionException)

Example 9 with ExecutionException

use of org.eclipse.core.commands.ExecutionException in project translationstudio8 by heartsome.

the class OpenMultiXliffHandler method execute.

@SuppressWarnings("unchecked")
public Object execute(ExecutionEvent event) throws ExecutionException {
    IViewPart viewPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView("net.heartsome.cat.common.ui.navigator.view");
    ISelection currentSelection = (StructuredSelection) viewPart.getSite().getSelectionProvider().getSelection();
    if (currentSelection.isEmpty() || !(currentSelection instanceof IStructuredSelection)) {
        return null;
    }
    IStructuredSelection structuredSelection = (IStructuredSelection) currentSelection;
    Iterator<Object> selectIt = structuredSelection.iterator();
    final ArrayList<IFile> selectIFiles = new ArrayList<IFile>();
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
    shell = window.getShell();
    // 先验证是否跨项目
    IProject selectedProject = null;
    while (selectIt.hasNext()) {
        Object object = selectIt.next();
        if (object instanceof IFile) {
            IFile iFile = (IFile) object;
            if (!CommonFunction.validXlfExtension(iFile.getFileExtension())) {
                MessageDialog.openInformation(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle"), MessageFormat.format(Messages.getString("handlers.OpenMultiXliffHandler.msg1"), iFile.getFullPath().toOSString()));
                continue;
            }
            selectIFiles.add(iFile);
            if (selectedProject == null) {
                selectedProject = iFile.getProject();
            } else {
                if (selectedProject != iFile.getProject()) {
                    MessageDialog.openInformation(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle"), Messages.getString("handlers.OpenMultiXliffHandler.msg2"));
                    return null;
                }
            }
        } else if (object instanceof IContainer) {
            IContainer selectContainer = (IContainer) object;
            if (selectedProject == null) {
                selectedProject = selectContainer.getProject();
            }
            // 判断当前文件夹是否处于 XLIFF 文件夹下
            try {
                ResourceUtils.getXliffs(selectContainer, selectIFiles);
            } catch (CoreException e) {
                logger.error(Messages.getString("handlers.OpenMultiXliffHandler.logger1"), selectContainer.getFullPath().toOSString(), e);
            }
        }
    }
    // 过滤重复选择文件
    CommonFunction.removeRepeateSelect(selectIFiles);
    if (selectIFiles.size() < 2) {
        MessageDialog.openInformation(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle"), Messages.getString("handlers.OpenMultiXliffHandler.msg3"));
        return null;
    }
    MultiFilesOper oper = new MultiFilesOper(selectedProject, selectIFiles);
    // 先验证这些文件是否已经合并打开,如果是,则退出
    if (oper.validExist()) {
        return null;
    }
    // 判断是否有重复打开的文件,并删除缓存中要合并打开的文件。
    if (oper.hasOpenedIFile()) {
        if (oper.getSelectIFiles().size() <= 0) {
            MessageDialog.openInformation(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle"), Messages.getString("handlers.OpenMultiXliffHandler.msg4"));
            return null;
        } else {
            boolean isResponse = MessageDialog.openConfirm(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle2"), Messages.getString("handlers.OpenMultiXliffHandler.msg5"));
            if (isResponse) {
                if (oper.getSelectIFiles().size() < 2) {
                    MessageDialog.openInformation(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle"), Messages.getString("handlers.OpenMultiXliffHandler.msg6"));
                    return null;
                }
            } else {
                return null;
            }
        }
    }
    final IFile multiIFile = oper.createMultiTempFile();
    if (multiIFile != null && multiIFile.exists()) {
        IRunnableWithProgress runnable = new IRunnableWithProgress() {

            public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                monitor.beginTask(Messages.getString("handler.OpenMultiXliffHandler.tip1"), 10);
                IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 7, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
                // 进行判断所选择文件的语言对是否符合标准,先解析文件
                final XLFHandler xlfHander = new XLFHandler();
                final Map<String, Object> newResultMap = xlfHander.openFiles(ResourceUtils.iFilesToFiles(selectIFiles), subMonitor);
                // 针对解析失败
                if (newResultMap == null || QAConstant.RETURNVALUE_RESULT_SUCCESSFUL != (Integer) newResultMap.get(QAConstant.RETURNVALUE_RESULT)) {
                    Display.getDefault().syncExec(new Runnable() {

                        public void run() {
                            MessageDialog.openInformation(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle"), (String) newResultMap.get(Constant.RETURNVALUE_MSG));
                        }
                    });
                    return;
                }
                // 验证是否有多个语言
                boolean hasDiffrentLangPair = false;
                Map<String, ArrayList<String>> langMap = xlfHander.getLanguages();
                if (langMap.size() > 1) {
                    hasDiffrentLangPair = true;
                } else {
                    for (Entry<String, ArrayList<String>> entry : langMap.entrySet()) {
                        if (entry.getValue().size() > 1) {
                            hasDiffrentLangPair = true;
                        }
                    }
                }
                if (monitor.isCanceled()) {
                    return;
                }
                monitor.worked(1);
                if (hasDiffrentLangPair) {
                    Display.getDefault().syncExec(new Runnable() {

                        public void run() {
                            MessageDialog.openInformation(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle"), Messages.getString("handlers.OpenMultiXliffHandler.msg7"));
                        }
                    });
                    // 先删除临时文件,再退出
                    try {
                        multiIFile.delete(true, monitor);
                    } catch (CoreException e) {
                        logger.error(Messages.getString("handlers.OpenMultiXliffHandler.logger2"), e);
                    }
                    return;
                }
                final boolean[] validateResult = new boolean[] { false };
                Display.getDefault().syncExec(new Runnable() {

                    public void run() {
                        validateResult[0] = XLFValidator.validateXlifIFiles(selectIFiles);
                    }
                });
                if (!validateResult[0]) {
                    try {
                        multiIFile.delete(true, monitor);
                    } catch (CoreException e) {
                        logger.error(Messages.getString("handlers.OpenMultiXliffHandler.logger2"), e);
                    }
                    return;
                }
                final FileEditorInput input = new FileEditorInput(multiIFile);
                if (monitor.isCanceled()) {
                    return;
                }
                monitor.worked(1);
                Display.getDefault().syncExec(new Runnable() {

                    public void run() {
                        try {
                            // UNDO 这里合并打开时,要考虑传入参数xlfHandler,以防多次解析文件带来的消耗。
                            PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, XLIFF_EDITOR_ID, true);
                        } catch (PartInitException e) {
                            e.printStackTrace();
                        }
                    }
                });
                if (monitor.isCanceled()) {
                    return;
                }
                monitor.worked(1);
                monitor.done();
            }
        };
        try {
            new ProgressMonitorDialog(shell).run(true, true, runnable);
        } catch (Exception e) {
            logger.error(Messages.getString("handlers.OpenMultiXliffHandler.logger3"), e);
        }
    } else {
        MessageDialog.openInformation(shell, Messages.getString("handlers.OpenMultiXliffHandler.msgTitle"), Messages.getString("handlers.OpenMultiXliffHandler.msg8"));
        return null;
    }
    return null;
}
Also used : IViewPart(org.eclipse.ui.IViewPart) IFile(org.eclipse.core.resources.IFile) StructuredSelection(org.eclipse.jface.viewers.StructuredSelection) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) ArrayList(java.util.ArrayList) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) IRunnableWithProgress(org.eclipse.jface.operation.IRunnableWithProgress) ISelection(org.eclipse.jface.viewers.ISelection) PartInitException(org.eclipse.ui.PartInitException) IContainer(org.eclipse.core.resources.IContainer) MultiFilesOper(net.heartsome.cat.ts.ui.util.MultiFilesOper) IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) ProgressMonitorDialog(org.eclipse.jface.dialogs.ProgressMonitorDialog) IProject(org.eclipse.core.resources.IProject) SubProgressMonitor(org.eclipse.core.runtime.SubProgressMonitor) CoreException(org.eclipse.core.runtime.CoreException) PartInitException(org.eclipse.ui.PartInitException) ExecutionException(org.eclipse.core.commands.ExecutionException) InvocationTargetException(java.lang.reflect.InvocationTargetException) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) CoreException(org.eclipse.core.runtime.CoreException) FileEditorInput(org.eclipse.ui.part.FileEditorInput) XLFHandler(net.heartsome.cat.ts.core.file.XLFHandler)

Example 10 with ExecutionException

use of org.eclipse.core.commands.ExecutionException in project translationstudio8 by heartsome.

the class FindReplaceDialog method doReplaceAll.

/**
	 * 替换全部 ;
	 */
private void doReplaceAll() {
    XLIFFEditorImplWithNatTable editor = XLIFFEditorImplWithNatTable.getCurrent();
    if (editor == null) {
        return;
    }
    CellRegion cellRegion = null;
    if (editor.isHorizontalLayout()) {
        cellRegion = find(0, 0);
    } else {
        cellRegion = find(1, 0);
    }
    if (cellRegion == null) {
        // 无查找结果
        return;
    }
    boolean forward = forwardButton.getSelection();
    if (!forward) {
        forwardButton.setSelection(true);
    }
    int firstRowPosition = cellRegion.getPositionCoordinate().getRowPosition();
    HashMap<String, String> segments = new HashMap<String, String>();
    int count = 0;
    String findStr = cmbFind.getText();
    String replaceStr = cmbReplace.getText();
    do {
        PositionCoordinate coordinate = cellRegion.getPositionCoordinate();
        int rowPosition = coordinate.rowPosition;
        int columnPosition = coordinate.columnPosition;
        int rowIndex = coordinate.getLayer().getRowIndexByPosition(rowPosition);
        if (!editor.isHorizontalLayout()) {
            rowIndex = rowIndex / VerticalNatTableConfig.ROW_SPAN;
        }
        // 判断锁定
        TransUnitBean transUnit = editor.getRowTransUnitBean(rowIndex);
        String translate = transUnit.getTuProps().get("translate");
        if (translate != null && "no".equalsIgnoreCase(translate)) {
            rowPosition++;
            cellRegion = find(rowPosition, 0);
            continue;
        }
        String cellValue = (String) coordinate.getLayer().getDataValueByPosition(columnPosition, rowPosition);
        StringBuffer cellValueBf = new StringBuffer(cellValue);
        int start = cellValue.toUpperCase().indexOf(findStr.toUpperCase());
        while (start != -1) {
            cellValueBf.replace(start, start + findStr.length(), replaceStr);
            start = cellValueBf.indexOf(findStr, start);
            count++;
        }
        segments.put(editor.getXLFHandler().getRowId(rowIndex), cellValueBf.toString());
        rowPosition++;
        if (!editor.isHorizontalLayout()) {
            rowPosition++;
        }
        cellRegion = find(rowPosition, 0);
    } while (cellRegion.getPositionCoordinate().getRowPosition() != firstRowPosition);
    if (!forward) {
        forwardButton.setSelection(false);
        backwardButton.setSelection(true);
    }
    int columnIndex = 0;
    if (sourceButton.getSelection()) {
        columnIndex = editor.getSrcColumnIndex();
    } else {
        columnIndex = editor.getTgtColumnIndex();
    }
    try {
        editor.updateSegments(segments, columnIndex, null, null);
    } catch (ExecutionException e) {
        LOGGER.error(Messages.getString("dialog.FindReplaceDialog.logger1"), e);
    }
    String msg = Messages.getString("dialog.FindReplaceDialog.status3");
    statusLabel.setText(MessageFormat.format(msg, count));
    ActiveCellRegion.setActiveCellRegion(null);
}
Also used : XLIFFEditorImplWithNatTable(net.heartsome.cat.ts.ui.xliffeditor.nattable.editor.XLIFFEditorImplWithNatTable) TransUnitBean(net.heartsome.cat.ts.core.bean.TransUnitBean) CellRegion(net.heartsome.cat.ts.ui.xliffeditor.nattable.search.coordinate.CellRegion) ActiveCellRegion(net.heartsome.cat.ts.ui.xliffeditor.nattable.search.coordinate.ActiveCellRegion) HashMap(java.util.HashMap) PositionCoordinate(net.sourceforge.nattable.coordinate.PositionCoordinate) ExecutionException(org.eclipse.core.commands.ExecutionException) Point(org.eclipse.swt.graphics.Point)

Aggregations

ExecutionException (org.eclipse.core.commands.ExecutionException)47 CoreException (org.eclipse.core.runtime.CoreException)18 IFile (org.eclipse.core.resources.IFile)13 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)12 ArrayList (java.util.ArrayList)11 IEditorPart (org.eclipse.ui.IEditorPart)11 IStatus (org.eclipse.core.runtime.IStatus)9 IRunnableWithProgress (org.eclipse.jface.operation.IRunnableWithProgress)9 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)9 InvocationTargetException (java.lang.reflect.InvocationTargetException)8 XLFHandler (net.heartsome.cat.ts.core.file.XLFHandler)8 IProject (org.eclipse.core.resources.IProject)8 Status (org.eclipse.core.runtime.Status)8 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)8 List (java.util.List)7 XLIFFEditorImplWithNatTable (net.heartsome.cat.ts.ui.xliffeditor.nattable.editor.XLIFFEditorImplWithNatTable)7 NullProgressMonitor (org.eclipse.core.runtime.NullProgressMonitor)7 ISelection (org.eclipse.jface.viewers.ISelection)7 FileEditorInput (org.eclipse.ui.part.FileEditorInput)7 PartInitException (org.eclipse.ui.PartInitException)5