Bug 12144 - Re-format all files [code manipulation]
Summary: Re-format all files [code manipulation]
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.0 M9   Edit
Assignee: Martin Aeschlimann CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted, investigate
: 3761 6665 15501 25743 29338 30729 35975 36654 56507 56869 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-03-22 13:44 EST by Pipus CLA
Modified: 2004-05-11 06:05 EDT (History)
12 users (show)

See Also:


Attachments
Plugin that provides functionality we are asking for (20.35 KB, application/octet-stream)
2004-01-06 10:59 EST, Riyad Kalla CLA
no flags Details
A version of the original plugin that works with 3.0 (18.76 KB, application/octet-stream)
2004-04-14 12:21 EDT, Jeff McAffer CLA
no flags Details
formatjava project zip (18.27 KB, application/octet-stream)
2004-04-15 14:45 EDT, Jeff McAffer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pipus CLA 2002-03-22 13:44:16 EST
I could be nice to have the ability to re-format all Java files in one time. 
Beyond, to do all java file based actions on a selection of files (as for 
search for example).
Comment 1 Erich Gamma CLA 2002-03-24 17:10:42 EST
agreed, that this would be nice, but we cannot commit to it for 2.0
Comment 2 Dirk Baeumer CLA 2002-07-23 10:23:49 EDT
[code manipulation]

Should consider for 2.1
Comment 3 Dirk Baeumer CLA 2002-07-23 13:33:22 EDT
*** Bug 15501 has been marked as a duplicate of this bug. ***
Comment 4 Dirk Baeumer CLA 2002-07-25 10:54:09 EDT
*** Bug 3761 has been marked as a duplicate of this bug. ***
Comment 5 Dirk Baeumer CLA 2002-07-25 14:34:22 EDT
*** Bug 6665 has been marked as a duplicate of this bug. ***
Comment 6 Andrew McCullough CLA 2002-07-25 15:21:03 EDT
I couldn't decide which to annotate, but my comments on the matter are here:

http://bugs.eclipse.org/bugs/show_bug.cgi?id=18703

-Andrew
Comment 7 Dirk Baeumer CLA 2003-02-01 17:27:16 EST
*** Bug 30729 has been marked as a duplicate of this bug. ***
Comment 8 Dirk Baeumer CLA 2003-04-02 09:28:08 EST
*** Bug 35975 has been marked as a duplicate of this bug. ***
Comment 9 Dirk Baeumer CLA 2003-04-22 03:39:48 EDT
*** Bug 36654 has been marked as a duplicate of this bug. ***
Comment 10 Marcel Romijn CLA 2003-04-22 15:04:28 EDT
I voted for this Bug/Request since we have some large projects. The main 
project currently has over 2300 classes. We like to have the same format for 
all sources. We could do a format every time we hit a source, but our sources 
are under control of CVS and a mailing system keep al developers up-to-date 
with changes. Doing a logical code change and a source format on a few files at 
the time will clutter the changes.
With the ability to format all sources at once, we can commit all source 
formats at once, while disabling the mailing system during this commit.
Comment 11 Dirk Baeumer CLA 2003-04-28 06:03:46 EDT
Chaning state from assigned later to resolved later. Assigned later got 
introduced by the last bug conversion and is not a supported Eclipse bug state.
Comment 12 Dani Megert CLA 2003-11-13 12:06:21 EST
*** Bug 29338 has been marked as a duplicate of this bug. ***
Comment 13 Dirk Baeumer CLA 2003-11-13 16:09:11 EST
*** Bug 25743 has been marked as a duplicate of this bug. ***
Comment 14 Marcel Romijn CLA 2003-11-13 16:40:02 EST
Although though it would still be nice to have code formatting for multiple 
files integrated in Eclipse, I have found an alternative some time ago: 
http://klomp.org/formatjava/
Comment 15 Riyad Kalla CLA 2004-01-06 10:59:14 EST
Created attachment 7330 [details]
Plugin that provides functionality we are asking for

This is the formatjava plugin that allows for recursive formatting of a source
tree that has been available for over a year now. Hopefully the development
team can just add this to the 3.0 stream as it doesn't seem to be a hard task
at all. The functionality (formatting) is already there, we just need a menu
option to recursively apply it to all the files in a tree.

PLEASE reopen this bug for 3.0
Comment 16 Dirk Baeumer CLA 2004-01-06 13:40:10 EST
Reopening for 3.0 consideration.
Comment 17 Dirk Baeumer CLA 2004-01-06 13:41:27 EST
Silvio, can you please investigate. You should coordinate this with Martin 
since the algorithm should be comparable to apply organize imports to folders, 
projects as well.
Comment 18 Dirk Baeumer CLA 2004-03-29 03:57:34 EST
*** Bug 56507 has been marked as a duplicate of this bug. ***
Comment 19 Jeff McAffer CLA 2004-03-31 10:00:45 EST
What is the status of this?  We want to reformat all of the runtime/OSGi code 
for 3.0 and would prefer not to wait until the last minute.  If this bug will 
be fixed in the next week or two we'll wait.  Otherwise we'll hire a crew of 
monkeys.
Comment 20 Dirk Baeumer CLA 2004-04-01 02:40:47 EST
*** Bug 56869 has been marked as a duplicate of this bug. ***
Comment 21 Jeff McAffer CLA 2004-04-14 12:21:37 EDT
Created attachment 9492 [details]
A version of the original plugin that works with 3.0

This is a new version of the original code that has been updated to work with
Eclipse 3.0.  It still uses the obsolete formatter API but it gets the job
done.
Comment 22 Jeff McAffer CLA 2004-04-15 14:45:06 EDT
Created attachment 9549 [details]
formatjava project zip

This is an updated version of the formatjava plugin project.  The previous one
I posted had a number of problems.  In particular, the plugin.xml was incorrect
and code acutally used the old formatter.  This one uses the new formatter and
the current formatting settings.
Comment 23 Ed Burnette CLA 2004-05-04 17:24:32 EDT
This still says target milestone 3.0, so will this contribution make it in?
Comment 24 Erich Gamma CLA 2004-05-04 18:04:20 EDT
unfortunately not - we have to focus on delivering what we currently have in 
product quality - adjusted the milestone
Comment 25 Erich Gamma CLA 2004-05-11 04:25:52 EDT
discussed with Martin again - reconsider for 3.0
Comment 26 Martin Aeschlimann CLA 2004-05-11 06:05:51 EDT
the format action is now also enabled in the Java views (on CU's, package 
fragments, source folders and projects)
in I20040511