@Override public void modify(T facet, Object value, IUndoContext undoContext) { IUndoableOperation operation = new PropertyDescriptorUpdateOperation("Set value", facet, itemPropertyDescriptor, value); operation = EMFDetailUtils.addContributorOperations(operation, facet, itemPropertyDescriptor, value); operation.addContext(undoContext); IWorkbenchOperationSupport operationSupport = PlatformUI.getWorkbench().getOperationSupport(); IOperationHistory operationHistory = operationSupport.getOperationHistory(); try { IStatus execute = operationHistory.execute(operation, null, null); if(execute.matches(IStatus.ERROR)) { throw new ExecutionException(execute.getMessage()); } } catch (ExecutionException e) { LogUtil.error(e); } }
@Override public IWorkbenchOperationSupport getOperationSupport() { // TODO Auto-generated method stub return null; }
/** * <p> * Returns the undoable operation support for the workbench. * </p> * * @return the workbench operation support * * @since 3.1 */ public IWorkbenchOperationSupport getOperationSupport();