summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-01-19 13:17:11 (EST)
committerEike Stepper2008-01-19 13:17:11 (EST)
commit39eba0af546ee1c577a253cb62c3ae5845db2891 (patch)
treeccf13c1d8d4a133ae9326fa2e8bf331cf950ff27
parent0854fd2b21a48f762649686f04b998dca92a0313 (diff)
downloadcdo-39eba0af546ee1c577a253cb62c3ae5845db2891.zip
cdo-39eba0af546ee1c577a253cb62c3ae5845db2891.tar.gz
cdo-39eba0af546ee1c577a253cb62c3ae5845db2891.tar.bz2
[215890] Deactivate Legacy Support button if legacy system unavailable
https://bugs.eclipse.org/bugs/show_bug.cgi?id=215890
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java3
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java7
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java
index cb131ba..76687c8 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/dialogs/OpenSessionDialog.java
@@ -13,6 +13,8 @@ package org.eclipse.emf.cdo.internal.ui.dialogs;
import org.eclipse.emf.cdo.internal.ui.SharedIcons;
import org.eclipse.emf.cdo.internal.ui.bundle.OM;
+import org.eclipse.emf.internal.cdo.util.FSMUtil;
+
import org.eclipse.net4j.internal.util.collection.PreferenceHistory;
import org.eclipse.net4j.util.collection.IHistory;
import org.eclipse.net4j.util.ui.UIUtil;
@@ -120,6 +122,7 @@ public class OpenSessionDialog extends TitleAreaDialog
new Label(composite, SWT.NONE);
legacy = new PreferenceButton(composite, SWT.CHECK, "Legacy Support", OM.PREF_LEGACY_SUPPORT);
+ legacy.getButton().setEnabled(FSMUtil.isLegacySystemAvailable());
connector.setFocus();
connector.getCombo().addFocusListener(new FocusListener()
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
index 0100f1a..f1c6926 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/util/FSMUtil.java
@@ -66,6 +66,11 @@ public final class FSMUtil
return null;
}
+ public static boolean isLegacySystemAvailable()
+ {
+ return adaptLegacyMethod != null;
+ }
+
public static boolean isTransient(CDOObject object)
{
CDOState state = object.cdoState();
@@ -109,7 +114,7 @@ public final class FSMUtil
}
}
- if (adaptLegacyMethod != null)
+ if (isLegacySystemAvailable())
{
try
{