Bug 217783 - UI inconsistancy for restart / start server icons in Servers view
Summary: UI inconsistancy for restart / start server icons in Servers view
Status: CLOSED FIXED
Alias: None
Product: WTP ServerTools
Classification: WebTools
Component: wst.server (show other bugs)
Version: 2.0.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Angel Vera CLA
QA Contact: Tim deBoer CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-02-04 19:57 EST by Rob Stryker CLA
Modified: 2017-10-11 16:22 EDT (History)
1 user (show)

See Also:


Attachments
Patch to update actions and tooltips. (6.61 KB, patch)
2008-02-04 19:57 EST, Rob Stryker CLA
no flags Details | Diff
Cleans up the code, fixes the tool-tip. (8.07 KB, patch)
2008-03-24 19:49 EDT, Rob Stryker CLA
no flags Details | Diff
More acceptable change, doesn't use weird NLS bindings ;) (4.13 KB, patch)
2008-03-26 16:49 EDT, Rob Stryker CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stryker CLA 2008-02-04 19:57:58 EST
Created attachment 88847 [details]
Patch to update actions and tooltips. 

When selecting a server, it will update the text for each of the 3 start actions (start, debug, profile).  Only under start will it update the text to make clear that using that action is in fact a "restart" instead of just a start. 

Also, the tooltips for all 3 of the actions remain unchanged at all times. So while the menu will change from "Start" to "Restart", the tooltips will remain "Start the server."

I'm providing a patch against the 2.0.2 maintainance stream to fix these actions. I'm not sure it's the safest patch, so I request a review of it. 

Specifically, 

1) I've changed the messages file to include some new actions making use of the NLS.bind {0} feature (for the mode). 
2) I've added two protected Strings which cache the original and the original tooltip for the action. 
3) I've removed the if statement in the selectionChanged so all actions can have their text and tooltips modified. 

There are no other API changes, other than messages private Strings and the two protected strings added to the StartAction.
Comment 1 Rob Stryker CLA 2008-02-19 13:56:34 EST
can someone please look at / use this patch?
Comment 2 Angel Vera CLA 2008-02-20 12:53:25 EST
Rob, sorry for the delay. 

I had a brief look a last week and your code looks good, I just wanted to look more into detail.

I have been busy with other stuff and didn't have time to look at the code again. I won't get a chance to look into this until Tomorrow or Friday, I hope you don't mind if we put this for next week build? 
Comment 3 Angel Vera CLA 2008-02-25 11:37:46 EST
Rob,

A couple of questions: 
1) Is the intention to back port the fix from WTP 3.0, into the 2.0.2 stream? 
2) Have you taken a look at the 3.0 UI and see if that fits what you need? 

I noticed that in the 3.0 we still have the problem of the tooltip for the View Action button, I will be fixing that now.
Comment 4 Angel Vera CLA 2008-03-21 09:42:05 EDT
Returning this bug as there has been no response. Please try out the scenario using 3.0, and reopen if the changes in 3.0 are not to satisfaction.
Comment 5 Rob Stryker CLA 2008-03-24 18:13:05 EDT
Angel: 

  I've just gotten around to looking at the wtp 3 stream.  Yes, for the menus the 3.0 solution is good and similar to what I was looking for.

Did you fix the tooltips for the icons yet so they say (Re)start instead of just start? 

Again, sorry for the delay. 
Comment 6 Rob Stryker CLA 2008-03-24 19:48:19 EDT
I disagree with some of the code in the class. I find it to be repetitive. I feel my patch, using NLS.bind(message, runmode) is cleaner and provides the proper fix without forcing the creation of several new constants (specifically, a new tool-tip for each run mode). 

Providing a new patch against head. 
Comment 7 Rob Stryker CLA 2008-03-24 19:49:59 EDT
Created attachment 93335 [details]
Cleans up the code, fixes the tool-tip. 

patch fixes the tool-tip which still had not been fixed.
Comment 8 Angel Vera CLA 2008-03-25 11:25:07 EDT
Thanks for the Patch Rob. I agree your approach is cleaner. One thing that I haven't looked into is why do you keep track of the original text, but I will take  a look at that later today when I integrate the code into the HEAD.
Comment 9 Angel Vera CLA 2008-03-26 14:33:30 EDT
in reference to:
setText(NLS.bind(Messages.actionRestartMode, launchMode));

as I take a second look at the code, I am afraid the patch might not work. The patch suggest to use the launchMode as part of the text in the UI, as I take a look that text is not being translated. I assume the words debug & profile need to be translated but I am not sure I am currently investigating to see if such is the case. 

If debug/profile needs translation a solution like the one suggested might still be possible by adding a string with the single word for the mode (ie: profileMode=profile), but this approach is not very desirable according to translation guidelines, unless we can conform with the text "Restart in: Debug" "Restart in: Profile". Which doesn't look too good in the context menu.
Comment 10 Angel Vera CLA 2008-03-26 15:16:13 EDT
I just confirmed my fears. Profile and Debug do get translated. 
Comment 11 Rob Stryker CLA 2008-03-26 15:52:57 EDT
Aww... well it was worth a shot ;)    Thanks for looking into that for me.

So what's our alternative to ensure that the tooltips for the action bar actions get the proper text?  Do it the same way as before but just add in more Message constants for restart?
Comment 12 Angel Vera CLA 2008-03-26 16:34:56 EDT
Yep.
Comment 13 Rob Stryker CLA 2008-03-26 16:49:28 EDT
Created attachment 93689 [details]
More acceptable change, doesn't use weird NLS bindings ;)
Comment 14 Angel Vera CLA 2008-03-26 18:43:52 EDT
The patch looks good. Thanks.
Comment 15 Angel Vera CLA 2008-03-26 19:17:47 EDT
Changes dropped to HEAD
Comment 16 David Williams CLA 2008-04-24 00:45:13 EDT
mass change to add 'contributed' keyword based on bugzilla query, please correct if that's not accurate (by marking patches as obsolete and removing the 'contributed' keyword. 
Comment 17 Tim deBoer CLA 2008-06-13 10:58:11 EDT
Verified, closing.
Comment 18 Eclipse Genie CLA 2017-10-11 16:22:39 EDT
New Gerrit change created: https://git.eclipse.org/r/108586