Eclipse >> Undoable operation >> Workspace context
// get the operation history
IOperationHistory history = OperationHistoryFactory.getOperationHistory();
// obtain the appropriate undo context for my model
IUndoContext workspaceContext = (IUndoContext)ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
if (workspaceContext != null) {
// create an operation and assign it the context
}