Skip to main content


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 20:46 Go to next message
Al Mising name is currently offline Al Mising nameFriend
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 21:07 Go to previous messageGo to next message
Eclipse UserFriend
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 13:52 Go to previous message
Eclipse UserFriend
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: Thu Apr 25 13:48:14 GMT 2024

Powered by FUDForum. Page generated in 0.02906 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top