Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-18 12:44:32 -0400
committerEike Stepper2013-03-18 12:44:32 -0400
commit82755bda9360b58cda1e14359a806035d3950e90 (patch)
treead123b75a200bebd6341bed5c127c9c18ad81733
parentf8cbd61bb2875664281ab37f54ca58c02b1775ef (diff)
downloadcdo-82755bda9360b58cda1e14359a806035d3950e90.tar.gz
cdo-82755bda9360b58cda1e14359a806035d3950e90.tar.xz
cdo-82755bda9360b58cda1e14359a806035d3950e90.zip
[402371] CDOCompareUtil.compare fails with models that use Containment
Proxies https://bugs.eclipse.org/bugs/show_bug.cgi?id=402371
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/MergeAction.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenDurableViewAction.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewAction.java7
5 files changed, 22 insertions, 3 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/MergeAction.java b/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/MergeAction.java
index 104761f195..dcbc9be9a2 100644
--- a/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/MergeAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui.compare/src/org/eclipse/emf/cdo/ui/internal/compare/MergeAction.java
@@ -11,10 +11,12 @@
package org.eclipse.emf.cdo.ui.internal.compare;
import org.eclipse.emf.cdo.common.branch.CDOBranchPoint;
+import org.eclipse.emf.cdo.internal.ui.LegacyModeRegistry;
import org.eclipse.emf.cdo.internal.ui.dialogs.SelectBranchPointDialog;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.ui.compare.CDOCompareEditorUtil;
+import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
@@ -91,6 +93,7 @@ public abstract class MergeAction implements IObjectActionDelegate
CDOSession session = leftView.getSession();
if (branchPoint.getTimeStamp() == CDOBranchPoint.UNSPECIFIED_DATE)
{
+ CDOUtil.setLegacyModeDefault(LegacyModeRegistry.isLegacyEnabled(session));
return session.openTransaction(branchPoint.getBranch());
}
diff --git a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
index 342bc962f4..f5e59d1aaa 100644
--- a/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
+++ b/plugins/org.eclipse.emf.cdo.ui.team/src/org/eclipse/emf/cdo/ui/internal/team/history/CDOHistoryPage.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.cdo.common.commit.CDOCommitInfo;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoHandler;
import org.eclipse.emf.cdo.common.commit.CDOCommitInfoManager;
import org.eclipse.emf.cdo.eresource.CDOResourceFolder;
+import org.eclipse.emf.cdo.internal.ui.LegacyModeRegistry;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
@@ -24,6 +25,7 @@ import org.eclipse.emf.cdo.ui.compare.CDOCompareEditorUtil;
import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite;
import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite.Input;
import org.eclipse.emf.cdo.ui.widgets.CommitHistoryComposite.LabelProvider;
+import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.net4j.util.event.IListener;
@@ -116,6 +118,8 @@ public class CDOHistoryPage extends HistoryPage
try
{
CDOSession session = input.getSession();
+ CDOUtil.setLegacyModeDefault(LegacyModeRegistry.isLegacyEnabled(session));
+
leftView = session.openView(commitInfo);
rightView = session.openView(previous);
diff --git a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
index cf173a405b..726a92585e 100644
--- a/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.ui/META-INF/MANIFEST.MF
@@ -29,7 +29,9 @@ Export-Package: org.eclipse.emf.cdo.internal.ui;version="4.2.0";
org.eclipse.emf.cdo.ui.location,
org.eclipse.emf.cdo.tests.ui,
org.eclipse.emf.cdo.dawn.ui,
- org.eclipse.emf.cdo.explorer",
+ org.eclipse.emf.cdo.explorer,
+ org.eclipse.emf.cdo.ui.team,
+ org.eclipse.emf.cdo.ui.compare",
org.eclipse.emf.cdo.internal.ui.actions;version="4.2.0";
x-friends:="org.eclipse.emf.cdo.ui.defs,
org.eclipse.emf.cdo.ui.ide,
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenDurableViewAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenDurableViewAction.java
index d95f8bb557..2aed038c31 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenDurableViewAction.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenDurableViewAction.java
@@ -11,6 +11,7 @@
*/
package org.eclipse.emf.cdo.internal.ui.actions;
+import org.eclipse.emf.cdo.internal.ui.LegacyModeRegistry;
import org.eclipse.emf.cdo.internal.ui.dialogs.OpenAuditDialog;
import org.eclipse.emf.cdo.internal.ui.dialogs.OpenDurableViewDialog;
import org.eclipse.emf.cdo.internal.ui.messages.Messages;
@@ -18,6 +19,7 @@ import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.transaction.CDOTransactionCommentator;
import org.eclipse.emf.cdo.ui.shared.SharedIcons;
+import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.IWorkbenchPage;
@@ -57,7 +59,10 @@ public final class OpenDurableViewAction extends AbstractOpenViewAction
{
try
{
- CDOTransaction transaction = getSession().openTransaction(areaID);
+ CDOSession session = getSession();
+ CDOUtil.setLegacyModeDefault(LegacyModeRegistry.isLegacyEnabled(session));
+
+ CDOTransaction transaction = session.openTransaction(areaID);
new CDOTransactionCommentator(transaction);
}
catch (IllegalStateException ex)
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 7b7b9eaa01..468ae9387c 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
@@ -11,9 +11,11 @@
*/
package org.eclipse.emf.cdo.internal.ui.actions;
+import org.eclipse.emf.cdo.internal.ui.LegacyModeRegistry;
import org.eclipse.emf.cdo.internal.ui.messages.Messages;
import org.eclipse.emf.cdo.session.CDOSession;
import org.eclipse.emf.cdo.ui.shared.SharedIcons;
+import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.ui.IWorkbenchPage;
@@ -35,6 +37,9 @@ public final class OpenViewAction extends AbstractOpenViewAction
@Override
protected void doRun(IProgressMonitor progressMonitor) throws Exception
{
- getSession().openView();
+ CDOSession session = getSession();
+ CDOUtil.setLegacyModeDefault(LegacyModeRegistry.isLegacyEnabled(session));
+
+ session.openView();
}
}

Back to the top