Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354782 - Organize used classes
Summary: Organize used classes
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: PHP UI CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 20:20 EDT by Timo A. Hummel CLA
Modified: 2020-05-14 11:09 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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