문제

I use the tag in Netbeans to fold custom segments of code to structure my doc a bit. The functionality of it is great, BUT everytime I insert the tag, the code inside this tag becomes formatted in a way that I don't like, e.g:

this is how I write it:

if(foo==bar)
{
   //do something
}
else
{
   //do anything
}

After inserting the editor-fold this piece of code reads:

if(foo==bar)     {
   //do something
}      else      {
   //do anything
}

Maybe this is how 'professional coders format their if-statements, but I like the upper better, I am familiar with it. Is there a possiblity to prevent netbeans to format my code when inserting a editor-fold?

도움이 되었습니까?

해결책

Tools -> Options -> Editor -> Formatting

You can set things the way you like there.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top