Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/plugins/org.eclipse.papyrus.integrationtests.editor/src/org/eclipse/papyrus/integrationtests/editor/operationhistory/OperationHistoryHandler.java')
-rw-r--r--tests/integration/plugins/org.eclipse.papyrus.integrationtests.editor/src/org/eclipse/papyrus/integrationtests/editor/operationhistory/OperationHistoryHandler.java103
1 files changed, 0 insertions, 103 deletions
diff --git a/tests/integration/plugins/org.eclipse.papyrus.integrationtests.editor/src/org/eclipse/papyrus/integrationtests/editor/operationhistory/OperationHistoryHandler.java b/tests/integration/plugins/org.eclipse.papyrus.integrationtests.editor/src/org/eclipse/papyrus/integrationtests/editor/operationhistory/OperationHistoryHandler.java
deleted file mode 100644
index 1c4bd1d940f..00000000000
--- a/tests/integration/plugins/org.eclipse.papyrus.integrationtests.editor/src/org/eclipse/papyrus/integrationtests/editor/operationhistory/OperationHistoryHandler.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 Cedric Dumoulin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.integrationtests.editor.operationhistory;
-
-import org.eclipse.core.commands.operations.IOperationHistory;
-import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.integrationtests.editor.ExecutionException;
-import org.eclipse.papyrus.integrationtests.editor.ProgramaticPapyrusEditor;
-
-
-/**
- * A handler allowing to perform undo and redo through the {@link IOperationHistory}
- *
- *
- * @author cedric dumoulin
- *
- */
-public class OperationHistoryHandler implements IOperationHistoryHandler {
-
- /** The papyrus editor. */
- protected IMultiDiagramEditor papyrusEditor;
-
- protected IOperationHistory history;
-
- private IUndoContext papyrusContext;
-
- /**
- * Constructor.
- *
- * @param papyrusEditor
- * @throws ServiceException
- */
- public OperationHistoryHandler(ProgramaticPapyrusEditor handler) throws ServiceException {
- this.papyrusEditor = handler.getEditor();
- history = papyrusEditor.getSite().getWorkbenchWindow().getWorkbench().getOperationSupport().getOperationHistory();
- papyrusContext = handler.getServiceRegistry().getService(IUndoContext.class);
- }
-
- public IOperationHistory getIOperationHistory() {
- return history;
- }
-
- /**
- *
- * @return
- */
- @Override
- public boolean canRedo() {
- return history.canRedo(papyrusContext);
- }
-
- /**
- * @see org.eclipse.papyrus.integrationtests.editor.operationhistory.IOperationHistoryHandler#redo()
- *
- * @throws ExecutionException
- */
- @Override
- public void redo() throws ExecutionException {
- try {
- history.redo(papyrusContext, null, null);
- } catch (org.eclipse.core.commands.ExecutionException e) {
- throw new ExecutionException(e);
- }
- }
-
- /**
- *
- * @return
- */
- @Override
- public boolean canUndo() {
- return history.canUndo(papyrusContext);
- }
-
- /**
- * @see org.eclipse.papyrus.integrationtests.editor.operationhistory.IOperationHistoryHandler#undo()
- *
- * @throws ExecutionException
- */
- @Override
- public void undo() throws ExecutionException {
- try {
- history.undo(papyrusContext, null, null);
- } catch (org.eclipse.core.commands.ExecutionException e) {
- throw new ExecutionException(e);
- }
- }
-
-}

Back to the top