use of net.heartsome.cat.ts.ui.xliffeditor.nattable.undoable.StateOperation in project translationstudio8 by heartsome.
the class NattableUtil method changeTgtState.
/**
* 改变Target的状态
* @param state
* 状态值("new", "final", "translated", "signed-off", "needs-adaptation", "needs-review-adaptation",
* "needs-l10n", "needs-review-l10n", "needs-translation", "needs-review-translation");
*/
public void changeTgtState(final List<String> selectedRowIds, final String state, IProgressMonitor monitor) {
if (monitor == null) {
monitor = new NullProgressMonitor();
}
monitor.beginTask(Messages.getString("utils.NattableUtil.task4"), 1);
monitor.worked(1);
final IOperationHistory operationHistory = OperationHistoryFactory.getOperationHistory();
final IProgressMonitor monitor2 = monitor;
Display.getDefault().syncExec(new Runnable() {
public void run() {
try {
operationHistory.execute(new StateOperation("State", xliffEditor.getTable(), selectedRowIds, xliffEditor.getXLFHandler(), state), monitor2, null);
} catch (ExecutionException e) {
LOGGER.error("", e);
MessageDialog.openError(xliffEditor.getSite().getShell(), Messages.getString("utils.NattableUtil.msgTitle2"), e.getMessage());
e.printStackTrace();
}
}
});
monitor.done();
}
Aggregations