Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/ManagedContainerViewProvider.java')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/ManagedContainerViewProvider.java47
1 files changed, 47 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/ManagedContainerViewProvider.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/ManagedContainerViewProvider.java
new file mode 100644
index 0000000000..b028d5194d
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/ManagedContainerViewProvider.java
@@ -0,0 +1,47 @@
+/***************************************************************************
+ * Copyright (c) 2004 - 2008 Eike Stepper 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
+ **************************************************************************/
+package org.eclipse.emf.cdo.util;
+
+import org.eclipse.net4j.util.container.IManagedContainer;
+import org.eclipse.net4j.util.om.OMPlatform;
+
+/**
+ * Base class for <code>ManagedContainer</code> based <code>CDOViewProvider</code>
+ *
+ * @author Victor Roldan Betancort
+ * @since 2.0
+ */
+public abstract class ManagedContainerViewProvider extends AbstractCDOViewProvider
+{
+ private IManagedContainer container;
+
+ public ManagedContainerViewProvider(IManagedContainer container, String regex, int priority)
+ {
+ super(regex, priority);
+ this.container = container;
+ }
+
+ protected IManagedContainer getContainer()
+ {
+ return container;
+ }
+
+ @Override
+ public int getPriority()
+ {
+ if (!OMPlatform.INSTANCE.isOSGiRunning())
+ {
+ return Integer.MIN_VALUE;
+ }
+
+ return super.getPriority();
+ }
+}

Back to the top