Bug 435134 - Preserve blank line after adding use statements
Summary: Preserve blank line after adding use statements
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2014-05-17 13:44 EDT by gossi CLA
Modified: 2020-05-14 11:42 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gossi CLA 2014-05-17 13:44:46 EDT
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

}
Comment 1 Eclipse Genie CLA 2015-11-17 07:49:57 EST
New Gerrit change created: https://git.eclipse.org/r/60604
Comment 3 Michal Niewrzal CLA 2015-11-18 06:35:44 EST
Fixed.
Comment 4 Sylvia Tancheva CLA 2015-12-12 09:34:15 EST
Michal, the 1st case works as described, but the second not.
Comment 5 Michal Niewrzal CLA 2016-01-28 05:40:31 EST
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.
Comment 6 Sylvia Tancheva CLA 2016-06-24 09:42:35 EDT
OK then. Closing