Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » auto code formatting
auto code formatting [message #334909] Mon, 09 March 2009 16:46 Go to next message
Al Mising name is currently offline Al Mising name
Messages: 123
Registered: July 2009
Senior Member
I often have code clean up issues that I would like to automate.
For example, I want to change all occurences of
if(
to
if (
and all occurences of
else{
else {

Is there a way to automate this with a macro or something?
Re: auto code formatting [message #334910 is a reply to message #334909] Mon, 09 March 2009 17:07 Go to previous messageGo to next message
Eclipse User
Originally posted by: subs._nospam_consertum.com

Al wrote:
> I often have code clean up issues that I would like to automate.
> For example, I want to change all occurences of if(
> to
> if (
> and all occurences of
> else{
> else {
>
> Is there a way to automate this with a macro or something?
>
>
>
Ctrl-Shift-F?

--
Derek
Re: auto code formatting [message #334923 is a reply to message #334909] Tue, 10 March 2009 09:52 Go to previous message
Eclipse User
Originally posted by: eclipse-news.rizzoweb.com

On 3/9/2009 4:46 PM, Al wrote:
> I often have code clean up issues that I would like to automate.
> For example, I want to change all occurences of if(
> to
> if (
> and all occurences of
> else{
> else {
>
> Is there a way to automate this with a macro or something?

Right-click on a Project, Package, or Class (or a multi-selection of any
of those) and choose Source > Clean up...
There are lots of options you can configure to be run as part of the
clean-up.
You can also set up a Save Action to run these kinds of code changes
every time you save. See
http://help.eclipse.org/ganymede/topic/org.eclipse.jdt.doc.u ser/reference/preferences/java/editor/ref-preferences-save-a ctions.htm

Hope this helps,
Eric
Previous Topic:Modifying the tabbed properties view of the project explorer
Next Topic:How to add the red wave line?
Goto Forum:
  


Current Time: Sat Apr 19 13:13:20 EDT 2014

Powered by FUDForum. Page generated in 0.01500 seconds