Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354782

Summary: Organize used classes
Product: z_Archived Reporter: Timo A. Hummel <privat>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P2 CC: ganoro, glen.84, kaloyan, silviya, zulus
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/50944
https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=b6a388ef1db6bddabb589c7f6636102f16f42f8a
Whiteboard:

Description Timo A. Hummel CLA 2011-08-15 20:20:57 EDT
Build Identifier: 

When dealing with lots of namespaced classes, the list of "use" statements becomes very long, or unused classes remain.

Similar to Java, there should be an "organize" function which removes unused classes and adds required ones.

Additionally, it would be nice to specify a "format" for uses - e.g. one "use" statement for each class or a combined "use" statement where classes are separated with commas.



Reproducible: Always
Comment 1 Kaloyan Raev CLA 2015-06-16 05:10:46 EDT
There is an Eclipse plugin on GitHub [1] that addresses this feature.

[1] https://github.com/yannickl88/phpOrganizeImportsPlugin
Comment 2 Eclipse Genie CLA 2015-06-26 09:05:06 EDT
New Gerrit change created: https://git.eclipse.org/r/50944
Comment 4 Dawid Pakula CLA 2015-08-13 17:15:19 EDT
Merged. Thank you Yannick de Lange!
Comment 5 Sylvia Tancheva CLA 2015-10-26 10:50:31 EDT
Verified. Closing