How to make eclipse not auto-index code block

I like the Eclipse autostart function, but sometimes I have indents that I don’t want to fix, for example

audioBuffer1[j] = (short) (VOLUME_REDUCER * ( inputBuffer[i] 
                  + ALPHA *   inputBuffer[i - echo1a] 
                  + ALPHA *   inputBuffer[i + echo1a]
                  - ALPHA *   inputBuffer[i - echo1b] 
                  - ALPHA *   inputBuffer[i + echo1b] 
                           ));

which corrects for something terrible. Is there a way to make the function of automatic marching over some bits of code using @annotationor something?

+3
source share
3 answers

You can put // at the end of lines you don’t want to wrap.

audioBuffer1[j] = (short) (VOLUME_REDUCER * ( inputBuffer[i] // 
                  + ALPHA *   inputBuffer[i - echo1a] //
                  + ALPHA *   inputBuffer[i + echo1a] //
                  - ALPHA *   inputBuffer[i - echo1b] //
                  - ALPHA *   inputBuffer[i + echo1b] //
                           ));
+2
source

, . 193688 319532 ( 3.7M2).
, / . , .


. ( Eclipse3.6 JDT)

 class X {
   // disable-formatter
   void foo1() {}
   void foo2() {}
   // enable-formatter
   void bar1() {}
   // enable-formatter
   void bar2() {}
 }

27079 ( " / " ) , ( , ).

+1

, Edit → Smart Insert Mode , .

0

Source: https://habr.com/ru/post/1783460/


All Articles