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 44317

Summary: [refactoring] Fast Import keeps inserting unwanted blank lines in the import list
Product: java Reporter: Jesse Glick <jglick>
Component: UnsupportedAssignee: issues@java <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: issues
Priority: P3 Keywords: REGRESSION
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Jesse Glick 2004-06-03 23:48:01 UTC
040603. Might actually be a bug in the Java model,
I am not sure.

After the refactoring merge, whenever I use Fast
Import to add an import statement, I get a new
blank line in my imports list, so it starts
looking like this:

---%<---
import java.util.Collections;

import java.util.Set;
import
org.apache.tools.ant.module.api.AntProjectCookie;


import org.w3c.dom.Element;
---%<---

Sometimes the blank line is before the new import,
sometimes after; I am not sure why.

Annoying since you have to keep on going back and
deleting them.

Note: pre-merge trunk had a longstanding bug that
Fast Import would always try to insert one line at
the end of the imports block, which was annoying
if you are trying to minimize the number of lines
in a class (e.g. for making a presentation demo
class). But this is rather worse.

Also seems to happen when you use the Import
Management wizard.
Comment 1 Martin Roskanin 2004-06-08 12:47:31 UTC
The same happens if Fix All imports action is performed:
1.create a new class
2. add several unresoolved types i.e:
        JButton b = new JButton("");
        JTextArea te = new JTextArea("");
3. press Alt+Shift+F

result:
imported types are separated by blank line.

It seems to be java module problem, reassigning...
Comment 2 Jan Pokorsky 2004-06-08 14:19:09 UTC

*** This issue has been marked as a duplicate of 43255 ***