Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 277684 - [preferences] Add comment to pref page that changing quick diff provider does not update open editors
Summary: [preferences] Add comment to pref page that changing quick diff provider does...
Status: VERIFIED FIXED
Alias: None
Product: Platform
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-25 08:52 EDT by Dani Megert CLA
Modified: 2009-10-27 04:19 EDT (History)
1 user (show)

See Also:


Attachments
Patch (6.33 KB, patch)
2009-10-21 08:48 EDT, Deepak Azad CLA
daniel_megert: review-
Details | Diff
My Save Actions (57.25 KB, image/png)
2009-10-22 04:20 EDT, Dani Megert CLA
no flags Details
reworked patch with the suggested changes (6.47 KB, patch)
2009-10-22 09:02 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-25 08:52:58 EDT
R3.2.

See bug 112170 for details.
Comment 1 Deepak Azad CLA 2009-10-21 08:48:17 EDT
Created attachment 150103 [details]
Patch

Added the comment using createNoteComposite(Font, Composite, String, String). This method has been copied over from PreferencePage class.
Comment 2 Dani Megert CLA 2009-10-22 04:18:39 EDT
Thanks for the patch Deepak. There are some UI and some coding style issues:

- the note needs to be closer to the preference it's meant for
- the note needs to have same vertical alignment as the preference it's meant for
- the note needs to be disabled when the preference is disabled (see e.g. Compiler
  > Javadoc pref page
- the message should get a 'the'
  ==> Changing the reference source does not update open editors.

- even if we copy a method we make sure that our formatting and style is applied.
  The copied method e.g. uses spaces as indent which should be replaced by tab.
  HINT: You can avoid that by enabling Java > Editor > Save Actions (see attached
        picture.

- we generally avoid shared strings which the name of 
   TextEditorMessages.EditorsPlugin_note could indicate. Please scope it to the
   dialog where it's used
   ==> TextEditorMessages.QuickDiffConfigurationBlock_referenceProviderNoteTitle
   (and I would change referenceProviderNote to referenceProviderNoteMessage)
Comment 3 Dani Megert CLA 2009-10-22 04:20:47 EDT
Created attachment 150207 [details]
My Save Actions
Comment 4 Deepak Azad CLA 2009-10-22 09:02:41 EDT
Created attachment 150237 [details]
reworked patch with the suggested changes
Comment 5 Dani Megert CLA 2009-10-23 09:56:03 EDT
Looks good. Some minor issues in the code:

1) it is not recommended to use new GridData(int)
2) first Javadoc sentence should end with a '.' (fQuickDiffProviderNote)
3) when we add a comment to a new method we also add "@since 3.6", even if it's
   not Javadoc

I've fixed 2 and 3 and committed the code to HEAD.
Available in builds > N20091022-2000.

There are several (also old) usages of new GridData(int) in this class. Can you please file a bug report for this and attach a patch that cleans this up (just in this class, there are tons of such usages all over the place but we clean them up whenever we see it).

Thanks!
Comment 6 Raksha Vasisht CLA 2009-10-27 04:19:35 EDT
Verified for 3.6 M3 with I20091026-1800.