Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#1462 closed enhancement (fixed)

[PATCH] Java source code formatter style sheet

Reported by: GeoJ Owned by: framm
Priority: minor Component: Core
Version: Keywords:
Cc:

Description

This ticket should be used for developing a Java source code formatter style sheet (see "Source code formatting template?" on the mailing list).

Attachments (2)

eclipse-josm code style.xml (28.2 KB) - added by geoj@… 5 years ago.
Proposal of a Eclipse source code formatter style sheet (created using Eclipse 3.4 alias Ganymede)
org.eclipse.jdt.core.prefs.diff (50.4 KB) - added by Jan Peter Stotz <jpstotz@…> 5 years ago.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by geoj@…

Proposal of a Eclipse source code formatter style sheet (created using Eclipse 3.4 alias Ganymede)

comment:1 Changed 5 years ago by Jan Peter Stotz <jpstotz@…>

I noticed that the file .settings\org.eclipse.jdt.core.prefs already contains settings for the code formatter - of course only the default settings.

Therefore I created a patch that integrates the josm adapted code style posted previously into the the mentioned file. As the adapted style is much more closer to the style already used and as the style has to activated by hand IMHO the patch can be safely applied.

Jan

Changed 5 years ago by Jan Peter Stotz <jpstotz@…>

comment:2 Changed 5 years ago by Jan Peter Stotz <jpstotz@…>

  • Summary changed from Java source code formatter style sheet to [PATCH] Java source code formatter style sheet

comment:3 Changed 5 years ago by framm

  • Resolution set to fixed
  • Status changed from new to closed

Seems good to me (I did a few spot checks and found the changes made by Ctrl-Shift-F acceptable), so I applied this patch for r981. - Remaining questions: (a) should we do a monster reformat of all code by applying this style, or just apply it whenever we touch a file anyway? and (b) what can we do for those who don't use Eclipse; is there some kind of compatible command-line formatter or so available?

I'll close the ticket, let's have the discussion on the mailing list.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.