本文整理汇总了Java中org.eclipse.core.commands.operations.IOperationHistory.getUndoHistory方法的典型用法代码示例。如果您正苦于以下问题:Java IOperationHistory.getUndoHistory方法的具体用法?Java IOperationHistory.getUndoHistory怎么用?Java IOperationHistory.getUndoHistory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.commands.operations.IOperationHistory
的用法示例。
在下文中一共展示了IOperationHistory.getUndoHistory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: theLastOperationCreatedTheElement
import org.eclipse.core.commands.operations.IOperationHistory; //导入方法依赖的package包/类
private boolean theLastOperationCreatedTheElement(final EObject theSemanticElement,
final IWorkspaceCommandStack theWorkspaceCommandStack) {
final IOperationHistory operationHistory = theWorkspaceCommandStack.getOperationHistory();
final IUndoableOperation[] undoHistory = operationHistory.getUndoHistory(theWorkspaceCommandStack
.getDefaultUndoContext());
return undoHistory.length > 0
&& theSemanticElement == getCreatedElement(undoHistory[undoHistory.length - 1],
theSemanticElement.getClass());
}
开发者ID:info-sharing-environment,项目名称:NIEM-Modeling-Tool,代码行数:10,代码来源:ClassifierNamePopupEditorConfiguration.java
示例2: after
import org.eclipse.core.commands.operations.IOperationHistory; //导入方法依赖的package包/类
@Override
protected final void after() {
final IOperationHistory theOperationHistory = theWorkspaceCommandStack.getOperationHistory();
final IUndoContext theDefaultUndoContext = theWorkspaceCommandStack.getDefaultUndoContext();
final IUndoableOperation[] theUndoHistory = theOperationHistory.getUndoHistory(theDefaultUndoContext);
final IUndoableOperation theEditLabelOperation = theUndoHistory[theUndoHistory.length - 1];
final IUndoableOperation theCreateElementOperation = theUndoHistory[theUndoHistory.length - 2];
final IOperationHistoryListener theOperationHistoryListener = new AtomicElementLabelingSupport(
theWorkspaceCommandStack, theEditLabelOperation, theCreateElementOperation);
theOperationHistory.addOperationHistoryListener(theOperationHistoryListener);
}
开发者ID:info-sharing-environment,项目名称:NIEM-Modeling-Tool,代码行数:12,代码来源:ClassifierNamePopupEditorConfiguration.java