summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-07 05:16:15 (EDT)
committerEike Stepper2007-10-07 05:16:15 (EDT)
commit6e4295e5e10bb0f0bb73e94d7c990f82cbbe4ed2 (patch)
tree0d8dbcafa8849c1da2e1ef68a7ec7859952130c6
parent3f0626c833d39355de60eab28d895bef72942001 (diff)
downloadcdo-6e4295e5e10bb0f0bb73e94d7c990f82cbbe4ed2.zip
cdo-6e4295e5e10bb0f0bb73e94d7c990f82cbbe4ed2.tar.gz
cdo-6e4295e5e10bb0f0bb73e94d7c990f82cbbe4ed2.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/ItemsProcessor.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseSessionAction.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseViewAction.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CommitTransactionAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateResourceAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ManagePackagesAction.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenAuditAction.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenResourceEditorAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenSessionAction.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenTransactionAction.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewAction.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewEditorAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterWorkspacePackagesAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RollbackTransactionAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOEventHandler.java48
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOItemProvider.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSessionInvalidationEvent.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionFinishedEvent.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionCommittedEvent.java)9
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionStartedEvent.java (renamed from plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionDirtyEvent.java)2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java5
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java45
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java131
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java8
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeAction.java2
29 files changed, 228 insertions, 122 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/ItemsProcessor.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/ItemsProcessor.java
index 55598d3..0943747 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/ItemsProcessor.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/ItemsProcessor.java
@@ -56,16 +56,14 @@ public abstract class ItemsProcessor
processObject(viewer, ids, viewer.getInput());
processItems(viewer, ids, viewer.getTree().getItems());
}
- catch (Exception ex)
+ catch (Exception ignore)
{
- ex.printStackTrace();
}
}
});
}
- catch (Exception ex)
+ catch (Exception ignore)
{
- ex.printStackTrace();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseSessionAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseSessionAction.java
index fe00dd9..00208f4 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseSessionAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseSessionAction.java
@@ -9,9 +9,13 @@ import org.eclipse.ui.IWorkbenchPage;
*/
public final class CloseSessionAction extends SessionAction
{
+ private static final String TITLE = "Close";
+
+ private static final String TOOL_TIP = "Close the CDO session";
+
public CloseSessionAction(IWorkbenchPage page, CDOSession session)
{
- super(page, "Close", "Close the CDO session", null, session);
+ super(page, TITLE, TOOL_TIP, null, session);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseViewAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseViewAction.java
index 445ffad..3baed06 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseViewAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CloseViewAction.java
@@ -9,9 +9,13 @@ import org.eclipse.ui.IWorkbenchPage;
*/
public final class CloseViewAction extends ViewAction
{
+ private static final String TITLE = "Close";
+
+ private static final String TOOL_TIP = "Close the CDO view";
+
public CloseViewAction(IWorkbenchPage page, CDOView view)
{
- super(page, "Close", "Close the CDO view", null, view);
+ super(page, TITLE, TOOL_TIP, null, view);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CommitTransactionAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CommitTransactionAction.java
index cc9aa10..1f29534 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CommitTransactionAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CommitTransactionAction.java
@@ -11,9 +11,11 @@ public final class CommitTransactionAction extends ViewAction
{
private static final String TITLE = "Commit";
+ private static final String TOOL_TIP = "Commit this transaction";
+
public CommitTransactionAction(IWorkbenchPage page, CDOView view)
{
- super(page, TITLE, "Commit this transaction", null, view);
+ super(page, TITLE, TOOL_TIP, null, view);
setEnabled(getTransaction().isDirty());
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateResourceAction.java
index ff199e0..4087a38 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/CreateResourceAction.java
@@ -13,11 +13,13 @@ public final class CreateResourceAction extends ViewAction
{
private static final String TITLE = "Create Resource";
+ private static final String TOOL_TIP = "Create a CDO resource";
+
private String resourcePath;
public CreateResourceAction(IWorkbenchPage page, CDOView view)
{
- super(page, TITLE, "Create a CDO resource", null, view);
+ super(page, TITLE + INTERACTIVE, TOOL_TIP, null, view);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java
index 02a2733..ec00837 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ExportResourceAction.java
@@ -1,14 +1,15 @@
package org.eclipse.emf.cdo.internal.ui.actions;
-
/**
* @author Eike Stepper
*/
public class ExportResourceAction extends EditingDomainAction
{
+ private static final String TITLE = "Export Resource";
+
public ExportResourceAction()
{
- super("Export Resource...");
+ super(TITLE + INTERACTIVE);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java
index d9bd221..ebc2c35 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ImportRootsAction.java
@@ -30,7 +30,7 @@ public class ImportRootsAction extends EditingDomainAction
public ImportRootsAction()
{
- super(TITLE + "...");
+ super(TITLE + INTERACTIVE);
}
public CDOResource getTargetResource()
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
index 36e9bb4..fb3b1e8 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/LoadResourceAction.java
@@ -17,7 +17,7 @@ public final class LoadResourceAction extends ViewAction
public LoadResourceAction(IWorkbenchPage page, CDOView view)
{
- super(page, TITLE, "Load a CDO resource", null, view);
+ super(page, TITLE + INTERACTIVE, "Load a CDO resource", null, view);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ManagePackagesAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ManagePackagesAction.java
index 68dc5fd..16c6a9f 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ManagePackagesAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ManagePackagesAction.java
@@ -16,7 +16,7 @@ public class ManagePackagesAction extends SessionAction
public ManagePackagesAction(IWorkbenchPage page, CDOSession session)
{
- super(page, TITLE, TOOL_TIP, null, session);
+ super(page, TITLE + INTERACTIVE, TOOL_TIP, null, session);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenAuditAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenAuditAction.java
index 60ff26c..117e073 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenAuditAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenAuditAction.java
@@ -13,12 +13,15 @@ import org.eclipse.ui.IWorkbenchPage;
*/
public final class OpenAuditAction extends AbstractOpenViewAction
{
+ private static final String TITLE = "Open Audit";
+
+ private static final String TOOL_TIP = "Open a historical CDO view";
+
private long timeStamp;
public OpenAuditAction(IWorkbenchPage page, CDOSession session)
{
- super(page, "Open Audit", "Open a historical CDO view", SharedIcons.getDescriptor(SharedIcons.ETOOL_OPEN_EDITOR),
- session);
+ super(page, TITLE + INTERACTIVE, TOOL_TIP, SharedIcons.getDescriptor(SharedIcons.ETOOL_OPEN_EDITOR), session);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenResourceEditorAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenResourceEditorAction.java
index 5a9bdf0..02a57a7 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenResourceEditorAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenResourceEditorAction.java
@@ -14,10 +14,12 @@ public final class OpenResourceEditorAction extends EntryAction
{
private static final String TITLE = "Open Editor";
+ private static final String TOOL_TIP = "Open a CDO editor for this resource";
+
public OpenResourceEditorAction(IWorkbenchPage page, String text, String toolTipText, ImageDescriptor image,
CDOViewHistory.Entry entry)
{
- super(page, TITLE, "Open a CDO editor for this resource", null, entry);
+ super(page, TITLE, TOOL_TIP, null, entry);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenSessionAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenSessionAction.java
index 05d81ae..ecd9dfc 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenSessionAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenSessionAction.java
@@ -19,11 +19,15 @@ import org.eclipse.ui.IWorkbenchPage;
*/
public final class OpenSessionAction extends LongRunningAction
{
+ private static final String TITLE = OpenSessionDialog.TITLE;
+
+ private static final String TOOL_TIP = "Open a new CDO session";
+
private String description;
public OpenSessionAction(IWorkbenchPage page)
{
- super(page, OpenSessionDialog.TITLE, "Open a new CDO session", CDOSessionsView.getAddImageDescriptor());
+ super(page, TITLE + INTERACTIVE, TOOL_TIP, CDOSessionsView.getAddImageDescriptor());
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenTransactionAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenTransactionAction.java
index 61a1df9..89dda97 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenTransactionAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenTransactionAction.java
@@ -12,10 +12,13 @@ import org.eclipse.ui.IWorkbenchPage;
*/
public final class OpenTransactionAction extends AbstractOpenViewAction
{
+ private static final String TITLE = "Open Transaction";
+
+ private static final String TOOL_TIP = "Open a read-write CDO view";
+
public OpenTransactionAction(IWorkbenchPage page, CDOSession session)
{
- super(page, "Open Transaction", "Open a read-write CDO view", SharedIcons
- .getDescriptor(SharedIcons.ETOOL_OPEN_EDITOR), session);
+ super(page, TITLE, TOOL_TIP, SharedIcons.getDescriptor(SharedIcons.ETOOL_OPEN_EDITOR), session);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewAction.java
index b298e66..240f63b 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewAction.java
@@ -12,10 +12,13 @@ import org.eclipse.ui.IWorkbenchPage;
*/
public final class OpenViewAction extends AbstractOpenViewAction
{
+ private static final String TITLE = "Open View";
+
+ private static final String TOOL_TIP = "Open a read-only CDO view";
+
public OpenViewAction(IWorkbenchPage page, CDOSession session)
{
- super(page, "Open View", "Open a read-only CDO view", SharedIcons.getDescriptor(SharedIcons.ETOOL_OPEN_EDITOR),
- session);
+ super(page, TITLE, TOOL_TIP, SharedIcons.getDescriptor(SharedIcons.ETOOL_OPEN_EDITOR), session);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewEditorAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewEditorAction.java
index 376d6b3..9ad5c69 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewEditorAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewEditorAction.java
@@ -12,9 +12,11 @@ public final class OpenViewEditorAction extends ViewAction
{
private static final String TITLE = "Open Editor";
+ private static final String TOOL_TIP = "Open a CDO editor for this view";
+
public OpenViewEditorAction(IWorkbenchPage page, CDOView view)
{
- super(page, TITLE, "Open a CDO editor for this view", null, view);
+ super(page, TITLE, TOOL_TIP, null, view);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java
index 4c6301d..109b734 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterFilesystemPackagesAction.java
@@ -34,6 +34,8 @@ public class RegisterFilesystemPackagesAction extends RegisterPackagesAction
{
private static final String TITLE = "Register Filesystem Packages";
+ private static final String TOOL_TIP = "Register dynamic packages from the filesystem";
+
private static final String[] FILTER_NAMES = { "Ecore models (*.ecore)", "XMI files (*.xmi)", "XML files (*.xml)",
"All files (*.*)" };
@@ -41,7 +43,7 @@ public class RegisterFilesystemPackagesAction extends RegisterPackagesAction
public RegisterFilesystemPackagesAction(IWorkbenchPage page, CDOSession session)
{
- super(page, TITLE, "Register dynamic packages from the filesystem", null, session);
+ super(page, TITLE, TOOL_TIP, null, session);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
index 1a8bf7a..6587700 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterGeneratedPackagesAction.java
@@ -30,11 +30,13 @@ public class RegisterGeneratedPackagesAction extends RegisterPackagesAction
{
private static final String TITLE = "Register Generated Packages";
+ private static final String TOOL_TIP = "Register native, legacy or converted packages";
+
private EPackage.Registry registry = EPackage.Registry.INSTANCE;
public RegisterGeneratedPackagesAction(IWorkbenchPage page, CDOSession session)
{
- super(page, TITLE, "Register native, legacy or converted packages", null, session);
+ super(page, TITLE, TOOL_TIP, null, session);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterWorkspacePackagesAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterWorkspacePackagesAction.java
index 321beac..443011d 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterWorkspacePackagesAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RegisterWorkspacePackagesAction.java
@@ -33,9 +33,11 @@ public class RegisterWorkspacePackagesAction extends RegisterPackagesAction
{
private static final String TITLE = "Register Workspace Packages";
+ private static final String TOOL_TIP = "Register dynamic packages from the workspace";
+
public RegisterWorkspacePackagesAction(IWorkbenchPage page, CDOSession session)
{
- super(page, TITLE, "Register dynamic packages from the workspace", null, session);
+ super(page, TITLE, TOOL_TIP, null, session);
}
@Override
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RollbackTransactionAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RollbackTransactionAction.java
index fc064b8..5838277 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RollbackTransactionAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/RollbackTransactionAction.java
@@ -11,9 +11,11 @@ public final class RollbackTransactionAction extends ViewAction
{
private static final String TITLE = "Rollback";
+ private static final String TOOL_TIP = "Rollback this transaction";
+
public RollbackTransactionAction(IWorkbenchPage page, CDOView view)
{
- super(page, TITLE, "Rollback this transaction", null, view);
+ super(page, TITLE + INTERACTIVE, TOOL_TIP, null, view);
setEnabled(getTransaction().isDirty());
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOEventHandler.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOEventHandler.java
index d3bf99d..fc6068c 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOEventHandler.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/views/CDOEventHandler.java
@@ -11,8 +11,8 @@
package org.eclipse.emf.cdo.internal.ui.views;
import org.eclipse.emf.cdo.CDOSessionInvalidationEvent;
-import org.eclipse.emf.cdo.CDOTransactionCommittedEvent;
-import org.eclipse.emf.cdo.CDOTransactionDirtyEvent;
+import org.eclipse.emf.cdo.CDOTransactionFinishedEvent;
+import org.eclipse.emf.cdo.CDOTransactionStartedEvent;
import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.internal.ui.ItemsProcessor;
import org.eclipse.emf.cdo.protocol.CDOID;
@@ -75,22 +75,48 @@ public class CDOEventHandler
{
public void notifyEvent(IEvent event)
{
- if (event instanceof CDOTransactionCommittedEvent)
+ if (event instanceof CDOTransactionFinishedEvent)
{
- Map<CDOID, CDOID> idMappings = ((CDOTransactionCommittedEvent)event).getIDMappings();
- HashSet<CDOID> newOIDs = new HashSet<CDOID>(idMappings.values());
- new ItemsProcessor(view)
+ CDOTransactionFinishedEvent e = (CDOTransactionFinishedEvent)event;
+ if (e.getType() == CDOTransactionFinishedEvent.Type.COMMITTED)
{
- @Override
- protected void processCDOObject(TreeViewer viewer, InternalCDOObject cdoObject)
+ Map<CDOID, CDOID> idMappings = e.getIDMappings();
+ HashSet<CDOID> newOIDs = new HashSet<CDOID>(idMappings.values());
+ new ItemsProcessor(view)
{
- viewer.update(cdoObject.cdoInternalInstance(), null);
+ @Override
+ protected void processCDOObject(TreeViewer viewer, InternalCDOObject cdoObject)
+ {
+ viewer.update(cdoObject.cdoInternalInstance(), null);
+ }
+ }.processCDOObjects(treeViewer, newOIDs);
+ }
+ else
+ {
+ try
+ {
+ treeViewer.getControl().getDisplay().syncExec(new Runnable()
+ {
+ public void run()
+ {
+ try
+ {
+ treeViewer.refresh(true);
+ }
+ catch (Exception ignore)
+ {
+ }
+ }
+ });
}
- }.processCDOObjects(treeViewer, newOIDs);
+ catch (Exception ignore)
+ {
+ }
+ }
viewDirtyStateChanged();
}
- else if (event instanceof CDOTransactionDirtyEvent)
+ else if (event instanceof CDOTransactionStartedEvent)
{
viewDirtyStateChanged();
}
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 6cf7dc3..bc6b4d0 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
@@ -13,8 +13,8 @@ package org.eclipse.emf.cdo.internal.ui.views;
import org.eclipse.emf.cdo.CDOAudit;
import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.cdo.CDOTransaction;
-import org.eclipse.emf.cdo.CDOTransactionCommittedEvent;
-import org.eclipse.emf.cdo.CDOTransactionDirtyEvent;
+import org.eclipse.emf.cdo.CDOTransactionFinishedEvent;
+import org.eclipse.emf.cdo.CDOTransactionStartedEvent;
import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.CDOViewEvent;
import org.eclipse.emf.cdo.internal.ui.SharedIcons;
@@ -61,7 +61,7 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
{
public void notifyEvent(IEvent event)
{
- if (event instanceof CDOTransactionDirtyEvent || event instanceof CDOTransactionCommittedEvent)
+ if (event instanceof CDOTransactionStartedEvent || event instanceof CDOTransactionFinishedEvent)
{
try
{
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSessionInvalidationEvent.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSessionInvalidationEvent.java
index eb06936..39ea347 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSessionInvalidationEvent.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOSessionInvalidationEvent.java
@@ -19,8 +19,14 @@ import java.util.Set;
*/
public interface CDOSessionInvalidationEvent extends CDOSessionEvent
{
+ public static final long LOCAL_ROLLBACK = 0L;
+
public CDOView getView();
+ /**
+ * Returns the time stamp of the server transaction if this event was sent as a result of a successfully committed
+ * transaction or <code>LOCAL_ROLLBACK</code> if this event was sent due to a local rollback.
+ */
public long getTimeStamp();
public Set<CDOID> getDirtyOIDs();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionCommittedEvent.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionFinishedEvent.java
index fc625d3..f9549b7 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionCommittedEvent.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionFinishedEvent.java
@@ -17,7 +17,14 @@ import java.util.Map;
/**
* @author Eike Stepper
*/
-public interface CDOTransactionCommittedEvent extends CDOViewEvent
+public interface CDOTransactionFinishedEvent extends CDOViewEvent
{
+ public Type getType();
+
public Map<CDOID, CDOID> getIDMappings();
+
+ public enum Type
+ {
+ COMMITTED, ROLLED_BACK
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionDirtyEvent.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionStartedEvent.java
index 89b90f3..e34f6e3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionDirtyEvent.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/CDOTransactionStartedEvent.java
@@ -13,6 +13,6 @@ package org.eclipse.emf.cdo;
/**
* @author Eike Stepper
*/
-public interface CDOTransactionDirtyEvent extends CDOViewEvent
+public interface CDOTransactionStartedEvent extends CDOViewEvent
{
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
index 27c0f2c..25540aa 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
@@ -495,6 +495,11 @@ public class CDOSessionImpl extends Container<CDOView> implements CDOSession
}
}
+ fireInvalidationEvent(timeStamp, dirtyOIDs, excludedView);
+ }
+
+ public void fireInvalidationEvent(long timeStamp, Set<CDOID> dirtyOIDs, CDOViewImpl excludedView)
+ {
fireEvent(new InvalidationEvent(excludedView, timeStamp, dirtyOIDs));
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
index 476ba6e..949b920 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOStateMachine.java
@@ -5,20 +5,21 @@ import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.internal.protocol.model.CDOClassImpl;
import org.eclipse.emf.cdo.internal.protocol.revision.CDORevisionImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
+import org.eclipse.emf.cdo.protocol.revision.CDORevision;
import org.eclipse.emf.cdo.protocol.util.TransportException;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.ServerException;
-import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
-import org.eclipse.net4j.signal.IFailOverStrategy;
-import org.eclipse.net4j.util.fsm.FiniteStateMachine;
-import org.eclipse.net4j.util.fsm.ITransition;
-
import org.eclipse.emf.internal.cdo.bundle.OM;
import org.eclipse.emf.internal.cdo.protocol.CommitTransactionResult;
import org.eclipse.emf.internal.cdo.protocol.ResourceIDRequest;
import org.eclipse.emf.internal.cdo.util.FSMUtil;
+import org.eclipse.net4j.internal.util.om.trace.ContextTracer;
+import org.eclipse.net4j.signal.IFailOverStrategy;
+import org.eclipse.net4j.util.fsm.FiniteStateMachine;
+import org.eclipse.net4j.util.fsm.ITransition;
+
import java.text.MessageFormat;
import java.util.Iterator;
import java.util.Map;
@@ -84,7 +85,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
init(CDOState.DIRTY, CDOEvent.READ, IGNORE);
init(CDOState.DIRTY, CDOEvent.WRITE, IGNORE);
init(CDOState.DIRTY, CDOEvent.COMMIT, new CommitTransition());
- init(CDOState.DIRTY, CDOEvent.ROLLBACK, FAIL);
+ init(CDOState.DIRTY, CDOEvent.ROLLBACK, new RollbackTransition());
init(CDOState.DIRTY, CDOEvent.INVALIDATE, FAIL);
init(CDOState.DIRTY, CDOEvent.FINALIZE_ATTACH, FAIL);
@@ -242,7 +243,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
*/
private final class FinalizeAttachTransition implements ITransition<CDOState, CDOEvent, InternalCDOObject, Object>
{
- public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object data)
+ public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object NULL)
{
CDOTransactionImpl transaction = (CDOTransactionImpl)object.cdoView();
object.cdoInternalPostAttach();
@@ -252,7 +253,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
for (Iterator<?> it = FSMUtil.iterator(object.eContents(), transaction); it.hasNext();)
{
InternalCDOObject content = (InternalCDOObject)it.next();
- INSTANCE.process(content, CDOEvent.FINALIZE_ATTACH, data);
+ INSTANCE.process(content, CDOEvent.FINALIZE_ATTACH, null);
}
}
}
@@ -262,7 +263,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
*/
private final class DetachTransition implements ITransition<CDOState, CDOEvent, InternalCDOObject, Object>
{
- public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object data)
+ public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object NULL)
{
// TODO Implement method DetachTransition.execute()
throw new UnsupportedOperationException("Not yet implemented");
@@ -307,9 +308,31 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
/**
* @author Eike Stepper
*/
+ private final class RollbackTransition implements ITransition<CDOState, CDOEvent, InternalCDOObject, Object>
+ {
+ public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object NULL)
+ {
+ CDOViewImpl view = (CDOViewImpl)object.cdoView();
+
+ // Adjust object
+ CDOID id = object.cdoID();
+ CDORevision transactionalRevision = object.cdoRevision();
+ int version = transactionalRevision.getVersion();
+
+ CDORevisionManagerImpl revisionManager = view.getSession().getRevisionManager();
+ CDORevisionImpl previousRevision = revisionManager.getRevisionByVersion(id, 0, version - 1);
+ object.cdoInternalSetRevision(previousRevision);
+
+ changeState(object, CDOState.PROXY);
+ }
+ }
+
+ /**
+ * @author Eike Stepper
+ */
private final class WriteTransition implements ITransition<CDOState, CDOEvent, InternalCDOObject, Object>
{
- public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object data)
+ public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object NULL)
{
// Copy revision
CDORevisionImpl revision = new CDORevisionImpl((CDORevisionImpl)object.cdoRevision());
@@ -348,7 +371,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
this.forWrite = forWrite;
}
- public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object data)
+ public void execute(InternalCDOObject object, CDOState state, CDOEvent event, Object NULL)
{
CDOID id = object.cdoID();
CDOViewImpl view = (CDOViewImpl)object.cdoView();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
index d02c0e5..1b541f0 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOTransactionImpl.java
@@ -12,16 +12,15 @@ package org.eclipse.emf.internal.cdo;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOTransaction;
-import org.eclipse.emf.cdo.CDOTransactionCommittedEvent;
-import org.eclipse.emf.cdo.CDOTransactionDirtyEvent;
+import org.eclipse.emf.cdo.CDOTransactionFinishedEvent;
import org.eclipse.emf.cdo.CDOTransactionHandler;
+import org.eclipse.emf.cdo.CDOTransactionStartedEvent;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.eresource.impl.CDOResourceImpl;
import org.eclipse.emf.cdo.internal.protocol.CDOIDImpl;
import org.eclipse.emf.cdo.internal.protocol.model.CDOPackageImpl;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.protocol.model.CDOPackage;
-import org.eclipse.emf.cdo.protocol.util.TransportException;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.common.util.URI;
@@ -41,6 +40,7 @@ import org.eclipse.net4j.util.transaction.TransactionException;
import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -187,25 +187,19 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
postCommit(newObjects, result);
postCommit(dirtyObjects, result);
- if (!dirtyObjects.isEmpty())
- {
- session.notifyInvalidation(result.getTimeStamp(), dirtyObjects.keySet(), this);
- }
-
for (CDOPackage newPackage : newPackages)
{
((CDOPackageImpl)newPackage).setPersistent(true);
}
- newPackages = null;
- newResources.clear();
- newObjects.clear();
- dirtyObjects.clear();
- dirty = false;
- nextTemporaryID = INITIAL_TEMPORARY_ID;
+ if (!dirtyObjects.isEmpty())
+ {
+ session.notifyInvalidation(result.getTimeStamp(), dirtyObjects.keySet(), this);
+ }
+ cleanUp();
Map<CDOID, CDOID> idMappings = result.getIDMappings();
- fireEvent(new CommittedEvent(idMappings));
+ fireEvent(new FinishedEvent(CDOTransactionFinishedEvent.Type.COMMITTED, idMappings));
}
catch (RuntimeException ex)
{
@@ -213,7 +207,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
}
catch (Exception ex)
{
- throw new TransportException(ex);
+ throw new TransactionException(ex);
}
}
}
@@ -224,8 +218,35 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
try
{
- // TODO Implement method CDOTransactionImpl.rollback()
- throw new UnsupportedOperationException("Not yet implemented");
+ if (!newResources.isEmpty())
+ {
+ for (CDOObject newResource : newResources.values())
+ {
+ removeObject(newResource.cdoID());
+ }
+ }
+
+ if (!newObjects.isEmpty())
+ {
+ for (CDOObject newObject : newObjects.values())
+ {
+ removeObject(newObject.cdoID());
+ }
+ }
+
+ if (!dirtyObjects.isEmpty())
+ {
+ for (CDOObject dirtyObject : dirtyObjects.values())
+ {
+ CDOStateMachine.INSTANCE.rollback((InternalCDOObject)dirtyObject);
+ }
+
+ // getSession().fireInvalidationEvent(CDOSessionInvalidationEvent.LOCAL_ROLLBACK, dirtyObjects.keySet(), null);
+ }
+
+ cleanUp();
+ Map<CDOID, CDOID> idMappings = Collections.emptyMap();
+ fireEvent(new FinishedEvent(CDOTransactionFinishedEvent.Type.ROLLED_BACK, idMappings));
}
catch (RuntimeException ex)
{
@@ -233,7 +254,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
}
catch (Exception ex)
{
- throw new TransportException(ex);
+ throw new TransactionException(ex);
}
}
@@ -292,7 +313,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
if (!dirty)
{
dirty = true;
- fireEvent(new DirtyEvent());
+ fireEvent(new StartedEvent());
}
}
@@ -363,14 +384,24 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
}
}
+ private void cleanUp()
+ {
+ newPackages = null;
+ newResources.clear();
+ newObjects.clear();
+ dirtyObjects.clear();
+ dirty = false;
+ nextTemporaryID = INITIAL_TEMPORARY_ID;
+ }
+
/**
* @author Eike Stepper
*/
- private final class DirtyEvent extends Event implements CDOTransactionDirtyEvent
+ private final class StartedEvent extends Event implements CDOTransactionStartedEvent
{
private static final long serialVersionUID = 1L;
- private DirtyEvent()
+ private StartedEvent()
{
}
}
@@ -378,64 +409,28 @@ public class CDOTransactionImpl extends CDOViewImpl implements CDOTransaction
/**
* @author Eike Stepper
*/
- private final class CommittedEvent extends Event implements CDOTransactionCommittedEvent
+ private final class FinishedEvent extends Event implements CDOTransactionFinishedEvent
{
private static final long serialVersionUID = 1L;
+ private Type type;
+
private Map<CDOID, CDOID> idMappings;
- private CommittedEvent(Map<CDOID, CDOID> idMappings)
+ private FinishedEvent(Type type, Map<CDOID, CDOID> idMappings)
{
+ this.type = type;
this.idMappings = idMappings;
}
+ public Type getType()
+ {
+ return type;
+ }
+
public Map<CDOID, CDOID> getIDMappings()
{
return idMappings;
}
}
-
- // private Collection<CDOPackageImpl> calculateNewPackages()
- // {
- // CDOSessionImpl session = view.getSession();
- // CDOPackageManagerImpl packageManager = session.getPackageManager();
- // return packageManager.getTransientPackages();
- //
- // CDOCorePackageImpl corePackage = packageManager.getCDOCorePackage();
- // CDOResourcePackageImpl resourcePackage =
- // packageManager.getCDOResourcePackage();
- //
- // Set<String> knownPackages = session.getPackageURIs();
- // Map<String, CDOPackageImpl> newPackages = new HashMap();
- // for (InternalCDOObject cdoObject : newObjects.values())
- // {
- // CDOPackageImpl cdoPackage = cdoObject.cdoClass().getContainingPackage();
- // String uri = cdoPackage.getPackageURI();
- // if (!newPackages.containsKey(uri) && !knownPackages.contains(uri))
- // {
- // EPackage ePackage = EMFUtil.getEPackage(cdoPackage);
- // Set<EPackage> ePackages = PackageClosure.calculate(ePackage);
- // for (EPackage eP : ePackages)
- // {
- // CDOPackageImpl cdoP = eP == ePackage ? cdoPackage :
- // EMFUtil.getCDOPackage(eP, packageManager);
- // if (cdoP == null)
- // {
- // throw new IllegalStateException("Not a CDO package: " + eP);
- // }
- //
- // if (cdoP != corePackage && cdoP != resourcePackage)
- // {
- // uri = cdoP.getPackageURI();
- // if (!newPackages.containsKey(uri) && !knownPackages.contains(uri))
- // {
- // newPackages.put(uri, cdoP);
- // }
- // }
- // }
- // }
- // }
- //
- // return newPackages.values();
- // }
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
index 2466c37..74a38a8 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOViewImpl.java
@@ -286,6 +286,11 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
return objects.containsKey(id);
}
+ public InternalCDOObject removeObject(CDOID id)
+ {
+ return objects.remove(id);
+ }
+
/**
* @return Never <code>null</code>
*/
@@ -527,7 +532,8 @@ public class CDOViewImpl extends org.eclipse.net4j.internal.util.event.Notifier
* propagated to the caller of this method but this should not happen in the absence of implementation errors.
*
* @param timeStamp
- * The point in time when the newly committed revision have been created.
+ * The time stamp of the server transaction if this event was sent as a result of a successfully committed
+ * transaction or <code>LOCAL_ROLLBACK</code> if this event was sent due to a local rollback.
* @param dirtyOIDs
* A set of the object IDs to be invalidated. <b>Implementation note:</b> This implementation expects the
* dirtyOIDs set to be unmodifiable. It does not wrap the set (again).
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeAction.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeAction.java
index 2007ad3..43f2af6 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeAction.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/actions/SafeAction.java
@@ -11,6 +11,8 @@ import org.eclipse.jface.resource.ImageDescriptor;
*/
public abstract class SafeAction extends Action
{
+ public static final String INTERACTIVE = "...";
+
public SafeAction()
{
}