Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/bundle/OM.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/bundle/OM.java62
1 files changed, 29 insertions, 33 deletions
diff --git a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/bundle/OM.java b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/bundle/OM.java
index 57256e95e3..2b1dab755b 100644
--- a/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/bundle/OM.java
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/bundle/OM.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007-2009, 2011, 2012, 2015, 2016, 2018, 2021 Eike Stepper (Loehne, Germany) and others.
+ * Copyright (c) 2007-2009, 2011, 2012, 2015, 2016, 2018, 2021, 2022 Eike Stepper (Loehne, 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
@@ -14,6 +14,8 @@ package org.eclipse.emf.cdo.internal.ui.bundle;
import org.eclipse.emf.cdo.ui.CDOEditorOpener;
import org.eclipse.emf.cdo.ui.CDOLabelDecorator;
import org.eclipse.emf.cdo.ui.OverlayImage;
+import org.eclipse.emf.cdo.ui.Support;
+import org.eclipse.emf.cdo.ui.UserInfo;
import org.eclipse.net4j.util.om.OMBundle;
import org.eclipse.net4j.util.om.OMPlatform;
@@ -23,7 +25,6 @@ import org.eclipse.net4j.util.om.pref.OMPreferences;
import org.eclipse.net4j.util.om.trace.OMTracer;
import org.eclipse.net4j.util.ui.UIActivator;
-import org.eclipse.emf.common.CommonPlugin;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.edit.provider.ComposedImage;
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
@@ -63,51 +64,40 @@ public abstract class OM
public static final OMPreference<Boolean> PREF_AUTOMATIC_PACKAGE_REGISTRY = //
PREFS.init("PREF_AUTOMATIC_PACKAGE_REGISTRY", true); //$NON-NLS-1$
- public static final OMPreference<Boolean> PREF_LEGACY_MODE_DEFAULT = //
- PREFS.init("PREF_LEGACY_MODE_DEFAULT", true); //$NON-NLS-1$
-
public static final OMPreference<Boolean> PREF_EDITOR_AUTO_RELOAD = //
PREFS.init("PREF_EDITOR_AUTO_RELOAD", true); //$NON-NLS-1$
public static final OMPreference<Long> PREF_LOCK_TIMEOUT = //
PREFS.init("PREF_LOCK_TIMEOUT", 10000L); //$NON-NLS-1$
- private static Boolean historySupportAvailable;
+ public static final OMPreference<Boolean> PREF_TOPICS_LINK_WITH_EDITOR = //
+ PREFS.init("PREF_TOPICS_LINK_WITH_EDITOR", false); //$NON-NLS-1$
+
+ public static final OMPreference<String> PREF_USER_FIRST_NAME = //
+ PREFS.init("PREF_USER_FIRST_NAME", ""); //$NON-NLS-1$
+
+ public static final OMPreference<String> PREF_USER_LAST_NAME = //
+ PREFS.init("PREF_USER_LAST_NAME", ""); //$NON-NLS-1$
- private static Boolean compareSupportAvailable;
+ public static final OMPreference<String> PREF_USER_DISPLAY_NAME = //
+ PREFS.init("PREF_USER_DISPLAY_NAME", System.getProperty("user.name")); //$NON-NLS-1$
+ /**
+ * @deprecated As of 4.13 use {@link Support#HISTORY Support.HISTORY.isAvailable()}.
+ */
+ @Deprecated
public static boolean isHistorySupportAvailable()
{
- if (historySupportAvailable == null)
- {
- try
- {
- historySupportAvailable = CommonPlugin.loadClass("org.eclipse.emf.cdo.ui.team", "org.eclipse.emf.cdo.ui.internal.team.history.CDOHistoryPage") != null;
- }
- catch (Throwable ex)
- {
- historySupportAvailable = false;
- }
- }
-
- return historySupportAvailable;
+ return Support.HISTORY.isAvailable();
}
+ /**
+ * @deprecated As of 4.13 use {@link Support#COMPARE Support.COMPARE.isAvailable()}.
+ */
+ @Deprecated
public static boolean isCompareSupportAvailable()
{
- if (compareSupportAvailable == null)
- {
- try
- {
- compareSupportAvailable = CommonPlugin.loadClass("org.eclipse.emf.cdo.ui.compare", "org.eclipse.emf.cdo.ui.compare.CDOCompareEditorUtil") != null;
- }
- catch (Throwable ex)
- {
- compareSupportAvailable = false;
- }
- }
-
- return compareSupportAvailable;
+ return Support.COMPARE.isAvailable();
}
public static Image getOverlayImage(Object image, Object overlayImage, int x, int y)
@@ -153,6 +143,12 @@ public abstract class OM
@Override
protected void doStop() throws Exception
{
+ UserInfo.Manager userInfoManager = UserInfo.Manager.getInstanceOrNull();
+ if (userInfoManager != null)
+ {
+ userInfoManager.deactivate();
+ }
+
CDOEditorOpener.Registry.INSTANCE.deactivate();
}
}

Back to the top