|
Re: Remove unnecessary parts from selected code [message #1712415 is a reply to message #1712360] |
Fri, 23 October 2015 20:00 |
|
On 10/23/2015 01:19 PM, Abhijeet Ashri wrote:
> I am able to format my Java code by configuring it in Save Actions. What
> I get after Saving the file is that the whole code gets formatted
> according to my settings. What I need is, that only a part of code gets
> formatted according to the settings. Say, there are 10 methods in my
> code and I add one more to it. What I want is that only my 11th method
> gets formatted and the previous 10 gets untouched. Is that possible?
> NOTE: The format includes, removing unnecessary casts, parenthesis, etc.
Look for a commented annotation, something like // @formatter:off that
you can toggle around in your source. (I might have this misspelled or
something.)
|
|
|
Re: Remove unnecessary parts from selected code [message #1712483 is a reply to message #1712415] |
Sun, 25 October 2015 21:43 |
|
You've mixed Clean Up and Formatting together. "Formatting" only ever adjusts white space. "Clean Up" actually changes code. Assuming you're referring to Java source files, the Save Actions preferences have the option of only formatting edited lines.
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.09846 seconds