summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-06-30 12:43:37 (EDT)
committerEike Stepper2007-06-30 12:43:37 (EDT)
commit9bbb83d2cf450a8e6474abc3b15d1d3f82d566b5 (patch)
treeb9ebc6c75f70e42275285678227b7abaa0e09981
parente4690895b71ebcf430665f4b77bb6790e9e11c0f (diff)
downloadcdo-9bbb83d2cf450a8e6474abc3b15d1d3f82d566b5.zip
cdo-9bbb83d2cf450a8e6474abc3b15d1d3f82d566b5.tar.gz
cdo-9bbb83d2cf450a8e6474abc3b15d1d3f82d566b5.tar.bz2
task 1: Develop 0.8.0
-rw-r--r--plugins/org.eclipse.emf.cdo.server/plugin.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.ui/CDO UI.launch2
-rw-r--r--plugins/org.eclipse.emf.cdo/plugin.xml4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java7
-rw-r--r--plugins/org.eclipse.net4j.jvm/plugin.xml2
-rw-r--r--plugins/org.eclipse.net4j.tcp/plugin.xml4
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java22
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/FactoryNotFoundException.java38
8 files changed, 61 insertions, 20 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/plugin.xml b/plugins/org.eclipse.emf.cdo.server/plugin.xml
index 4973c6a..4aec906 100644
--- a/plugins/org.eclipse.emf.cdo.server/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.server/plugin.xml
@@ -4,7 +4,7 @@
<plugin>
<extension
- point="org.eclipse.net4j.factories">
+ point="org.eclipse.net4j.util.factories">
<factory
class="org.eclipse.emf.cdo.internal.server.protocol.CDOServerProtocolFactory"
productGroup="org.eclipse.net4j.serverProtocols"
diff --git a/plugins/org.eclipse.emf.cdo.ui/CDO UI.launch b/plugins/org.eclipse.emf.cdo.ui/CDO UI.launch
index 0d1ef17..ff9a2cf 100644
--- a/plugins/org.eclipse.emf.cdo.ui/CDO UI.launch
+++ b/plugins/org.eclipse.emf.cdo.ui/CDO UI.launch
@@ -20,7 +20,7 @@
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
<stringAttribute key="selectedPlugin" value="org.eclipse.emf.cdo.ui"/>
<stringAttribute key="selected_target_plugins" value="com.ibm.icu,com.jcraft.jsch,javax.servlet,javax.servlet.jsp,org.apache.ant,org.apache.commons.el,org.apache.commons.logging,org.apache.jasper,org.apache.lucene,org.apache.lucene.analysis,org.eclipse.ant.core,org.eclipse.ant.ui,org.eclipse.compare,org.eclipse.core.boot,org.eclipse.core.commands,org.eclipse.core.contenttype,org.eclipse.core.databinding,org.eclipse.core.databinding.beans,org.eclipse.core.expressions,org.eclipse.core.filebuffers,org.eclipse.core.filesystem,org.eclipse.core.filesystem.win32.x86,org.eclipse.core.jobs,org.eclipse.core.net,org.eclipse.core.resources,org.eclipse.core.resources.compatibility,org.eclipse.core.resources.win32,org.eclipse.core.runtime,org.eclipse.core.runtime.compatibility,org.eclipse.core.runtime.compatibility.auth,org.eclipse.core.runtime.compatibility.registry,org.eclipse.core.variables,org.eclipse.cvs,org.eclipse.cvs.source,org.eclipse.debug.core,org.eclipse.debug.ui,org.eclipse.emf,org.eclipse.emf.ant,org.eclipse.emf.cheatsheets,org.eclipse.emf.codegen,org.eclipse.emf.codegen.ecore,org.eclipse.emf.codegen.ecore.ui,org.eclipse.emf.codegen.ui,org.eclipse.emf.common,org.eclipse.emf.common.ui,org.eclipse.emf.commonj.sdo,org.eclipse.emf.converter,org.eclipse.emf.doc,org.eclipse.emf.ecore,org.eclipse.emf.ecore.change,org.eclipse.emf.ecore.change.edit,org.eclipse.emf.ecore.edit,org.eclipse.emf.ecore.editor,org.eclipse.emf.ecore.sdo,org.eclipse.emf.ecore.sdo.doc,org.eclipse.emf.ecore.sdo.edit,org.eclipse.emf.ecore.sdo.editor,org.eclipse.emf.ecore.sdo.source,org.eclipse.emf.ecore.xmi,org.eclipse.emf.edit,org.eclipse.emf.edit.ui,org.eclipse.emf.exporter,org.eclipse.emf.importer,org.eclipse.emf.importer.ecore,org.eclipse.emf.importer.java,org.eclipse.emf.importer.rose,org.eclipse.emf.mapping,org.eclipse.emf.mapping.ecore2ecore,org.eclipse.emf.mapping.ecore2ecore.editor,org.eclipse.emf.mapping.ecore2xml,org.eclipse.emf.mapping.ecore2xml.ui,org.eclipse.emf.mapping.ui,org.eclipse.emf.mapping.xsd2ecore,org.eclipse.emf.mapping.xsd2ecore.editor,org.eclipse.emf.source,org.eclipse.equinox.app,org.eclipse.equinox.common,org.eclipse.equinox.http.jetty,org.eclipse.equinox.http.registry,org.eclipse.equinox.http.servlet,org.eclipse.equinox.jsp.jasper,org.eclipse.equinox.jsp.jasper.registry,org.eclipse.equinox.launcher,org.eclipse.equinox.launcher.win32.win32.x86,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.help,org.eclipse.help.appserver,org.eclipse.help.base,org.eclipse.help.ui,org.eclipse.help.webapp,org.eclipse.jdt,org.eclipse.jdt.apt.core,org.eclipse.jdt.apt.ui,org.eclipse.jdt.compiler.apt,org.eclipse.jdt.compiler.tool,org.eclipse.jdt.core,org.eclipse.jdt.core.manipulation,org.eclipse.jdt.debug,org.eclipse.jdt.debug.ui,org.eclipse.jdt.doc.isv,org.eclipse.jdt.doc.user,org.eclipse.jdt.junit,org.eclipse.jdt.junit.runtime,org.eclipse.jdt.junit4.runtime,org.eclipse.jdt.launching,org.eclipse.jdt.source,org.eclipse.jdt.ui,org.eclipse.jface,org.eclipse.jface.databinding,org.eclipse.jface.text,org.eclipse.jsch.core,org.eclipse.ltk.core.refactoring,org.eclipse.ltk.ui.refactoring,org.eclipse.osgi,org.eclipse.osgi.services,org.eclipse.osgi.util,org.eclipse.pde,org.eclipse.pde.build,org.eclipse.pde.core,org.eclipse.pde.doc.user,org.eclipse.pde.junit.runtime,org.eclipse.pde.runtime,org.eclipse.pde.source,org.eclipse.pde.ui,org.eclipse.pde.ui.templates,org.eclipse.platform,org.eclipse.platform.doc.isv,org.eclipse.platform.source,org.eclipse.platform.source.win32.win32.x86,org.eclipse.rcp,org.eclipse.rcp.source,org.eclipse.rcp.source.win32.win32.x86,org.eclipse.sdk,org.eclipse.search,org.eclipse.swt,org.eclipse.swt.win32.win32.x86,org.eclipse.team.core,org.eclipse.team.cvs.core,org.eclipse.team.cvs.ssh,org.eclipse.team.cvs.ssh2,org.eclipse.team.cvs.ui,org.eclipse.team.ui,org.eclipse.text,org.eclipse.tomcat,org.eclipse.ui,org.eclipse.ui.browser,org.eclipse.ui.cheatsheets,org.eclipse.ui.console,org.eclipse.ui.editors,org.eclipse.ui.externaltools,org.eclipse.ui.forms,org.eclipse.ui.ide,org.eclipse.ui.ide.application,org.eclipse.ui.intro,org.eclipse.ui.intro.universal,org.eclipse.ui.navigator,org.eclipse.ui.navigator.resources,org.eclipse.ui.presentations.r21,org.eclipse.ui.views,org.eclipse.ui.views.properties.tabbed,org.eclipse.ui.win32,org.eclipse.ui.workbench,org.eclipse.ui.workbench.compatibility,org.eclipse.ui.workbench.texteditor,org.eclipse.update.configurator,org.eclipse.update.core,org.eclipse.update.core.win32,org.eclipse.update.scheduler,org.eclipse.update.ui,org.eclipse.xsd,org.eclipse.xsd.cheatsheets,org.eclipse.xsd.doc,org.eclipse.xsd.ecore.exporter,org.eclipse.xsd.ecore.importer,org.eclipse.xsd.edit,org.eclipse.xsd.editor,org.eclipse.xsd.source,org.junit,org.junit4,org.mortbay.jetty"/>
-<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.server,org.eclipse.emf.cdo.protocol,org.eclipse.emf.cdo.tests.model1.editor,org.eclipse.emf.cdo.tests.model1.edit,org.eclipse.net4j.util,org.eclipse.emf.cdo.ui,org.eclipse.emf.cdo.tests.model1,org.eclipse.net4j,org.eclipse.net4j.tcp,org.eclipse.net4j.ui,org.eclipse.emf.cdo"/>
+<stringAttribute key="selected_workspace_plugins" value="org.eclipse.emf.cdo.protocol,org.eclipse.emf.cdo.tests.model1.editor,org.eclipse.emf.cdo.tests.model1.edit,org.eclipse.net4j.util,org.eclipse.emf.cdo.server,org.eclipse.emf.cdo.ui,org.eclipse.emf.cdo.tests.model1,org.eclipse.net4j,org.eclipse.net4j.tcp,org.eclipse.emf.cdo,org.eclipse.net4j.ui"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="true"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
diff --git a/plugins/org.eclipse.emf.cdo/plugin.xml b/plugins/org.eclipse.emf.cdo/plugin.xml
index a26c6c4..e8cbfe5 100644
--- a/plugins/org.eclipse.emf.cdo/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo/plugin.xml
@@ -4,7 +4,7 @@
<plugin>
<extension
- point="org.eclipse.net4j.factories">
+ point="org.eclipse.net4j.util.factories">
<factory
class="org.eclipse.emf.internal.cdo.protocol.CDOClientProtocolFactory"
productGroup="org.eclipse.net4j.clientProtocols"
@@ -16,7 +16,7 @@
</extension>
<extension
- point="org.eclipse.net4j.elementProcessors">
+ point="org.eclipse.net4j.util.elementProcessors">
<elementProcessor
class="org.eclipse.emf.internal.cdo.ChannelInjector">
</elementProcessor>
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
index 4acecac..ba91ad5 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOSessionImpl.java
@@ -10,9 +10,9 @@
**************************************************************************/
package org.eclipse.emf.internal.cdo;
-import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.CDOSession;
import org.eclipse.emf.cdo.CDOSessionAdaptersEvent;
+import org.eclipse.emf.cdo.CDOView;
import org.eclipse.emf.cdo.protocol.CDOID;
import org.eclipse.emf.cdo.util.CDOUtil;
@@ -83,6 +83,11 @@ public class CDOSessionImpl extends Lifecycle implements CDOSession
public IConnector getConnector()
{
+ if (channel == null)
+ {
+ return null;
+ }
+
return channel.getConnector();
}
diff --git a/plugins/org.eclipse.net4j.jvm/plugin.xml b/plugins/org.eclipse.net4j.jvm/plugin.xml
index 5aa799c..ba1b505 100644
--- a/plugins/org.eclipse.net4j.jvm/plugin.xml
+++ b/plugins/org.eclipse.net4j.jvm/plugin.xml
@@ -4,7 +4,7 @@
<plugin>
<extension
- point="org.eclipse.net4j.factories">
+ point="org.eclipse.net4j.util.factories">
<factory
class="org.eclipse.net4j.internal.jvm.JVMAcceptorFactory"
productGroup="org.eclipse.net4j.acceptors"
diff --git a/plugins/org.eclipse.net4j.tcp/plugin.xml b/plugins/org.eclipse.net4j.tcp/plugin.xml
index 774c703..3f73332 100644
--- a/plugins/org.eclipse.net4j.tcp/plugin.xml
+++ b/plugins/org.eclipse.net4j.tcp/plugin.xml
@@ -4,7 +4,7 @@
<plugin>
<extension
- point="org.eclipse.net4j.factories">
+ point="org.eclipse.net4j.util.factories">
<factory
class="org.eclipse.net4j.internal.tcp.TCPAcceptorFactory"
productGroup="org.eclipse.net4j.acceptors"
@@ -19,7 +19,7 @@
type="tcp"/>
</extension>
<extension
- point="org.eclipse.net4j.elementProcessors">
+ point="org.eclipse.net4j.util.elementProcessors">
<elementProcessor
class="org.eclipse.net4j.internal.tcp.TCPSelectorInjector">
</elementProcessor>
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java
index fd564be..553400b 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/container/ManagedContainer.java
@@ -16,6 +16,7 @@ import org.eclipse.net4j.internal.util.lifecycle.Lifecycle;
import org.eclipse.net4j.internal.util.lifecycle.LifecycleEventAdapter;
import org.eclipse.net4j.internal.util.registry.HashMapRegistry;
import org.eclipse.net4j.util.ObjectUtil;
+import org.eclipse.net4j.util.container.FactoryNotFoundException;
import org.eclipse.net4j.util.container.IContainerDelta;
import org.eclipse.net4j.util.container.IContainerEvent;
import org.eclipse.net4j.util.container.IElementProcessor;
@@ -245,15 +246,12 @@ public class ManagedContainer extends Lifecycle implements IManagedContainer
if (element == null)
{
element = createElement(productGroup, factoryType, description);
- if (element != null)
- {
- element = postProcessElement(productGroup, factoryType, description, element);
- LifecycleUtil.activate(element);
- EventUtil.addListener(element, elementListener);
- key.setID(++maxElementID);
- elementRegistry.put(key, element);
- fireEvent(new SingleDeltaContainerEvent(this, element, IContainerDelta.Kind.ADDED));
- }
+ element = postProcessElement(productGroup, factoryType, description, element);
+ LifecycleUtil.activate(element);
+ EventUtil.addListener(element, elementListener);
+ key.setID(++maxElementID);
+ elementRegistry.put(key, element);
+ fireEvent(new SingleDeltaContainerEvent(this, element, IContainerDelta.Kind.ADDED));
}
return element;
@@ -388,12 +386,12 @@ public class ManagedContainer extends Lifecycle implements IManagedContainer
{
FactoryKey key = new FactoryKey(productGroup, factoryType);
IFactory factory = getFactoryRegistry().get(key);
- if (factory != null)
+ if (factory == null)
{
- return factory.create(description);
+ throw new FactoryNotFoundException("Factory not found: " + key);
}
- return null;
+ return factory.create(description);
}
protected Object postProcessElement(String productGroup, String factoryType, String description, Object element)
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/FactoryNotFoundException.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/FactoryNotFoundException.java
new file mode 100644
index 0000000..0a7754d
--- /dev/null
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/container/FactoryNotFoundException.java
@@ -0,0 +1,38 @@
+/***************************************************************************
+ * 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.net4j.util.container;
+
+/**
+ * @author Eike Stepper
+ */
+public class FactoryNotFoundException extends RuntimeException
+{
+ private static final long serialVersionUID = 1L;
+
+ public FactoryNotFoundException()
+ {
+ }
+
+ public FactoryNotFoundException(String message)
+ {
+ super(message);
+ }
+
+ public FactoryNotFoundException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public FactoryNotFoundException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+}