Community
Participate
Working Groups
When adding use statements, plese keep one blank line after the last use statement. I add this line myself all the time, which I think is the job of the IDE ;) #### Case 1: Before: ------- namespace my\name\space; class MyClass { // ... // call a class neither imported nor in the same namespace, so a use statement gets added } Result: ------- namespace my\name\space; use my\other\name\space\Cls; class MyClass { // ... // call a class neither imported nor in the same namespace, so a use statement gets added } Expected: --------- namespace my\name\space; use my\other\name\space\Cls; class MyClass { // ... // call a class neither imported nor in the same namespace, so a use statement gets added } #### Case 2: Before: ------- namespace my\name\space; use my\other\name\space\Cls; class MyClass { // ... // call a class neither imported nor in the same namespace, so a use statement gets added } Result: ------- namespace my\name\space; use my\other\name\space\Cls; use my\other\name\space\AnotherCls; class MyClass { // ... // call a class neither imported nor in the same namespace, so a use statement gets added } Expected: --------- namespace my\name\space; use my\other\name\space\Cls; use my\other\name\space\AnotherCls; class MyClass { // ... // call a class neither imported nor in the same namespace, so a use statement gets added }
New Gerrit change created: https://git.eclipse.org/r/60604
Gerrit change https://git.eclipse.org/r/60604 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=1db5c2e440c263305159659a91f585a439db3bbc
Fixed.
Michal, the 1st case works as described, but the second not.
In my opinion only first case should work as described. In second case there is use statement and we need to preserve actual style (no blank line) and just insert new use statement.
OK then. Closing