Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Defaults for Organize Imports
Defaults for Organize Imports [message #214784] Sat, 09 June 2007 23:47 Go to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Is there a way to specify defaults for Organize Imports, so that when a
"List" is encountered, for example, it goes with java.util.List
automatically and doesn't ask which List to use? I'd imagine there'd be a
way, because for several common classes this gets to be slightly
irritating...

Thanks.
Re: Defaults for Organize Imports [message #214820 is a reply to message #214784] Sun, 10 June 2007 09:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: groups.pellaton.li

Hi

Organize imports does not offer 'white listing' of preferred classes.
You can use type filters which work like a 'black list' of unwanted
classes. However, they effect all functions of Eclipse.

I use type filters to avoid the usage of any similarly named AWT/Swing
classes whilst writing SWT/JFace applications and to prevent confusions
between java.util.Date and java.sql.Date.

HTH

Michael
Re: Defaults for Organize Imports [message #742631 is a reply to message #214820] Thu, 20 October 2011 17:17 Go to previous message
Sergey  is currently offline Sergey Friend
Messages: 1
Registered: October 2011
Junior Member
The "white list, or preferred types" is vital for Organize imports - or at least for Quick Fix functionality, since "black list" does not resolve ambiguous type references when many required types are exist in project(s). That case sometimes can not be resolved by a filter package names in Eclipse menu Windows=>Preference=>Java=>Appearance=>Type Filters, because touches(filters out) the needed other classes in these packages also.
For Eclipse 3.7 - where the Quick Fix functionality is available now for multiple selected error rows in Problem view would be nice to have
usual "Quick Fix dialog" with selecting the right type to import with applying it to all similar or better selected errors in Problems' list.
For the present in such case the following error appears:
"The selected problems do not have a common applicable quick fix." however it's just need to specify the particular type to do Organize Imports ambiguous type.

[Updated on: Thu, 20 October 2011 17:20]

Report message to a moderator

Previous Topic:Control published files and folders in app classes folder in wtpwebapps
Next Topic:Use Code Variables to specify output filename
Goto Forum:
  


Current Time: Fri May 10 10:32:06 GMT 2024

Powered by FUDForum. Page generated in 0.08900 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top