Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 249531

Summary: Cannot add new module type support to an existing runtime type
Product: [WebTools] WTP ServerTools Reporter: Elson Yuen <eyuen7>
Component: wst.serverAssignee: Angel Vera <arvera>
Status: RESOLVED FIXED QA Contact: Angel Vera <arvera>
Severity: enhancement    
Priority: P3 CC: deboer
Version: 3.0Keywords: plan
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/r/108881
Whiteboard:
Attachments:
Description Flags
v0.1
none
v0.2
none
v0.2
none
v0.3
none
v1.0
none
v1.1
none
v2.0 none

Description Elson Yuen CLA 2008-10-02 14:15:07 EDT
Build ID: 3.0.3

Steps To Reproduce:
The current org.eclipse.wst.server.core.runtimeTypes extension point has the moduleTypes element that allows adopters to list the supported module types when defining a new runtime type.

This API currently requires setting the full list of supported module types in the runtime type definition.  If a new module type has been added, then the original runtime type definition needs to be modified in order to support the new module types.  

This bug is to request a new extension point to be added to allow adding new module type support to an existing runtime type outside of the runtimeTypes definition.

More information:
Comment 1 Angel Vera CLA 2008-10-17 10:40:56 EDT
Created attachment 115400 [details]
v0.1

The following changes is not a complete fix but an initial proposal of the changes. The idea is to get review comments on the proposed changes, once finalized the code should contain NLS.messages, and more appropriate null check if any is required.
Comment 2 Elson Yuen CLA 2008-10-17 17:18:50 EDT
Some suggested changes on the existing patch:
1. Make the naming convention consistent to the existing extension points serverTypes and runtime Types, so the extension name "runtimeSupportedModuleType" should be used instead of "RuntimeSupportedModuleType".
2. Consider to accept wildcards on the runtime types, e.g. the user can use org.eclipse.tomcat.* for all tomcat servers.
Comment 3 Angel Vera CLA 2008-10-17 18:26:24 EDT
Created attachment 115470 [details]
v0.2

I think I found a better way of doing things, by reusing some of the code that was already there.
Comment 4 Angel Vera CLA 2008-10-17 18:27:46 EDT
Created attachment 115471 [details]
v0.2

I think I found a better way of doing things, by reusing some of the code that was already there.
Comment 5 Angel Vera CLA 2008-10-17 18:28:41 EDT
Comment on attachment 115471 [details]
v0.2

The network was slow.. and I got impatient and added the file twice :)
Comment 6 Angel Vera CLA 2008-10-17 18:30:40 EDT
This new patch doesn't yet have the changes suggested in comment #2
Comment 7 Angel Vera CLA 2008-10-17 18:31:37 EDT
Tim, any suggestion on the proposed patch?
Comment 8 Angel Vera CLA 2008-10-21 11:55:20 EDT
Created attachment 115710 [details]
v0.3

This new patch include the changes for comment #2, and the schema for the new extension point. Also better null checks.
Comment 9 Angel Vera CLA 2008-10-28 11:35:35 EDT
Created attachment 116306 [details]
v1.0

I have talked to Tim about this bug, and we agree that adding ModuleType to a Runtime sounds kind of odd, because currently there is no support for adding publish extension to a particular runtime.  

So perhaps we need to extend the publish mechanism as well.
Comment 10 Angel Vera CLA 2008-10-28 11:39:38 EDT
Created attachment 116307 [details]
v1.1

v1.0 of this patch contained some changes from a different bug, I have now cleaned that up and attached v1.1
Comment 11 Angel Vera CLA 2008-10-29 17:10:42 EDT
Created attachment 116478 [details]
v2.0

I found that v1.1 would not work in all situations. So I came up with a different approach.
Comment 12 Angel Vera CLA 2008-11-06 09:38:29 EST
This new enhancement support will be moved to 3.1
Comment 13 Angel Vera CLA 2009-10-01 11:37:27 EDT
I am targeting this to 3.2 as we should decide if this is a good improvement or not and test the changes on the latest patch
Comment 14 Angel Vera CLA 2010-03-08 10:56:07 EST
The patch for this bug has been ready for a while. Changes committed to HEAD
Comment 15 Angel Vera CLA 2010-03-08 10:57:20 EST
This patch has been ready for a while, committing to HEAD
Comment 16 Angel Vera CLA 2010-03-08 13:14:26 EST
Changes released to 32 stream, which is currently HEAD
Comment 17 Eclipse Genie CLA 2017-10-11 16:31:46 EDT
New Gerrit change created: https://git.eclipse.org/r/108881