Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-18 13:29:52 -0400
committerEike Stepper2013-03-18 13:29:52 -0400
commitb2ce98845faf1b5cdb98aa30df6ae06241519c67 (patch)
tree26b0eafd1df15d15dd377f0bbd2a74a1ca4e9159
parent82755bda9360b58cda1e14359a806035d3950e90 (diff)
downloadcdo-b2ce98845faf1b5cdb98aa30df6ae06241519c67.tar.gz
cdo-b2ce98845faf1b5cdb98aa30df6ae06241519c67.tar.xz
cdo-b2ce98845faf1b5cdb98aa30df6ae06241519c67.zip
[403661] [Legacy] Make legacy mode non-optional
https://bugs.eclipse.org/bugs/show_bug.cgi?id=403661
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOQueryInfo.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/CDOQueryInfoImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.util/META-INF/MANIFEST.MF8
-rw-r--r--plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/connection/CDOConnectionUtil.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/OCLQueryHandler.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java98
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ObjectWriteAccessHandler.java15
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java1
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java56
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java46
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_355915_Test.java9
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_359992_Test.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_362270_Test.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376620_Test.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_392956_Test.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java3
-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/src/org/eclipse/emf/cdo/internal/ui/LegacyModeRegistry.java45
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenDurableViewAction.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.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/OpenViewAction.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ToggleLegacyModeDefaultAction.java43
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SessionComposite.java36
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java1
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java16
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/LegacyModeNotEnabledException.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java11
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/FSMUtil.java6
40 files changed, 130 insertions, 369 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOQueryInfo.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOQueryInfo.java
index 6a9f6d4e76..99f7a78256 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOQueryInfo.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/util/CDOQueryInfo.java
@@ -69,7 +69,9 @@ public interface CDOQueryInfo
* <code>false</code> otherwise.
*
* @since 4.0
+ * @deprecated As of 4.2 the legacy mode is always enabled.
*/
+ @Deprecated
public boolean isLegacyModeEnabled();
/**
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/CDOQueryInfoImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/CDOQueryInfoImpl.java
index 243e515bb0..a3e1489214 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/CDOQueryInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/CDOQueryInfoImpl.java
@@ -37,8 +37,6 @@ public class CDOQueryInfoImpl implements CDOQueryInfo
protected int maxResults = UNLIMITED_RESULTS;
- protected boolean legacyModeEnabled;
-
protected CDOChangeSetData changeSetData;
public CDOQueryInfoImpl(String queryLanguage, String queryString, Object context)
@@ -54,7 +52,6 @@ public class CDOQueryInfoImpl implements CDOQueryInfo
queryString = in.readString();
context = in.readCDORevisionOrPrimitiveOrClassifier();
maxResults = in.readInt();
- legacyModeEnabled = in.readBoolean();
if (in.readBoolean())
{
@@ -76,7 +73,6 @@ public class CDOQueryInfoImpl implements CDOQueryInfo
out.writeString(queryString);
out.writeCDORevisionOrPrimitiveOrClassifier(context);
out.writeInt(maxResults);
- out.writeBoolean(legacyModeEnabled);
if (changeSetData != null)
{
@@ -138,14 +134,10 @@ public class CDOQueryInfoImpl implements CDOQueryInfo
return this;
}
+ @Deprecated
public boolean isLegacyModeEnabled()
{
- return legacyModeEnabled;
- }
-
- public void setLegacyModeEnabled(boolean legacyModeEnabled)
- {
- this.legacyModeEnabled = legacyModeEnabled;
+ return true;
}
public CDOChangeSetData getChangeSetData()
diff --git a/plugins/org.eclipse.emf.cdo.dawn.util/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.dawn.util/META-INF/MANIFEST.MF
index d66a5a43c9..79afedf11a 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.util/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.dawn.util/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.emf.cdo.dawn.util;singleton:=true
-Bundle-Version: 2.0.0.qualifier
+Bundle-Version: 2.0.100.qualifier
Bundle-Activator: org.eclipse.emf.cdo.dawn.internal.util.bundle.OM$Activator
Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
@@ -12,8 +12,8 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
org.eclipse.emf.cdo.net4j;bundle-version="[4.0.0,5.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Export-Package: org.eclipse.emf.cdo.dawn.internal.util.bundle;version="2.0.0",
- org.eclipse.emf.cdo.dawn.util.connection;version="2.0.0",
- org.eclipse.emf.cdo.dawn.util.exceptions;version="2.0.0"
+Export-Package: org.eclipse.emf.cdo.dawn.internal.util.bundle;version="2.0.100",
+ org.eclipse.emf.cdo.dawn.util.connection;version="2.0.100",
+ org.eclipse.emf.cdo.dawn.util.exceptions;version="2.0.100"
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/connection/CDOConnectionUtil.java b/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/connection/CDOConnectionUtil.java
index 573fa93590..f5b72fdd71 100644
--- a/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/connection/CDOConnectionUtil.java
+++ b/plugins/org.eclipse.emf.cdo.dawn.util/src/org/eclipse/emf/cdo/dawn/util/connection/CDOConnectionUtil.java
@@ -96,11 +96,6 @@ public class CDOConnectionUtil
*/
public CDOSession openSession()
{
- if (!CDOUtil.isLegacyModeDefault())
- {
- CDOUtil.setLegacyModeDefault(true);
- }
-
currentSession = (CDOSession)IPluginContainer.INSTANCE.getElement("org.eclipse.emf.cdo.sessions", "cdo", protocol
+ "://" + host + "?repositoryName=" + repositoryName);
diff --git a/plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/OCLQueryHandler.java b/plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/OCLQueryHandler.java
index 6363c144aa..f855507f7c 100644
--- a/plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/OCLQueryHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server.ocl/src/org/eclipse/emf/cdo/server/ocl/OCLQueryHandler.java
@@ -95,7 +95,7 @@ public class OCLQueryHandler implements IQueryHandler
}
ISession session = context.getView().getSession();
- CDOView view = CDOServerUtil.openView(session, context, info.isLegacyModeEnabled(), revisionProvider);
+ CDOView view = CDOServerUtil.openView(session, context, revisionProvider);
CDOPackageRegistry packageRegistry = view.getSession().getPackageRegistry();
EcoreEnvironmentFactory envFactory = new EcoreEnvironmentFactory(packageRegistry);
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java
index b8dcdc30eb..1e76f8df04 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/LockingManager.java
@@ -237,7 +237,7 @@ public class LockingManager extends RWOLockManager<Object, IView> implements Int
private Set<? extends Object> createContentSet(Collection<? extends Object> objectsToLock, IView view)
{
CDOBranch branch = view.getBranch();
- CDOView cdoView = CDOServerUtil.openView(view.getSession(), branch.getHead(), true);
+ CDOView cdoView = CDOServerUtil.openView(view.getSession(), branch.getHead());
Set<Object> contents = new HashSet<Object>();
for (Object o : objectsToLock)
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
index 4f13590180..035cd907fc 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/ServerCDOView.java
@@ -98,10 +98,9 @@ public class ServerCDOView extends AbstractCDOView implements org.eclipse.emf.cd
private CDORevisionProvider revisionProvider;
- public ServerCDOView(InternalSession session, CDOBranchPoint branchPoint, boolean legacyModeEnabled,
- CDORevisionProvider revisionProvider)
+ public ServerCDOView(InternalSession session, CDOBranchPoint branchPoint, CDORevisionProvider revisionProvider)
{
- super(branchPoint, legacyModeEnabled);
+ super(branchPoint);
this.session = new ServerCDOSession(session);
this.revisionProvider = revisionProvider;
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java
index 157d1148a9..e2af2774d3 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/CDOServerUtil.java
@@ -65,43 +65,121 @@ public final class CDOServerUtil
{
}
+ // /**
+ // * @since 4.2
+ // */
+ // public static CDOView openView(ISession session, CDOBranchPoint branchPoint, CDORevisionProvider revisionProvider)
+ // {
+ // return new ServerCDOView((InternalSession)session, branchPoint, revisionProvider);
+ // }
+ //
+ // /**
+ // * @since 4.2
+ // */
+ // public static CDOView openView(ISession session, CDOBranchPoint branchPoint)
+ // {
+ // CDORevisionManager revisionManager = session.getManager().getRepository().getRevisionManager();
+ // CDORevisionProvider revisionProvider = new ManagedRevisionProvider(revisionManager, branchPoint);
+ // return new ServerCDOView((InternalSession)session, branchPoint, revisionProvider);
+ // }
+ //
+ // /**
+ // * @since 4.2
+ // */
+ // public static CDOView openView(IView view)
+ // {
+ // ISession session = view.getSession();
+ // CDOBranchPoint branchPoint = CDOBranchUtil.copyBranchPoint(view);
+ // return openView(session, branchPoint, view);
+ // }
+ //
+ // /**
+ // * @since 4.2
+ // */
+ // public static CDOView openView(IStoreAccessor.CommitContext commitContext)
+ // {
+ // ISession session = commitContext.getTransaction().getSession();
+ // CDOBranchPoint branchPoint = commitContext.getBranchPoint();
+ // return openView(session, branchPoint, commitContext);
+ // }
+
+ /**
+ * @since 4.2
+ */
+ public static CDOView openView(ISession session, CDOBranchPoint branchPoint, CDORevisionProvider revisionProvider)
+ {
+ return new ServerCDOView((InternalSession)session, branchPoint, revisionProvider);
+ }
+
+ /**
+ * @since 4.2
+ */
+ public static CDOView openView(ISession session, CDOBranchPoint branchPoint)
+ {
+ CDORevisionManager revisionManager = session.getManager().getRepository().getRevisionManager();
+ CDORevisionProvider revisionProvider = new ManagedRevisionProvider(revisionManager, branchPoint);
+ return openView(session, branchPoint, revisionProvider);
+ }
+
+ /**
+ * @since 4.2
+ */
+ public static CDOView openView(IView view)
+ {
+ ISession session = view.getSession();
+ CDOBranchPoint branchPoint = CDOBranchUtil.copyBranchPoint(view);
+ return openView(session, branchPoint, view);
+ }
+
+ /**
+ * @since 4.2
+ */
+ public static CDOView openView(IStoreAccessor.CommitContext commitContext)
+ {
+ ISession session = commitContext.getTransaction().getSession();
+ CDOBranchPoint branchPoint = commitContext.getBranchPoint();
+ return openView(session, branchPoint, commitContext);
+ }
+
/**
* @since 4.0
+ * @deprecated As of 4.2 the legacy mode is always enabled, use {@link #openView(ISession, CDOBranchPoint, CDORevisionProvider)}.
*/
+ @Deprecated
public static CDOView openView(ISession session, CDOBranchPoint branchPoint, boolean legacyModeEnabled,
CDORevisionProvider revisionProvider)
{
- return new ServerCDOView((InternalSession)session, branchPoint, legacyModeEnabled, revisionProvider);
+ return openView(session, branchPoint, revisionProvider);
}
/**
* @since 4.0
+ * @deprecated As of 4.2 the legacy mode is always enabled, use {@link #openView(ISession, CDOBranchPoint)}.
*/
+ @Deprecated
public static CDOView openView(ISession session, CDOBranchPoint branchPoint, boolean legacyModeEnabled)
{
- CDORevisionManager revisionManager = session.getManager().getRepository().getRevisionManager();
- CDORevisionProvider revisionProvider = new ManagedRevisionProvider(revisionManager, branchPoint);
- return new ServerCDOView((InternalSession)session, branchPoint, legacyModeEnabled, revisionProvider);
+ return openView(session, branchPoint);
}
/**
* @since 4.0
+ * @deprecated As of 4.2 the legacy mode is always enabled, use {@link #openView(IView)}.
*/
+ @Deprecated
public static CDOView openView(IView view, boolean legacyModeEnabled)
{
- ISession session = view.getSession();
- CDOBranchPoint branchPoint = CDOBranchUtil.copyBranchPoint(view);
- return openView(session, branchPoint, legacyModeEnabled, view);
+ return openView(view);
}
/**
* @since 4.0
+ * @deprecated As of 4.2 the legacy mode is always enabled, use {@link #openView(IStoreAccessor.CommitContext)}.
*/
+ @Deprecated
public static CDOView openView(IStoreAccessor.CommitContext commitContext, boolean legacyModeEnabled)
{
- ISession session = commitContext.getTransaction().getSession();
- CDOBranchPoint branchPoint = commitContext.getBranchPoint();
- return openView(session, branchPoint, legacyModeEnabled, commitContext);
+ return openView(commitContext);
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ObjectWriteAccessHandler.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ObjectWriteAccessHandler.java
index 2b7d77015b..342ddb04dc 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ObjectWriteAccessHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/spi/server/ObjectWriteAccessHandler.java
@@ -33,8 +33,6 @@ import org.eclipse.emf.ecore.EObject;
*/
public class ObjectWriteAccessHandler implements WriteAccessHandler
{
- private boolean legacyModeEnabled;
-
private IStoreAccessor.CommitContext commitContext;
private CDOView view;
@@ -47,14 +45,21 @@ public class ObjectWriteAccessHandler implements WriteAccessHandler
{
}
+ /**
+ * @deprecated As of 4.2 the legacy mode is always enabled.
+ */
+ @Deprecated
public ObjectWriteAccessHandler(boolean legacyModeEnabled)
{
- this.legacyModeEnabled = legacyModeEnabled;
}
+ /**
+ * @deprecated As of 4.2 the legacy mode is always enabled.
+ */
+ @Deprecated
public final boolean isLegacyModeEnabled()
{
- return legacyModeEnabled;
+ return true;
}
protected final IStoreAccessor.CommitContext getCommitContext()
@@ -71,7 +76,7 @@ public class ObjectWriteAccessHandler implements WriteAccessHandler
{
if (view == null)
{
- view = CDOServerUtil.openView(commitContext, legacyModeEnabled);
+ view = CDOServerUtil.openView(commitContext);
}
return view;
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java
index 1b16ba8280..a5c715be7a 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/AllConfigs.java
@@ -96,7 +96,6 @@ public abstract class AllConfigs extends ConfigTestSuite
testClasses.add(DynamicXSDTest.class);
testClasses.add(SetFeatureTest.class);
testClasses.add(DynamicPackageTest.class);
- testClasses.add(LegacyTest.class);
testClasses.add(XRefTest.class);
testClasses.add(StickyViewsTest.class);
testClasses.add(LobTest.class);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java
deleted file mode 100644
index b803f01455..0000000000
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/LegacyTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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:
- * Eike Stepper - initial API and implementation
- * Martin Fluegge - recreation of the test case
- */
-package org.eclipse.emf.cdo.tests;
-
-import org.eclipse.emf.cdo.eresource.CDOResource;
-import org.eclipse.emf.cdo.session.CDOSession;
-import org.eclipse.emf.cdo.tests.model1.Customer;
-import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
-import org.eclipse.emf.cdo.util.LegacyModeNotEnabledException;
-
-/**
- * @author Eike Stepper
- */
-public class LegacyTest extends AbstractCDOTest
-{
- public void testLegacyModeEnabled() throws Exception
- {
- Customer customer = getModel1Factory().createCustomer();
- customer.setName("Martin Fluegge");
- customer.setStreet("ABC Street 7");
- customer.setCity("Berlin");
-
- CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(false);
- CDOTransaction transaction = session.openTransaction();
- CDOResource resource = transaction.createResource(getResourcePath("/test1"));
-
- try
- {
- resource.getContents().add(customer);
- transaction.commit();
-
- if (isConfig(LEGACY))
- {
- fail("LegacyModeNotEnabledException expected");
- }
- }
- catch (LegacyModeNotEnabledException ex)
- {
- if (!isConfig(LEGACY))
- {
- fail("Native mode should not throw an exception here (" + ex.getMessage() + ")");
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
index 75b8ae1600..4fd9072ddc 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/PackageRegistryTest.java
@@ -29,7 +29,6 @@ import org.eclipse.emf.cdo.tests.model3.Model3Package;
import org.eclipse.emf.cdo.tests.model3.subpackage.Class2;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
import org.eclipse.emf.cdo.util.CDOUtil;
-import org.eclipse.emf.cdo.util.LegacyModeNotEnabledException;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
@@ -333,51 +332,6 @@ public class PackageRegistryTest extends AbstractCDOTest
}
}
- public void testGlobalDynamicPackageUnprepared() throws Exception
- {
- String nsURI = "http://dynamic";
-
- try
- {
- EPackage p = EcoreFactory.eINSTANCE.createEPackage();
- p.setName("dynamic");
- p.setNsPrefix("dynamic");
- p.setNsURI(nsURI);
-
- EClass c = EcoreFactory.eINSTANCE.createEClass();
- c.setName("DClass");
-
- p.getEClassifiers().add(c);
- EPackage.Registry.INSTANCE.put(nsURI, p);
-
- CDOSession session = openSession();
-
- // The default case is that legacy is disabled. For our test bed it is always enabled.
- // To test the default case we must switch of legacy here.
- CDOUtil.setLegacyModeDefault(false);
-
- CDOTransaction transaction = session.openTransaction();
- CDOResource res = transaction.createResource(getResourcePath("/res"));
-
- EFactory factory = p.getEFactoryInstance();
- EObject object = factory.create(c);
-
- res.getContents().add(object);
- transaction.commit();
- session.close();
-
- fail("LegacyModeNotEnabledException expected");
- }
- catch (LegacyModeNotEnabledException expected)
- {
- // SUCCESS
- }
- finally
- {
- EPackage.Registry.INSTANCE.remove(nsURI);
- }
- }
-
@CleanRepositoriesBefore
public void testDynamicPackageFactory() throws Exception
{
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
index 9d8ce2f568..2ecfebb919 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/RepositoryTest.java
@@ -219,7 +219,7 @@ public class RepositoryTest extends AbstractCDOTest
public void handleTransactionBeforeCommitting(ITransaction transaction, CommitContext commitContext,
OMMonitor monitor) throws RuntimeException
{
- CDOView view = CDOServerUtil.openView(commitContext, isConfig(LEGACY));
+ CDOView view = CDOServerUtil.openView(commitContext);
for (CDORevision revision : commitContext.getNewObjects())
{
EObject object = view.getObject(revision.getID());
@@ -274,7 +274,7 @@ public class RepositoryTest extends AbstractCDOTest
resource.getContents().add(createCustomer("Eike"));
transaction.commit(); // Ensure that model1 is committed to the repository
- getRepository().addHandler(new ObjectWriteAccessHandler(isConfig(LEGACY))
+ getRepository().addHandler(new ObjectWriteAccessHandler()
{
@Override
protected void handleTransactionBeforeCommitting(OMMonitor monitor) throws RuntimeException
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
index dc10c05ca6..4fd7968af3 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/WorkspaceTest.java
@@ -118,14 +118,12 @@ public class WorkspaceTest extends AbstractCDOTest
JVMUtil.prepareContainer(getClientContainer());
localStore = createLocalStore();
- CDOUtil.setLegacyModeDefault(true);
}
@Override
protected void doTearDown() throws Exception
{
disableConsole();
- CDOUtil.setLegacyModeDefault(false);
for (CDOWorkspace workspace : workspaces)
{
IOUtil.closeSilent(workspace);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
index b89a8975bc..da68c03ce2 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_327604_Test.java
@@ -31,7 +31,6 @@ import org.eclipse.emf.cdo.tests.model1.SalesOrder;
import org.eclipse.emf.cdo.tests.model1.VAT;
import org.eclipse.emf.cdo.tests.util.TestSessionConfiguration;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.CommitException;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.cdo.workspace.CDOWorkspace;
@@ -118,15 +117,12 @@ public class Bugzilla_327604_Test extends AbstractCDOTest
JVMUtil.prepareContainer(getClientContainer());
localStore = createLocalStore();
-
- CDOUtil.setLegacyModeDefault(true);
}
@Override
protected void doTearDown() throws Exception
{
disableConsole();
- CDOUtil.setLegacyModeDefault(false);
for (CDOWorkspace workspace : workspaces)
{
IOUtil.closeSilent(workspace);
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_355915_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_355915_Test.java
index be5d25e207..0b977c55d2 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_355915_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_355915_Test.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.tests.AbstractCDOTest;
import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model1.Customer;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.CommitException;
import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
@@ -49,8 +48,6 @@ public class Bugzilla_355915_Test extends AbstractCDOTest
public void testInvalidationNotification() throws Exception
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
-
CDOTransaction transaction1 = session.openTransaction();
transaction1.options().setInvalidationNotificationEnabled(true);
@@ -73,8 +70,6 @@ public class Bugzilla_355915_Test extends AbstractCDOTest
public void run()
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
-
CDOTransaction transaction2 = session.openTransaction();
Resource resource2 = transaction2.getResource(getResourcePath(RESOURCE_PATH));
@@ -105,8 +100,6 @@ public class Bugzilla_355915_Test extends AbstractCDOTest
public void testDeltaNotification() throws Exception
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
-
CDOTransaction transaction1 = session.openTransaction();
transaction1.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
@@ -129,8 +122,6 @@ public class Bugzilla_355915_Test extends AbstractCDOTest
public void run()
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
-
CDOTransaction transaction2 = session.openTransaction();
Resource resource2 = transaction2.getResource(getResourcePath(RESOURCE_PATH));
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_359992_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_359992_Test.java
index 76f2edd0f5..36f6891b57 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_359992_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_359992_Test.java
@@ -22,7 +22,6 @@ import org.eclipse.emf.cdo.tests.model1.Customer;
import org.eclipse.emf.cdo.tests.model1.SalesOrder;
import org.eclipse.emf.cdo.tests.model1.legacy.Model1Factory;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.CommitException;
import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
@@ -37,7 +36,7 @@ import java.util.concurrent.TimeUnit;
/**
* Bug 359992.
- *
+ *
* @author Martin Fluegge
*/
public class Bugzilla_359992_Test extends AbstractCDOTest
@@ -58,7 +57,6 @@ public class Bugzilla_359992_Test extends AbstractCDOTest
public void testInvalidationNotification() throws Exception
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
CDONet4jSession.Options options = (Options)session.options();
options.setCommitTimeout(10 * CommitTransactionRequest.DEFAULT_MONITOR_TIMEOUT_SECONDS);
@@ -77,8 +75,6 @@ public class Bugzilla_359992_Test extends AbstractCDOTest
session.close();
session = openSession();
- CDOUtil.setLegacyModeDefault(true);
-
transaction1 = session.openTransaction();
transaction1.options().setInvalidationNotificationEnabled(true);
@@ -100,7 +96,6 @@ public class Bugzilla_359992_Test extends AbstractCDOTest
public void testDeltaNotification() throws Exception
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
CDONet4jSession.Options options = (Options)session.options();
options.setCommitTimeout(10 * CommitTransactionRequest.DEFAULT_MONITOR_TIMEOUT_SECONDS);
@@ -119,8 +114,6 @@ public class Bugzilla_359992_Test extends AbstractCDOTest
session.close();
session = openSession();
- CDOUtil.setLegacyModeDefault(true);
-
transaction1 = session.openTransaction();
transaction1.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
@@ -154,7 +147,6 @@ public class Bugzilla_359992_Test extends AbstractCDOTest
private void doClient2() throws CommitException
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
CDONet4jSession.Options options = (Options)session.options();
options.setCommitTimeout(10 * CommitTransactionRequest.DEFAULT_MONITOR_TIMEOUT_SECONDS);
CDOTransaction transaction2 = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_362270_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_362270_Test.java
index b497305b27..77bd8be720 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_362270_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_362270_Test.java
@@ -4,7 +4,7 @@
* 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:
* Eike Stepper - initial API and implementation
*/
@@ -19,7 +19,6 @@ import org.eclipse.emf.cdo.tests.model1.Company;
import org.eclipse.emf.cdo.tests.model1.PurchaseOrder;
import org.eclipse.emf.cdo.tests.model1.Supplier;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.notify.Notification;
@@ -50,7 +49,7 @@ import java.util.Map;
/**
* Test case for {@link CDODeltaNotification#getNewValue()} which must returns a local {@link EObject} contained in a
* {@link XMIResource} because a {@link CDOObject} stored in a {@link CDOResource} references the local {@link EObject}.
- *
+ *
* @author Esteban Dugueperoux
*/
public class Bugzilla_362270_Test extends AbstractCDOTest
@@ -74,7 +73,6 @@ public class Bugzilla_362270_Test extends AbstractCDOTest
obeoCompany.getSuppliers().add(martinSupplier);
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
final CDOTransaction cdoTransaction = session.openTransaction(resourceSet);
CDOResource cdoResource = cdoTransaction.createResource(getResourcePath("/test1"));
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376620_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376620_Test.java
index 4a26178e41..793b29dc99 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376620_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_376620_Test.java
@@ -20,7 +20,6 @@ import org.eclipse.emf.cdo.tests.config.IModelConfig;
import org.eclipse.emf.cdo.tests.model1.Supplier;
import org.eclipse.emf.cdo.tests.model1.legacy.Model1Factory;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.CommitException;
import org.eclipse.emf.cdo.view.CDOAdapterPolicy;
@@ -50,7 +49,6 @@ public class Bugzilla_376620_Test extends AbstractCDOTest
public void testDeltaNotification() throws Exception
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
CDONet4jSession.Options options = (Options)session.options();
options.setCommitTimeout(10 * CommitTransactionRequest.DEFAULT_MONITOR_TIMEOUT_SECONDS);
@@ -69,8 +67,6 @@ public class Bugzilla_376620_Test extends AbstractCDOTest
session.close();
session = openSession();
- CDOUtil.setLegacyModeDefault(true);
-
transaction1 = session.openTransaction();
transaction1.options().addChangeSubscriptionPolicy(CDOAdapterPolicy.ALL);
@@ -99,7 +95,6 @@ public class Bugzilla_376620_Test extends AbstractCDOTest
private void doClient2() throws CommitException
{
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
CDONet4jSession.Options options = (Options)session.options();
options.setCommitTimeout(10 * CommitTransactionRequest.DEFAULT_MONITOR_TIMEOUT_SECONDS);
CDOTransaction transaction2 = session.openTransaction();
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_392956_Test.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_392956_Test.java
index 267eb20e27..3afbd9f242 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_392956_Test.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/bugzilla/Bugzilla_392956_Test.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.tests.model6.Holdable;
import org.eclipse.emf.cdo.tests.model6.Holder;
import org.eclipse.emf.cdo.tests.model6.Thing;
import org.eclipse.emf.cdo.transaction.CDOTransaction;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.resource.Resource;
@@ -32,8 +31,6 @@ public class Bugzilla_392956_Test extends AbstractCDOTest
Holder rootHolder = createModel();
CDOSession session = openSession();
- CDOUtil.setLegacyModeDefault(true);
-
CDOTransaction transaction = session.openTransaction();
Resource resource = transaction.getOrCreateResource(getResourcePath("model.model7"));
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
index 8922a07be9..e166b54e38 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/config/impl/SessionConfig.java
@@ -23,7 +23,6 @@ import org.eclipse.emf.cdo.tests.config.IConfig;
import org.eclipse.emf.cdo.tests.config.IRepositoryConfig;
import org.eclipse.emf.cdo.tests.config.ISessionConfig;
import org.eclipse.emf.cdo.tests.util.TestRevisionManager;
-import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.view.CDOFetchRuleManager;
import org.eclipse.emf.cdo.view.CDOViewProvider;
import org.eclipse.emf.cdo.view.CDOViewProviderRegistry;
@@ -207,8 +206,6 @@ public abstract class SessionConfig extends Config implements ISessionConfig
IOUtil.delete(lobCache);
}
});
-
- CDOUtil.setLegacyModeDefault(true);
}
private Set<String> captureGlobalPackageRegistry()
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 dcbc9be9a2..104761f195 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,12 +11,10 @@
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;
@@ -93,7 +91,6 @@ 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 f5e59d1aaa..342bc962f4 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,7 +16,6 @@ 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;
@@ -25,7 +24,6 @@ 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;
@@ -118,8 +116,6 @@ 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/src/org/eclipse/emf/cdo/internal/ui/LegacyModeRegistry.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/LegacyModeRegistry.java
deleted file mode 100644
index 750c96ce31..0000000000
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/LegacyModeRegistry.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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:
- * Victor Roldan Betancort - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.emf.cdo.internal.ui;
-
-import org.eclipse.emf.cdo.session.CDOSession;
-
-import java.util.Collections;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-/**
- * Class to indicate if legacy is enabled or not for certain CDOSession
- *
- * @author Victor Roldan Betancort
- */
-public class LegacyModeRegistry
-{
- private static Map<CDOSession, Boolean> isLegacyEnabledForSession = Collections
- .synchronizedMap(new WeakHashMap<CDOSession, Boolean>());
-
- private LegacyModeRegistry()
- {
-
- }
-
- public static void setLegacyEnabled(CDOSession session, boolean isLegacyEnabled)
- {
- isLegacyEnabledForSession.put(session, isLegacyEnabled);
- }
-
- public static boolean isLegacyEnabled(CDOSession session)
- {
- Boolean status = isLegacyEnabledForSession.get(session);
- return status != null ? status : false;
- }
-}
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 2aed038c31..19b9e8d285 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,7 +11,6 @@
*/
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;
@@ -19,7 +18,6 @@ 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;
@@ -60,8 +58,6 @@ public final class OpenDurableViewAction extends AbstractOpenViewAction
try
{
CDOSession session = getSession();
- CDOUtil.setLegacyModeDefault(LegacyModeRegistry.isLegacyEnabled(session));
-
CDOTransaction transaction = session.openTransaction(areaID);
new CDOTransactionCommentator(transaction);
}
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 ab47faa32b..dfb6bc15b9 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
@@ -13,7 +13,6 @@ package org.eclipse.emf.cdo.internal.ui.actions;
import org.eclipse.emf.cdo.common.model.CDOPackageRegistryPopulator;
import org.eclipse.emf.cdo.common.util.NotAuthenticatedException;
-import org.eclipse.emf.cdo.internal.ui.LegacyModeRegistry;
import org.eclipse.emf.cdo.internal.ui.bundle.OM;
import org.eclipse.emf.cdo.internal.ui.dialogs.OpenSessionDialog;
import org.eclipse.emf.cdo.internal.ui.messages.Messages;
@@ -84,11 +83,6 @@ public final class OpenSessionAction extends LongRunningAction
{
CDOPackageRegistryPopulator.populate(session.getPackageRegistry());
}
-
- if (sessionComposite.isLegacyMode())
- {
- LegacyModeRegistry.setLegacyEnabled(session, true);
- }
}
catch (RemoteException ex)
{
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 c977d2070b..7af3fab902 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
@@ -11,13 +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.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;
@@ -39,7 +37,6 @@ public final class OpenTransactionAction extends AbstractOpenViewAction
@Override
protected void doRun(IProgressMonitor progressMonitor) throws Exception
{
- CDOUtil.setLegacyModeDefault(LegacyModeRegistry.isLegacyEnabled(getSession()));
CDOTransaction transaction = getSession().openTransaction();
new CDOTransactionCommentator(transaction);
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 468ae9387c..25d4dd4b80 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,11 +11,9 @@
*/
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;
@@ -38,8 +36,6 @@ public final class OpenViewAction extends AbstractOpenViewAction
protected void doRun(IProgressMonitor progressMonitor) throws Exception
{
CDOSession session = getSession();
- CDOUtil.setLegacyModeDefault(LegacyModeRegistry.isLegacyEnabled(session));
-
session.openView();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ToggleLegacyModeDefaultAction.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ToggleLegacyModeDefaultAction.java
deleted file mode 100644
index 453463abfc..0000000000
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/actions/ToggleLegacyModeDefaultAction.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * 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:
- * Victor Roldan Betancort - initial API and implementation
- * Eike Stepper - maintenance
- */
-package org.eclipse.emf.cdo.internal.ui.actions;
-
-import org.eclipse.emf.cdo.internal.ui.LegacyModeRegistry;
-import org.eclipse.emf.cdo.session.CDOSession;
-
-import org.eclipse.net4j.util.ui.actions.SafeAction;
-
-/**
- * @author Victor Roldan Betancort
- */
-public class ToggleLegacyModeDefaultAction extends SafeAction
-{
- private static final String TITLE = "Legacy Mode";
-
- private static final String TOOL_TIP = "Toggles the default for legacy mode";
-
- private CDOSession session;
-
- public ToggleLegacyModeDefaultAction(CDOSession session)
- {
- super(TITLE, AS_CHECK_BOX);
- setToolTipText(TOOL_TIP);
- this.session = session;
- setChecked(LegacyModeRegistry.isLegacyEnabled(session));
- }
-
- @Override
- protected void safeRun() throws Exception
- {
- LegacyModeRegistry.setLegacyEnabled(session, !LegacyModeRegistry.isLegacyEnabled(session));
- }
-}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
index 8bea1cff74..2028c4358b 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/CDOItemProvider.java
@@ -42,7 +42,6 @@ import org.eclipse.emf.cdo.internal.ui.actions.RegisterSinglePackageAction;
import org.eclipse.emf.cdo.internal.ui.actions.ReloadViewAction;
import org.eclipse.emf.cdo.internal.ui.actions.RollbackTransactionAction;
import org.eclipse.emf.cdo.internal.ui.actions.SwitchTargetAction;
-import org.eclipse.emf.cdo.internal.ui.actions.ToggleLegacyModeDefaultAction;
import org.eclipse.emf.cdo.internal.ui.messages.Messages;
import org.eclipse.emf.cdo.session.CDORepositoryInfo;
import org.eclipse.emf.cdo.session.CDOSession;
@@ -500,8 +499,6 @@ public class CDOItemProvider extends ContainerItemProvider<IContainer<Object>>
}
manager.add(new Separator());
- manager.add(new ToggleLegacyModeDefaultAction(session));
- manager.add(new Separator());
manager.add(new CloseSessionAction(page, session));
}
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SessionComposite.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SessionComposite.java
index 7cd582dade..51b458065b 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SessionComposite.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/ui/widgets/SessionComposite.java
@@ -58,16 +58,12 @@ public class SessionComposite extends Composite
private PreferenceButton automaticButton;
- private PreferenceButton legacyButton;
-
private String connectorDescription;
private String repositoryName;
private boolean automaticRegistry;
- private boolean legacyMode;
-
public SessionComposite(Composite parent, int style)
{
super(parent, style);
@@ -116,18 +112,6 @@ public class SessionComposite extends Composite
}
});
- new Label(this, SWT.NONE);
- legacyButton = new PreferenceButton(this, SWT.CHECK, Messages.getString("SessionComposite.4"), //$NON-NLS-1$
- OM.PREF_LEGACY_MODE_DEFAULT);
- legacyButton.getButton().addSelectionListener(new SelectionAdapter()
- {
- @Override
- public void widgetSelected(SelectionEvent e)
- {
- legacyMode = legacyButton.getSelection();
- }
- });
-
connectorText.setFocus();
connectorText.getCombo().addFocusListener(new FocusListener()
{
@@ -151,7 +135,6 @@ public class SessionComposite extends Composite
connectorDescription = connectorText.getText();
repositoryName = repositoryText.getText();
automaticRegistry = automaticButton.getSelection();
- legacyMode = legacyButton.getSelection();
}
public IHistory<String> getConnectorHistory()
@@ -184,27 +167,11 @@ public class SessionComposite extends Composite
return automaticButton;
}
- /**
- * @since 4.2
- */
- public PreferenceButton getLegacyButton()
- {
- return legacyButton;
- }
-
public boolean isAutomaticRegistry()
{
return automaticRegistry;
}
- /**
- * @since 4.2
- */
- public boolean isLegacyMode()
- {
- return legacyMode;
- }
-
public String getSessionDescription()
{
StringBuilder builder = new StringBuilder();
@@ -239,7 +206,6 @@ public class SessionComposite extends Composite
connectorText.getHistory().add(connectorDescription);
repositoryText.getHistory().add(repositoryName);
automaticButton.getPreference().setValue(automaticRegistry);
- legacyButton.getPreference().setValue(legacyMode);
}
@Override
@@ -249,7 +215,6 @@ public class SessionComposite extends Composite
connectorText.addListener(eventType, listener);
repositoryText.addListener(eventType, listener);
automaticButton.addListener(eventType, listener);
- legacyButton.addListener(eventType, listener);
}
@Override
@@ -259,6 +224,5 @@ public class SessionComposite extends Composite
connectorText.removeListener(eventType, listener);
repositoryText.removeListener(eventType, listener);
automaticButton.removeListener(eventType, listener);
- legacyButton.removeListener(eventType, listener);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
index 5dcbb28eea..c149d3c39a 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/transaction/CDOPushTransaction.java
@@ -354,6 +354,7 @@ public class CDOPushTransaction extends Notifier implements CDOTransaction
return delegate.createResource(path);
}
+ @Deprecated
public boolean isLegacyModeEnabled()
{
return delegate.isLegacyModeEnabled();
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
index 4a19fa434e..37dab09079 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOUtil.java
@@ -83,15 +83,6 @@ import java.util.Map;
*/
public final class CDOUtil
{
- private static final ThreadLocal<Boolean> legacyModeDefault = new InheritableThreadLocal<Boolean>()
- {
- @Override
- protected Boolean initialValue()
- {
- return false;
- }
- };
-
static
{
CDOPackageRegistryImpl.SYSTEM_ELEMENTS[0] = EcorePackage.eINSTANCE;
@@ -586,18 +577,21 @@ public final class CDOUtil
/**
* @since 3.0
+ * @deprecated As of 4.2 the legacy mode is always enabled.
*/
+ @Deprecated
public static boolean isLegacyModeDefault()
{
- return legacyModeDefault.get();
+ return true;
}
/**
* @since 3.0
+ * @deprecated As of 4.2 the legacy mode is always enabled.
*/
+ @Deprecated
public static void setLegacyModeDefault(boolean on)
{
- legacyModeDefault.set(on);
}
/**
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/LegacyModeNotEnabledException.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/LegacyModeNotEnabledException.java
index 9330f9892e..ec404ebf96 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/LegacyModeNotEnabledException.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/LegacyModeNotEnabledException.java
@@ -19,9 +19,11 @@ import org.eclipse.emf.cdo.view.CDOView;
*
* @author Eike Stepper
* @since 3.0
+ * @deprecated As of 4.2 the legacy mode is always enabled.
* @noextend This interface is not intended to be extended by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
+@Deprecated
public class LegacyModeNotEnabledException extends IllegalStateException
{
private static final long serialVersionUID = 1L;
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
index 4b67bc44b4..2bd3de3bc6 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/view/CDOView.java
@@ -163,7 +163,9 @@ public interface CDOView extends CDOCommonView, CDOUpdatable, CDOCommitHistory.P
/**
* @see CDOUtil#setLegacyModeDefault(boolean)
* @since 3.0
+ * @deprecated As of 4.2 the legacy mode is always enabled.
*/
+ @Deprecated
public boolean isLegacyModeEnabled();
/**
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java
index b0db46d0c0..45c1045464 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/query/CDOQueryImpl.java
@@ -41,7 +41,6 @@ public class CDOQueryImpl extends CDOQueryInfoImpl implements CDOQuery
{
super(queryLanguage, queryString, context);
this.view = view;
- setLegacyModeEnabled(view.isLegacyModeEnabled());
}
public InternalCDOView getView()
@@ -177,7 +176,6 @@ public class CDOQueryImpl extends CDOQueryInfoImpl implements CDOQuery
{
CDOQueryInfoImpl queryInfo = new CDOQueryInfoImpl(getQueryLanguage(), getQueryString(), getContext());
queryInfo.setMaxResults(getMaxResults());
- queryInfo.setLegacyModeEnabled(isLegacyModeEnabled());
queryInfo.setChangeSetData(getChangeSetData());
for (Entry<String, Object> entry : getParameters().entrySet())
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index cbf964a97f..5ac10bb9f9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -99,7 +99,6 @@ import org.eclipse.emf.cdo.transaction.CDOUserSavepoint;
import org.eclipse.emf.cdo.util.CDOURIUtil;
import org.eclipse.emf.cdo.util.CDOUtil;
import org.eclipse.emf.cdo.util.CommitException;
-import org.eclipse.emf.cdo.util.LegacyModeNotEnabledException;
import org.eclipse.emf.cdo.util.ObjectNotFoundException;
import org.eclipse.emf.cdo.view.CDOView;
@@ -3004,14 +3003,8 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
{
if (!objects.isEmpty())
{
- boolean noLegacy = !isLegacyModeEnabled();
for (CDOObject object : objects.values())
{
- if (noLegacy && object instanceof CDOObjectWrapper)
- {
- throw new LegacyModeNotEnabledException(object.toString());
- }
-
collectLobs((InternalCDORevision)object.cdoRevision(), lobs);
((InternalCDOObject)object).cdoInternalPreCommit();
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
index 30dea36fdc..25c6e5bee3 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
@@ -122,8 +122,6 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
private final ViewAndState[] viewAndStates = ViewAndState.create(this);
- private final boolean legacyModeEnabled;
-
private CDOBranchPoint branchPoint;
private final CDOURIHandler uriHandler = new CDOURIHandler(this);
@@ -154,15 +152,13 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
@ExcludeFromDump
private transient InternalCDOObject lastLookupObject;
- public AbstractCDOView(CDOBranchPoint branchPoint, boolean legacyModeEnabled)
+ public AbstractCDOView(CDOBranchPoint branchPoint)
{
- this(legacyModeEnabled);
basicSetBranchPoint(branchPoint);
}
- public AbstractCDOView(boolean legacyModeEnabled)
+ public AbstractCDOView()
{
- this.legacyModeEnabled = legacyModeEnabled;
}
public boolean isReadOnly()
@@ -170,9 +166,10 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
return true;
}
+ @Deprecated
public boolean isLegacyModeEnabled()
{
- return legacyModeEnabled;
+ return true;
}
protected synchronized final Map<CDOID, InternalCDOObject> getModifiableObjects()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
index 512920262e..dab8f49d48 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java
@@ -144,13 +144,12 @@ public class CDOViewImpl extends AbstractCDOView
*/
public CDOViewImpl(CDOBranch branch, long timeStamp)
{
- super(branch.getPoint(timeStamp), CDOUtil.isLegacyModeDefault());
+ super(branch.getPoint(timeStamp));
options = createOptions();
}
public CDOViewImpl(String durableLockingID)
{
- super(CDOUtil.isLegacyModeDefault());
this.durableLockingID = durableLockingID;
options = createOptions();
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/FSMUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/FSMUtil.java
index b6d869a8db..9c2f5a0fb8 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/FSMUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/FSMUtil.java
@@ -13,7 +13,6 @@ package org.eclipse.emf.spi.cdo;
import org.eclipse.emf.cdo.CDOObject;
import org.eclipse.emf.cdo.CDOState;
-import org.eclipse.emf.cdo.util.LegacyModeNotEnabledException;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.internal.cdo.CDOObjectImpl;
@@ -98,11 +97,6 @@ public final class FSMUtil
if (object instanceof InternalEObject)
{
- if (!view.isLegacyModeEnabled())
- {
- throw new LegacyModeNotEnabledException(object.toString());
- }
-
return adaptLegacy((InternalEObject)object);
}

Back to the top