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

Bug 338014

Summary: [hotbug] Would like to be able to pass multiple runtimeTypeIds to ServerUIUtil.showNewRuntimeWizard
Product: [WebTools] WTP ServerTools Reporter: Ian Trimble <ian.trimble>
Component: wst.serverAssignee: Angel Vera <arvera>
Status: RESOLVED FIXED QA Contact: Angel Vera <arvera>
Severity: enhancement    
Priority: P3 CC: david_williams, eyuen7, konstantin, raghunathan.srinivasan
Version: 3.2Flags: arvera: pmc_approved? (david_williams)
raghunathan.srinivasan: pmc_approved+
arvera: pmc_approved? (naci.dai)
arvera: pmc_approved? (deboer)
arvera: pmc_approved? (neil.hauge)
arvera: pmc_approved? (kaloyan)
arvera: pmc_approved? (cbridgha)
Target Milestone: 3.3 RC2   
Hardware: PC   
OS: Windows XP   
See Also: https://git.eclipse.org/r/109048
Whiteboard: PMC_approved, ORACLE_P1
Attachments:
Description Flags
Patch that allows ServerUtil to parse a comma-delimited String in a backwards-compatible manner
none
v2.0
none
v1.1 none

Description Ian Trimble CLA 2011-02-23 14:49:49 EST
We would like to be able to pass multiple runtimeTypeIds to ServerUIUtil.showNewRuntimeWizard. We want to be able to filter by more than one runtime type, where there is no common prefix we can pass. (For example, we can currently pass something like "my.server.1" and match all runtime types whose ID starts with that prefix, but we want to be able to match something like "my.server.12" and "my.server.13" but NOT "my.server.1" or "my.server.11". 

Being able to pass a delimited list which would ultimately be parsed by ServerUtil.getRuntimeTypes would be an acceptable solution (for us), that would require a slight change to just that one class, would be backwards-compatible, and would not require changing 6 classes that simply pass runtimeTypeId from ServerUIUtil all the way down to ServerUtil. That said, any solution that would allow specifying multiple runtime type IDs would work for us.

Thanks,
 - Ian
Comment 1 Ian Trimble CLA 2011-02-23 14:53:33 EST
Created attachment 189630 [details]
Patch that allows ServerUtil to parse a comma-delimited String in a backwards-compatible manner
Comment 2 Konstantin Komissarchik CLA 2011-03-26 14:45:15 EDT
Any chance of getting this reviewed for the 3.3 release?
Comment 3 Konstantin Komissarchik CLA 2011-05-17 19:58:16 EDT
Perhaps this got missed... Is anyone monitoring wst.server inbox?
Comment 4 Raghunathan Srinivasan CLA 2011-05-17 23:51:03 EDT
This is a hotbug request.

1. Affiliation - Oracle
2. Release you want this bug to be fixed in - WTP 3..3 - Indigo
3. Justify why this is a hot bug and why it needs to be fixed in that release
As explained in the description, this issue blocks a feature in the adopter product that requires the runtime type to be filtered by  more than
one runtime type, where there is no common prefix we can pass.
Comment 5 Elson Yuen CLA 2011-05-18 11:10:37 EDT
The change looks safe enough.  Having said that, having the comma separated string looks like an implicit way to pass in a list.  Should we introduce a new that accepts String[] instead?
Comment 6 Angel Vera CLA 2011-05-18 11:23:32 EDT
(In reply to comment #5)
Good point Elson. We typically accept string separated commas for extension point definitions, but not in an API. 

Ian, Is creating a new API that accepts an array of runtime types an acceptable solution?
Comment 7 Angel Vera CLA 2011-05-18 11:56:43 EDT
Created attachment 195996 [details]
v2.0

This would be the suggested changes, do they work for you?
Comment 8 Ian Trimble CLA 2011-05-18 12:23:57 EDT
(In reply to comment #7)
> Created attachment 195996 [details]
> v2.0
> This would be the suggested changes, do they work for you?

This doesn't get me what I need, since I need to call ServerUIUtil.showNewRuntimeWizard, which eventually calls ServerUtil. Since the String is passed through about 6 methods (from ServerUIUtil until it finally gets to ServerUtil), I'd need String[] equivalents all the way up to ServerUIUtil. This is why I proposed leaving the signature as a String but changing the implementation (in ServerUtil) to understand comma-separated lists.

The currently-proposed change does not solve the original issue.
Comment 9 Elson Yuen CLA 2011-05-18 13:39:37 EDT
If we need to use the String as in the original patch, we'll need to make sure
we update the javadoc to reflect this change.
Comment 10 Angel Vera CLA 2011-05-18 13:50:50 EDT
Created attachment 196023 [details]
v1.1

Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 
This is a hotbug requested by an adopter.

Is there a work-around? If so, why do you believe the work-around is insufficient? 
No workaround

How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 
- Ran the jUnits for this area
- Ran through a scenarios that will call the method to ensure that there is no regression from the UI point of view

Give a brief technical overview. Who has reviewed this fix? 
Angel

What is the risk associated with this fix?
low
Comment 11 Raghunathan Srinivasan CLA 2011-05-18 14:21:59 EDT
Thanks for addressing this issue.
Comment 12 Angel Vera CLA 2011-05-18 14:36:26 EDT
changes committed to HEAD
Comment 13 Ian Trimble CLA 2011-05-18 15:22:29 EDT
Thanks for the patch, it is appreciated.

 - Ian
Comment 14 Angel Vera CLA 2011-05-18 17:13:26 EDT
changes released to HEAD
Comment 15 Eclipse Genie CLA 2017-10-11 16:36:34 EDT
New Gerrit change created: https://git.eclipse.org/r/109048