summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-07 00:30:28 (EDT)
committerEike Stepper2007-10-07 00:30:28 (EDT)
commit0dde6f02d92f0f2519921b7e457ae99fdeb3101a (patch)
tree5b2726b107ec151bd4576cac5e33f8d3578b616c
parent824fee0545cbddf45180f2efb84aa764d92a29cc (diff)
downloadcdo-0dde6f02d92f0f2519921b7e457ae99fdeb3101a.zip
cdo-0dde6f02d92f0f2519921b7e457ae99fdeb3101a.tar.gz
cdo-0dde6f02d92f0f2519921b7e457ae99fdeb3101a.tar.bz2
[205651] Implement transaction rollback
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205651
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateCommitAction.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RollbackTransactionAction.java (renamed from plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateRollbackAction.java)4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java8
3 files changed, 6 insertions, 31 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateCommitAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateCommitAction.java
deleted file mode 100644
index 1b0cc58..0000000
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateCommitAction.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.eclipse.emf.cdo.internal.ui.actions;
-
-import org.eclipse.emf.cdo.CDOView;
-
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * @author Eike Stepper
- */
-public final class CreateCommitAction extends ViewAction
-{
- private static final String TITLE = "Commit";
-
- public CreateCommitAction(IWorkbenchPage page, CDOView view)
- {
- super(page, TITLE, "Commit this transaction", null, view);
- setEnabled(getTransaction().isDirty());
- }
-
- @Override
- protected void doRun() throws Exception
- {
- getTransaction().commit();
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateRollbackAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RollbackTransactionAction.java
index 18bdd29..fc064b8 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateRollbackAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RollbackTransactionAction.java
@@ -7,11 +7,11 @@ import org.eclipse.ui.IWorkbenchPage;
/**
* @author Eike Stepper
*/
-public final class CreateRollbackAction extends ViewAction
+public final class RollbackTransactionAction extends ViewAction
{
private static final String TITLE = "Rollback";
- public CreateRollbackAction(IWorkbenchPage page, CDOView view)
+ public RollbackTransactionAction(IWorkbenchPage page, CDOView view)
{
super(page, TITLE, "Rollback this transaction", null, view);
setEnabled(getTransaction().isDirty());
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java
index b204523..6cf7dc3 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java
@@ -20,9 +20,9 @@ import org.eclipse.emf.cdo.CDOViewEvent;
import org.eclipse.emf.cdo.internal.ui.SharedIcons;
import org.eclipse.emf.cdo.internal.ui.actions.CloseSessionAction;
import org.eclipse.emf.cdo.internal.ui.actions.CloseViewAction;
-import org.eclipse.emf.cdo.internal.ui.actions.CreateCommitAction;
+import org.eclipse.emf.cdo.internal.ui.actions.CommitTransactionAction;
import org.eclipse.emf.cdo.internal.ui.actions.CreateResourceAction;
-import org.eclipse.emf.cdo.internal.ui.actions.CreateRollbackAction;
+import org.eclipse.emf.cdo.internal.ui.actions.RollbackTransactionAction;
import org.eclipse.emf.cdo.internal.ui.actions.LoadResourceAction;
import org.eclipse.emf.cdo.internal.ui.actions.ManagePackagesAction;
import org.eclipse.emf.cdo.internal.ui.actions.OpenAuditAction;
@@ -289,8 +289,8 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
if (view.getViewType() == CDOView.Type.TRANSACTION)
{
manager.add(new CreateResourceAction(page, view));
- manager.add(new CreateCommitAction(page, view));
- manager.add(new CreateRollbackAction(page, view));
+ manager.add(new CommitTransactionAction(page, view));
+ manager.add(new RollbackTransactionAction(page, view));
}
manager.add(new Separator());