Author Topic: Organize Imports Enhancement Request  (Read 4139 times)

PlanetPratt

  • Senior Community Member
  • Posts: 145
  • Hero Points: 6
Organize Imports Enhancement Request
« on: September 18, 2006, 12:22:46 AM »
I really like the Organize Imports feature that SlickEdit has for Java.  Occasionally it can't figure something out and displays a popup containing "Organize imports: not deleting unused imports because it could not find some symbols."  Any change on enhancing the feature to show us which symbols it couldn't find?  It would make the feature that much more useful.  Thanks.
  (*Chris*)

RobFreundlich

  • Community Member
  • Posts: 47
  • Hero Points: 2
Re: Organize Imports Enhancement Request
« Reply #1 on: September 18, 2006, 01:03:16 PM »
I like this idea!

I'd like to add another request, driven by a bug that I've had some back-and-forth with support about.  If your Java project has other filetypes, such as XML, and they get tagged, the importer can get confused.  For example, if I have an XML file with the following in it:

Code: [Select]
<foo>
    <bar Locale="en">abc</bar>
</foo>

then the Locale attribute will confuse the importer such that it will fail silently whenever I try to use it on code like this:

Code: [Select]
ResourceBundle bundle = (ResourceBundle)session.getAttribute("bundle");
Locale locale = bundle.getLocale();

If I try to do "Add Import" on Locale in that code, it does nothing.  If I remove the above XML file from my project, Add Import will find java.util.Locale successfully.


So the request is to have the Java import functions be a bit smarter: only look at tags that came from other Java files.