| Summary: | Need to be able to use labels for server status/state other than the existing ones. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP ServerTools | Reporter: | Rajiv Senthilnathan <rajiv.senthilnathan> | ||||||
| Component: | wst.server | Assignee: | Angel Vera <arvera> | ||||||
| Status: | CLOSED FIXED | QA Contact: | Angel Vera <arvera> | ||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | david_williams, eyuen7, gregory.amerson, kaloyan | ||||||
| Version: | unspecified | Flags: | david_williams:
pmc_approved+
arvera: pmc_approved? (raghunathan.srinivasan) arvera: pmc_approved? (naci.dai) arvera: pmc_approved? (deboer) arvera: pmc_approved? (neil.hauge) arvera: pmc_approved? (kaloyan) |
||||||
| Target Milestone: | 3.2.2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | All | ||||||||
| See Also: |
https://git.eclipse.org/r/108986 https://git.eclipse.org/r/108987 https://git.eclipse.org/r/109833 https://git.eclipse.org/c/servertools/webtools.servertools.git/commit/?id=7d4e1e034827ac64ce51219cc080d2bba9cacb84 |
||||||||
| Whiteboard: | PMC_approved | ||||||||
| Attachments: |
|
||||||||
|
Description
Rajiv Senthilnathan
Rajiv, You are right there is no way of doing this. From the conversation that we had offline and looking into the code this would be a pretty simple request to fulfill, I got the code almost ready. We will allow access to change the state label in the UI only, the underlying code and states are the same. Because the underlying code is the same, I will create a new extension point that loads serverLabelProviders per server type and request them to provide a new label, instead of the default provided. As I understand you need this function in 3.2.2. Since this is new function and a new extension point in a maintenance release we need PMC approval. * 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. Although this is a not a stop-ship this is new function requested by the adopter in a maintenance release. * Is there a work-around? If so, why do you believe the work-around is insufficient? There is no workaround for this function * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? I will add a JUnit to ensure that we don't break this provisional API, and extension point * Give a brief technical overview. Who has reviewed this fix? The fix in this case is simple. There is two places where the state label is requested. This two places will be now combined into one place in the ServerDecorator class. Whenever a request is made for the server state label, we will try to find (in a pre-loaded HashMap) a adopter who has implemented the extension point for a particular server type, if one is given then he will be responsible for providing a translated state label to be displayed in the UI, instead of the default: Started, Starting, Stopped, Stopping, etc.. If no adopters are found the LabelProvider will revert back to its original behaviour using a default pre-loaded class. If two or more LabelProvider adopters are found for one server type, to avoid conflict the LabelProvider will be the one default pre-loaded class provided by WTP and a warning will be printed in the log. This ensure that there is always a meaningful label provided for the different states of a server for all types of servers. The adopter of this extension point is responsible for fast performance to still provide a reasonable UI response of the ServersView. * What is the risk associated with this fix? none to minimal, as this is a new extension point. The testing with no providers will guarantee that there is no impact for adopters who do not implement this new extension point. The testing with an extension point will guarantee that the function works correctly, and minimize the bugs, if any. Sounds like one that I would approve. But it is fair to have a patch with the change attached to this bug. Created attachment 177438 [details]
v1.0 - for 3.2.2 (multi-project patch)
Sorry for the delay on adding the patch. I was doing some final adjustment to the code adding javadocs and jUnit.
The attached is a multi-project patch that contains all the changes for:
org.eclipse.wst.server.ui
org.eclipse.wst.server.ui.tests
Created attachment 177439 [details]
sample extension point adopter
Changes committed to 32M changes released to 32M changes committed to HEAD (3.3) changes released to HEAD(3.3) New Gerrit change created: https://git.eclipse.org/r/108986 New Gerrit change created: https://git.eclipse.org/r/108987 New Gerrit change created: https://git.eclipse.org/r/109833 Gerrit change https://git.eclipse.org/r/109833 was merged to [master]. Commit: http://git.eclipse.org/c/servertools/webtools.servertools.git/commit/?id=7d4e1e034827ac64ce51219cc080d2bba9cacb84 |