Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 116307 Details for
Bug 249531
Cannot add new module type support to an existing runtime type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
v1.1
new-ep-patch-v1.1.txt (text/plain), 13.25 KB, created by
Angel Vera
on 2008-10-28 11:39:38 EDT
(
hide
)
Description:
v1.1
Filename:
MIME Type:
Creator:
Angel Vera
Created:
2008-10-28 11:39:38 EDT
Size:
13.25 KB
patch
obsolete
>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 @@ > <extension-point id="installableServers" name="%extensionPointInstallableServers" schema="schema/installableServers.exsd"/> > <extension-point id="installableRuntimes" name="%extensionPointInstallableRuntimes" schema="schema/installableRuntimes.exsd"/> > <extension-point id="runtimeFacetComponentProviders" name="%extensionPointRuntimeFacetComponentProviders" schema="schema/runtimeFacetComponentProviders.exsd"/> >+ <extension-point id="runtimeModuleType" name="%extensionPointRuntimeModuleType" schema="schema/runtimeModuleType.exsd"/> > > <extension point="org.eclipse.wst.server.core.moduleTypes"> > <moduleType >@@ -34,4 +35,4 @@ > id="org.eclipse.wst.server.core.default" > class="org.eclipse.wst.server.core.internal.facets.RuntimeBridge"/> > </extension> >-</plugin> >\ No newline at end of file >+</plugin> >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<IRuntimeType> runtimeTypes; >@@ -190,6 +191,8 @@ > IConfigurationElement[] cf = registry.getConfigurationElementsFor(ServerPlugin.PLUGIN_ID, EXTENSION_RUNTIME_TYPE); > List<IRuntimeType> list = new ArrayList<IRuntimeType>(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<IRuntimeType> 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<IRuntimeType> 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,"<null> 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<IModuleType> 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 @@ >+<?xml version='1.0' encoding='UTF-8'?> >+<!-- Schema file written by PDE --> >+<schema targetNamespace="org.eclipse.wst.server.core" xmlns="http://www.w3.org/2001/XMLSchema"> >+<annotation> >+ <appinfo> >+ <meta.schema plugin="org.eclipse.wst.server.core" id="runtimeSupportedModuleType" name="Runtime Supported Module"/> >+ </appinfo> >+ <documentation> >+ 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. >+ </documentation> >+ </annotation> >+ >+ <element name="extension"> >+ <annotation> >+ <appinfo> >+ <meta.element /> >+ </appinfo> >+ </annotation> >+ <complexType> >+ <sequence> >+ <element ref="runtimeModuleType" minOccurs="1" maxOccurs="unbounded"/> >+ </sequence> >+ <attribute name="point" type="string" use="required"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="name" type="string"> >+ <annotation> >+ <documentation> >+ >+ </documentation> >+ <appinfo> >+ <meta.attribute translatable="true"/> >+ </appinfo> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="runtimeModuleType"> >+ <complexType> >+ <sequence> >+ <element ref="moduleType" minOccurs="1" maxOccurs="unbounded"/> >+ </sequence> >+ <attribute name="runtimeTypes" type="string" use="required"> >+ <annotation> >+ <documentation> >+ specifies a comma separated list of the unique identifier of the runtimeTypes that supports this module >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="id" type="string" use="required"> >+ <annotation> >+ <documentation> >+ specifies a unique identifier for this extension point >+ </documentation> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <element name="moduleType"> >+ <complexType> >+ <attribute name="types" type="string" use="required"> >+ <annotation> >+ <documentation> >+ a comma separated list of the module types that this runtime supports >+ </documentation> >+ </annotation> >+ </attribute> >+ <attribute name="versions" type="string" use="required"> >+ <annotation> >+ <documentation> >+ a comma separated list of the module versions that this runtime supports >+ </documentation> >+ </annotation> >+ </attribute> >+ </complexType> >+ </element> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="since"/> >+ </appinfo> >+ <documentation> >+ 3.0.3 >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="examples"/> >+ </appinfo> >+ <documentation> >+ [Enter extension point usage example here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="apiinfo"/> >+ </appinfo> >+ <documentation> >+ [Enter API information here.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="implementation"/> >+ </appinfo> >+ <documentation> >+ [Enter information about supplied implementation of this extension point.] >+ </documentation> >+ </annotation> >+ >+ <annotation> >+ <appinfo> >+ <meta.section type="copyright"/> >+ </appinfo> >+ <documentation> >+ 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> >+ </documentation> >+ </annotation> >+ >+</schema>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249531
:
115400
|
115470
|
115471
|
115710
|
116306
|
116307
|
116478