Bug 270209 - [format] Condensed block comment formatting
Summary: [format] Condensed block comment formatting
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 61110 (view as bug list)
Depends on:
Blocks: 303405
  Show dependency tree
 
Reported: 2009-03-27 01:23 EDT by Jeff CLA
Modified: 2016-01-14 16:48 EST (History)
4 users (show)

See Also:


Attachments
Proposed patch (134.70 KB, patch)
2010-02-20 05:32 EST, Frederic Fusier CLA
no flags Details | Diff
Proposed patch (12.89 KB, patch)
2010-02-20 05:39 EST, Frederic Fusier CLA
no flags Details | Diff
Proposed patch + doc (15.50 KB, patch)
2010-02-22 08:00 EST, Frederic Fusier CLA
no flags Details | Diff
Additional patch (13.77 KB, patch)
2010-02-23 06:32 EST, Frederic Fusier CLA
no flags Details | Diff
Additional patch + doc (15.75 KB, text/plain)
2010-02-23 06:35 EST, Frederic Fusier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff CLA 2009-03-27 01:23:26 EDT
I was thrilled to see all of the formatting settings that are available in Java > Code Style > Formatter.  I am much happier now that I can use Ctrl+Shift+F more liberally!  I'd very much like one more option (which is why I originally went looking for all of those formatting settings).  I'd like block comments (non-Javadoc) to be smaller, let me draw an example.

(I hope this renders well on your screen.  I used short lines to try and help out your email client.)

/* I'd like the option to format my block
 * comments like this. */

/*
 * Instead of like this.  I use these a lot and
 * this can take up a lot of space.
 */

I hope this is possible.  Thanks, everyone!


Jeff
onkenj@gmail.com
Comment 1 Frederic Fusier CLA 2009-03-27 04:11:31 EDT
I think this could be an interesting preference...
Comment 2 Jeff CLA 2009-07-23 00:35:12 EDT
Any progress on this?  Our Java project has doubled in size, and we'd probably lose about 2 or 3% of our total number of lines if the block comments were adjusted! :^P


Thanks!

Jeff
onkenj@gmail.com
Comment 3 Dani Megert CLA 2009-07-29 09:51:09 EDT
>I think this could be an interesting preference...
Yes, makes sense.
Comment 4 Frederic Fusier CLA 2010-02-20 05:32:13 EST
Created attachment 159663 [details]
Proposed patch

This patch adds 2 new formatter options, one to condense the block comments and the other one to condense javadoc comments...
Comment 5 Frederic Fusier CLA 2010-02-20 05:38:34 EST
Comment on attachment 159663 [details]
Proposed patch

Sorry, wrong patch... :-(
Comment 6 Frederic Fusier CLA 2010-02-20 05:39:42 EST
Created attachment 159665 [details]
Proposed patch

This patch is the good one and really adds 2 new formatter options, one to condense the block comments and the other one to condense javadoc comments...
Comment 7 Frederic Fusier CLA 2010-02-22 08:00:25 EST
Created attachment 159770 [details]
Proposed patch + doc

Just add a entry in the build notes to describe the new options
Comment 8 Frederic Fusier CLA 2010-02-22 08:00:46 EST
(In reply to comment #7)
> Created an attachment (id=159770) [details]
> Proposed patch + doc
> 
> Just add a entry in the build notes to describe the new options

Released for 3.6M6 in HEAD stream.
Comment 9 Frederic Fusier CLA 2010-02-23 06:32:04 EST
Created attachment 159911 [details]
Additional patch

This patch changes the constants names to better reflect the action of the corresponding preferences...
Comment 10 Frederic Fusier CLA 2010-02-23 06:35:15 EST
Created attachment 159912 [details]
Additional patch + doc

Same patch than previous one + corresponding changes in the build notes entry...
Comment 11 Frederic Fusier CLA 2010-02-23 07:09:25 EST
(In reply to comment #10)
> Created an attachment (id=159912) [details]
> Additional patch + doc
> 
Released for 3.6M6 in HEAD stream.
Comment 12 Srikanth Sankaran CLA 2010-03-09 03:35:44 EST
Verified for 3.6M6 using build I20100305-1011
Comment 13 Jeff CLA 2011-02-14 16:08:44 EST
Thank you very much!  It works wonderfully; I really like the new look.  :^)

Best,
Jeff
Comment 14 Frederic Fusier CLA 2011-02-15 04:53:38 EST
(In reply to comment #13)
> Thank you very much!  It works wonderfully; I really like the new look.  :^)
> 
> Best,
> Jeff

You're welcome :-)
Comment 15 Mateusz Matela CLA 2016-01-14 16:48:51 EST
*** Bug 61110 has been marked as a duplicate of this bug. ***