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.java78
1 files changed, 78 insertions, 0 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
new file mode 100644
index 0000000000..a549327698
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.ui/src/org/eclipse/emf/cdo/internal/ui/bundle/OM.java
@@ -0,0 +1,78 @@
+/***************************************************************************
+ * Copyright (c) 2004-2007 Eike Stepper, Germany.
+ * 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
+ **************************************************************************/
+package org.eclipse.emf.cdo.internal.ui.bundle;
+
+import org.eclipse.emf.cdo.internal.server.EmptyStoreManager;
+import org.eclipse.emf.cdo.server.IRepositoryManager;
+
+import org.eclipse.net4j.internal.util.om.OSGiActivator;
+import org.eclipse.net4j.util.om.OMBundle;
+import org.eclipse.net4j.util.om.OMLogger;
+import org.eclipse.net4j.util.om.OMPlatform;
+import org.eclipse.net4j.util.om.OMTracer;
+
+/**
+ * @author Eike Stepper
+ */
+public final class OM
+{
+ public static final String BUNDLE_ID = "org.eclipse.emf.cdo.ui"; //$NON-NLS-1$
+
+ public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
+
+ public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
+
+ public static final OMLogger LOG = BUNDLE.logger();
+
+ private OM()
+ {
+ }
+
+ /**
+ * @author Eike Stepper
+ */
+ public static class Activator extends OSGiActivator
+ {
+ @Override
+ protected OMBundle getOMBundle()
+ {
+ return BUNDLE;
+ }
+
+ @Override
+ protected void start() throws Exception
+ {
+ IRepositoryManager.INSTANCE.addRepository("repo1", new EmptyStoreManager());
+ // Properties properties = BUNDLE.getConfigProperties();
+ // String repositories = properties.getProperty("repositories");
+ // if (repositories != null)
+ // {
+ // StringTokenizer tokenizer = new StringTokenizer(repositories, ",");
+ // while (tokenizer.hasMoreTokens())
+ // {
+ // String repositoryName = tokenizer.nextToken().trim();
+ // String storeType = properties.getProperty(repositoryName + ".type");
+ // IDBAdapter adapter = DBUtil.getDBAdapter("derby");
+ // DataSource dataSource = DBUtil.createDataSource(properties,
+ // repositoryName + ".dataSource");
+ // CDODBStoreManager storeManager = new CDODBStoreManager(adapter,
+ // dataSource);
+ // IRepositoryManager.INSTANCE.addRepository("repo1", storeManager);
+ // }
+ // }
+ }
+
+ @Override
+ protected void stop() throws Exception
+ {
+ }
+ }
+}

Back to the top