This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 24136 - Import management tool distorts import groupings
Summary: Import management tool distorts import groupings
Status: CLOSED DUPLICATE of bug 19167
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-05-28 13:52 UTC by kolja
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kolja 2002-05-28 13:52:13 UTC
In my source I like to group my imports in packages like 
this:
  import java.util.Enumeration;
  import java.rmi.RemoteException;
  import javax.servlet.http.*;

  import org.apache.log4j.Category;
  import org.apache.struts.action.*;

But if I let the import management tool remove unused 
imports etc. (do it's thing) it removes my order/grouping 
of imports and it will look something like this:
  import org.apache.log4j.Category;
  import java.util.Enumeration;
  import org.apache.struts.action.*;
  import java.rmi.RemoteException;
  import javax.servlet.http.*;

It is not so serious if there are 2 or 3 imports but you 
lose quick insight over which packages you are importing 
if the number goes above 10 or so imports.
Suggestion: leave alone current ordering of import 
statements or better, give the user a sorting option 
(including whitelines between package groups possiblity)
Comment 1 _ lkramolis 2002-05-28 13:55:27 UTC
It belongs to Java module I think.
Comment 2 Tomas Hurka 2002-05-29 09:52:48 UTC
In NB 3.4 there is enhancement which sorts the imports statement. I guess this will solve your problem. See issue #19167

*** This issue has been marked as a duplicate of 19167 ***
Comment 3 Quality Engineering 2003-07-01 13:11:11 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.
Comment 4 Quality Engineering 2003-07-01 13:21:00 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.