Eclipse formatter
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ivan_B
Posted On:   Saturday, January 17, 2009 02:40 PM

Hi! Can somebody say me is there any plug-in or option for eclipse to autoformat code (NOT SELECTED) on typing? Example one: I typed `var=getVar(1)`, then type `;` and code become `var = getVar( 1 );` Exaple two: I typed `void setProp(int newProp){prop=newProp;`, then type `}` and code become void setProp( int newProp ) { prop = newProp; } I mean it must work like in Visual Studio, according to formatter options.    More>>

Hi! Can somebody say me is there any plug-in or option for eclipse to autoformat code (NOT SELECTED) on typing?


Example one:


I typed `var=getVar(1)`, then type `;` and code become `var = getVar( 1 );`


Exaple two:


I typed `void setProp(int newProp){prop=newProp;`, then type `}` and code become


void setProp( int newProp )


{


prop = newProp;


}


I mean it must work like in Visual Studio, according to formatter options.

   <<Less

Re: Eclipse formatter

Posted By:   Anonymous  
Posted On:   Monday, March 16, 2009 02:24 AM

You could also enable a "Save action" for formatting when you save the file.

Re: Eclipse formatter

Posted By:   Alex_P  
Posted On:   Thursday, March 12, 2009 08:27 AM

I don't think you can do it on typing (and personally I would not like it).

But you always can press - Ctrl+Shift+F (default shortcut for "Format Source Code").

You can find all shortcuts in Window->Preferences->General->Keys.
About | Sitemap | Contact