Index: plugin.xml =================================================================== RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.core/plugin.xml,v retrieving revision 1.19 diff -u -r1.19 plugin.xml --- plugin.xml 5 Feb 2008 03:13:27 -0000 1.19 +++ plugin.xml 28 Oct 2008 15:38:07 -0000 @@ -19,6 +19,7 @@ + - \ No newline at end of file + Index: plugin.properties =================================================================== RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.core/plugin.properties,v retrieving revision 1.26 diff -u -r1.26 plugin.properties --- plugin.properties 5 Feb 2008 03:13:27 -0000 1.26 +++ plugin.properties 28 Oct 2008 15:38:07 -0000 @@ -14,6 +14,7 @@ extensionPointServerStartup=Server Startup extensionPointModuleTypes=Module Types extensionPointRuntimeTypes=Runtime Types +extensionPointRuntimeModuleType=Runtime Module Types extensionPointRuntimeTargetHandlers=Runtime Target Handlers extensionPointRuntimeLocators=Runtime Locators extensionPointServerTypes=Server Types Index: servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java =================================================================== RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java,v retrieving revision 1.59.2.1 diff -u -r1.59.2.1 ServerBehaviourDelegate.java --- servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java 20 Oct 2008 20:59:51 -0000 1.59.2.1 +++ servercore/org/eclipse/wst/server/core/model/ServerBehaviourDelegate.java 28 Oct 2008 15:38:07 -0000 @@ -13,7 +13,14 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import org.eclipse.core.runtime.*; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.core.runtime.Status; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.osgi.util.NLS; @@ -21,7 +28,13 @@ import org.eclipse.wst.server.core.IServer; import org.eclipse.wst.server.core.IServerWorkingCopy; import org.eclipse.wst.server.core.TaskModel; -import org.eclipse.wst.server.core.internal.*; +import org.eclipse.wst.server.core.internal.ExternalModule; +import org.eclipse.wst.server.core.internal.Messages; +import org.eclipse.wst.server.core.internal.ProgressUtil; +import org.eclipse.wst.server.core.internal.Publisher; +import org.eclipse.wst.server.core.internal.Server; +import org.eclipse.wst.server.core.internal.ServerPlugin; +import org.eclipse.wst.server.core.internal.Trace; /** * A server delegate provides the implementation for various * generic and server-type-specific operations for a specific type of server. Index: servercore/org/eclipse/wst/server/core/ServerCore.java =================================================================== RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/ServerCore.java,v retrieving revision 1.39 diff -u -r1.39 ServerCore.java --- servercore/org/eclipse/wst/server/core/ServerCore.java 4 Mar 2008 22:41:08 -0000 1.39 +++ servercore/org/eclipse/wst/server/core/ServerCore.java 28 Oct 2008 15:38:07 -0000 @@ -32,6 +32,7 @@ public final class ServerCore { private static final String EXTENSION_SERVER_TYPE = "serverTypes"; private static final String EXTENSION_RUNTIME_TYPE = "runtimeTypes"; + private static final String EXTENSION_RUNTIME_MODULE_TYPE = "runtimeModuleType"; // cached copy of all runtime types private static List runtimeTypes; @@ -190,6 +191,8 @@ IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, EXTENSION_RUNTIME_TYPE); List list = new ArrayList(cf.length); addRuntimeTypes(cf, list); + cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, EXTENSION_RUNTIME_MODULE_TYPE); + addRuntimeModuleTypes(cf, list); addRegistryListener(); runtimeTypes = list; @@ -197,6 +200,34 @@ } /** + * Load the Loose Module Types. + */ + private static synchronized void addRuntimeModuleTypes(IConfigurationElement[] cf, List runtimeTypesList) { + if (runtimeTypesList == null){ + Trace.trace(Trace.EXTENSION_POINT, " runtimeTypeList is null"); + return; + } + + for (IConfigurationElement ce : cf) { + try { + String [] looseModuleRuntimeIds = ServerPlugin.tokenize(ce.getAttribute("runtimeTypes"), ","); + if (looseModuleRuntimeIds.length >= 0){ + Trace.trace(Trace.EXTENSION_POINT, " runtimeTypes on extension point definition is empty"); + return; + } + + for (IRuntimeType runtimeType: runtimeTypesList){ + ServerPlugin.contains(looseModuleRuntimeIds, runtimeType.getId()); + ((RuntimeType)runtimeType).addModuleType(ce); + Trace.trace(Trace.EXTENSION_POINT, " Loaded Runtime supported ModuleType: " + ce.getAttribute("id")); + } + } catch (Throwable t) { + Trace.trace(Trace.SEVERE, " Could not load Runtime supported ModuleType: " + ce.getAttribute("id"), t); + } + } + } + + /** * Load the runtime types. */ private static synchronized void addRuntimeTypes(IConfigurationElement[] cf, List list) { Index: servercore/org/eclipse/wst/server/core/internal/RuntimeType.java =================================================================== RCS file: /cvsroot/webtools/servertools/plugins/org.eclipse.wst.server.core/servercore/org/eclipse/wst/server/core/internal/RuntimeType.java,v retrieving revision 1.15 diff -u -r1.15 RuntimeType.java --- servercore/org/eclipse/wst/server/core/internal/RuntimeType.java 29 Aug 2007 14:18:33 -0000 1.15 +++ servercore/org/eclipse/wst/server/core/internal/RuntimeType.java 28 Oct 2008 15:38:07 -0000 @@ -12,9 +12,7 @@ import java.util.List; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.*; import org.eclipse.wst.server.core.*; import org.eclipse.wst.server.core.model.RuntimeDelegate; /** @@ -128,6 +126,24 @@ return new IModuleType[0]; } } + + /** + * Adds a Loose ModuleType to this runtime + * @param moduleType + * @throws CoreException if the moduleType is null or if already added + */ + public void addModuleType(IConfigurationElement cfe) throws CoreException{ + if (cfe == null) + throw new CoreException(new Status(IStatus.ERROR,ServerPlugin.PLUGIN_ID," moduleType")); + + IConfigurationElement [] childs = cfe.getChildren("moduleType"); + if (childs.length < 1) + throw new CoreException(new Status(IStatus.ERROR,ServerPlugin.PLUGIN_ID,"No moduleType found for runtime")); + + List extraModuleTypes = ServerPlugin.getModuleTypes(childs); + moduleTypes.addAll(extraModuleTypes); + + } public boolean canCreate() { try { Index: schema/runtimeModuleType.exsd =================================================================== RCS file: schema/runtimeModuleType.exsd diff -N schema/runtimeModuleType.exsd --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ schema/runtimeModuleType.exsd 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,143 @@ + + + + + + + + + This extension point is used to provide a supported ModuleType for a Runtime + +<b>Provisional API:</b> +This class/interface/extension point is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + specifies a comma separated list of the unique identifier of the runtimeTypes that supports this module + + + + + + + specifies a unique identifier for this extension point + + + + + + + + + + + + a comma separated list of the module types that this runtime supports + + + + + + + a comma separated list of the module versions that this runtime supports + + + + + + + + + + + + 3.0.3 + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + + + + + Copyright (c) 2008 IBM Corporation and others.<br> +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 +<a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a> + + + +