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

Bug 173048

Summary: [preferences] Comment formatter prefs: Header can be non-Javadoc comment
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: benno.baumgartner, markus.kell.r
Version: 3.3   
Target Milestone: 3.3 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
first fix
none
second fix
none
fix none

Description Dani Megert CLA 2007-02-06 08:38:57 EST
I20070206-0010.

Header comments are not necessary Javadoc comments and hence should not be in the Javadoc section.
Comment 1 Dani Megert CLA 2007-02-06 08:45:18 EST
Just checked: you can enable comment formatting (in the Javadoc section) and then disable all general options and then, the header will be formatted as I would expect since header formatting is treated by the formatter as a main option.
Comment 2 Benno Baumgartner CLA 2007-02-07 05:13:23 EST
This is the logic at the moment:
Javadoc headers are formatted iff Javadoc and header is enabled
Block headers are formatted iff Block and header is enabled

What we want is:
Headers are formatted iff Header formatting is enabled (no matter what the other settings are, no matter if it is a block or a javadoc header)

I'll provide two UI fixes:
1. Fix the UI such that it reflects the logic as it is at the moment (ugly UI)
2. UI as we want it
Comment 3 Benno Baumgartner CLA 2007-02-07 05:14:04 EST
Created attachment 58435 [details]
first fix
Comment 4 Benno Baumgartner CLA 2007-02-07 05:16:43 EST
Created attachment 58436 [details]
second fix
Comment 5 Benno Baumgartner CLA 2007-02-07 05:18:24 EST
Core? Would it be possible to change the behavior to what we want for M5?
Comment 6 Olivier Thomann CLA 2007-02-07 08:40:48 EST
What exactly are you expecting from us?
Comment 7 Olivier Thomann CLA 2007-02-07 08:51:57 EST
If I well understood your comment 2, you expect the header formatting to be independent from the block comment and the javadoc comment sections.
Comment 8 Benno Baumgartner CLA 2007-02-07 08:59:39 EST
(In reply to comment #7)
> If I well understood your comment 2, you expect the header formatting to be
> independent from the block comment and the javadoc comment sections.
> 

Exactly. 'Format Header Comment' is then a top level setting.
Comment 9 Olivier Thomann CLA 2007-02-07 10:36:56 EST
Move to JDT/UI.
Right now the UI knows when a header is formatted.
Comment 10 Benno Baumgartner CLA 2007-02-07 11:15:51 EST
Created attachment 58454 [details]
fix
Comment 11 Benno Baumgartner CLA 2007-02-07 11:17:05 EST
fixed > I20070206-0010
Comment 12 Benno Baumgartner CLA 2007-02-07 11:17:44 EST
See Bug 173289 for core issue
Comment 13 Dani Megert CLA 2007-02-08 10:18:58 EST
Verified in I20070208-0010.