Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2015-06-10 19:15:57 +0000
committerEike Stepper2015-06-10 19:15:57 +0000
commite63e81f329fa0ee2a78b53bfe080966e752f010c (patch)
tree1864ee0afa68dcc8d4e9acfb52c6ddacb822a7fd /plugins/org.eclipse.emf.cdo.explorer.ui
parentbf85c1c0af74c82fcdc98cc136ece5d4489fbfd2 (diff)
downloadcdo-e63e81f329fa0ee2a78b53bfe080966e752f010c.tar.gz
cdo-e63e81f329fa0ee2a78b53bfe080966e752f010c.tar.xz
cdo-e63e81f329fa0ee2a78b53bfe080966e752f010c.zip
[458349] Consolidate UI
Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=458349
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.explorer.ui')
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/schema/editorOpeners.exsd2
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorOpener.java17
-rw-r--r--plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/repositories/CDORepositoriesView.java4
3 files changed, 17 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/schema/editorOpeners.exsd b/plugins/org.eclipse.emf.cdo.explorer.ui/schema/editorOpeners.exsd
index a1151f2e59..5167ab1aa4 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/schema/editorOpeners.exsd
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/schema/editorOpeners.exsd
@@ -13,7 +13,7 @@
<element name="extension">
<annotation>
<appinfo>
- <meta.element />
+ <meta.element deprecated="true" replacement="org.eclipse.emf.cdo.ui.editorOpeners" />
</appinfo>
</annotation>
<complexType>
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorOpener.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorOpener.java
index 8301ff4105..4f0a9781be 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorOpener.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/checkouts/CDOModelEditorOpener.java
@@ -21,6 +21,7 @@ import org.eclipse.emf.cdo.util.CDOURIUtil;
import org.eclipse.emf.cdo.view.CDOView;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.spi.cdo.CDOMergingConflictResolver;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
@@ -34,6 +35,9 @@ import org.eclipse.ui.IWorkbenchPart;
*/
public class CDOModelEditorOpener extends CDOEditorOpener.Default
{
+ private static final boolean INTERACTIVE_CONFLICT_RESOLUTION = "true"
+ .equalsIgnoreCase(System.getProperty("INTERACTIVE_CONFLICT_RESOLUTION"));
+
public CDOModelEditorOpener()
{
}
@@ -98,10 +102,17 @@ public class CDOModelEditorOpener extends CDOEditorOpener.Default
@SuppressWarnings("restriction")
protected void configureTransaction(CDOTransaction transaction)
{
- org.eclipse.emf.internal.cdo.transaction.CDOHandlingConflictResolver conflictResolver = new org.eclipse.emf.internal.cdo.transaction.CDOHandlingConflictResolver();
- conflictResolver.setConflictHandlerSelector(new InteractiveConflictHandlerSelector());
+ if (INTERACTIVE_CONFLICT_RESOLUTION)
+ {
+ org.eclipse.emf.internal.cdo.transaction.CDOHandlingConflictResolver conflictResolver = new org.eclipse.emf.internal.cdo.transaction.CDOHandlingConflictResolver();
+ conflictResolver.setConflictHandlerSelector(new InteractiveConflictHandlerSelector());
- transaction.options().addConflictResolver(conflictResolver);
+ transaction.options().addConflictResolver(conflictResolver);
+ }
+ else
+ {
+ transaction.options().addConflictResolver(new CDOMergingConflictResolver());
+ }
}
private IEditorPart openEditor(IWorkbenchPage page, CDOView view, String resourcePath)
diff --git a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/repositories/CDORepositoriesView.java b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/repositories/CDORepositoriesView.java
index b28c1a4a70..ef0ac03eb0 100644
--- a/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/repositories/CDORepositoriesView.java
+++ b/plugins/org.eclipse.emf.cdo.explorer.ui/src/org/eclipse/emf/cdo/explorer/ui/repositories/CDORepositoriesView.java
@@ -148,7 +148,7 @@ public class CDORepositoriesView extends ContainerView
properties.setProperty(LocalCDORepository.PROP_LABEL, "repo2");
properties.setProperty(LocalCDORepository.PROP_NAME, "repo2");
properties.setProperty(CDORepositoryImpl.PROP_VERSIONING_MODE, VersioningMode.Branching.toString());
- properties.setProperty(CDORepositoryImpl.PROP_ID_GENERATION, IDGeneration.UUID.toString());
+ properties.setProperty(CDORepositoryImpl.PROP_ID_GENERATION, IDGeneration.Counter.toString());
properties.setProperty(LocalCDORepository.PROP_TCP_DISABLED, "false");
properties.setProperty(LocalCDORepository.PROP_TCP_PORT, "2037");
@@ -177,7 +177,7 @@ public class CDORepositoriesView extends ContainerView
transaction.commit();
- RepositoryCheckoutHandlerQuick.checkout(repository, CDOCheckout.TYPE_ONLINE_HISTORICAL);
+ RepositoryCheckoutHandlerQuick.checkout(repository, CDOCheckout.TYPE_ONLINE_TRANSACTIONAL);
}
catch (ConcurrentAccessException ex)

Back to the top