Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 276424 - [content assist][preferences] 'Favorites > Edit' button opens dialog with title "New ..."
Summary: [content assist][preferences] 'Favorites > Edit' button opens dialog with tit...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: 3.6 M3   Edit
Assignee: Deepak Azad CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-15 02:42 EDT by Dani Megert CLA
Modified: 2009-10-28 04:33 EDT (History)
1 user (show)

See Also:


Attachments
patch (5.59 KB, patch)
2009-10-21 06:11 EDT, Deepak Azad CLA
no flags Details | Diff
reworked patch with the suggested changes (5.74 KB, patch)
2009-10-22 04:30 EDT, Deepak Azad CLA
daniel_megert: iplog+
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2009-05-15 02:42:19 EDT
I20090514-2000.

The Java > Editor > Content Assist > Favorites preference page's Edit button opens a dialog with "New ..." in the title. It should be "Edit ...".
Comment 1 Deepak Azad CLA 2009-10-21 06:11:13 EDT
Created attachment 150088 [details]
patch
Comment 2 Dani Megert CLA 2009-10-22 03:59:19 EDT
Thanks Deepak for the patch: it is correct and fixes the problem. There are two trivial things I'd like to see improved:

1. I would also change the existing FavoriteStaticMemberInputDialog_X_title to
   FavoriteStaticMemberInputDialog_X_new_title to better match the new _edit_ key
   NOTE: our philosophy is to not just fix the bug when we touch a file but also
         fix existing issues along with it, e.g. if we touch a class which has
         Javadoc or other warnings, then fix those along with the fix we do in 
         that class. This is our way to reduce the huge amount of warnings while
         we go.

2. whenever possible don't make the same check/test twice. In the patch  isMember 
   is tested twice. This can be done in better way inside the first isMember test:
   if (isMember)
       ...
       isNew ? member_title : member_edit_title
   else ...
       isNew ? type_title : type_edit_title
Comment 3 Deepak Azad CLA 2009-10-22 04:30:58 EDT
Created attachment 150209 [details]
reworked patch with the suggested changes
Comment 4 Dani Megert CLA 2009-10-22 05:07:25 EDT
Perfect!

Patch committed to HEAD.
Available in builds > N20091021-2000.
Comment 5 Dani Megert CLA 2009-10-22 05:07:38 EDT
.
Comment 6 Dani Megert CLA 2009-10-28 04:33:26 EDT
Verified in I20091027-0100.