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 119176 - [60cat] Wrong placement of import statements by editor hint
Summary: [60cat] Wrong placement of import statements by editor hint
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
: 164308 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-10-17 07:46 UTC by tboerkel
Modified: 2016-07-07 07:19 UTC (History)
1 user (show)

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 tboerkel 2007-10-17 07:46:12 UTC
[ BUILD # : 200710071200 ]
[ JDK VERSION : 1.6.0_03 ]

Repro:
Create a new Java class. Add this method:
  public static void test() {
    FileInputStream fis = new FileInputStream(new File("."));
  }  

Use the editor hint to import java.io.File and then again to import
java.io.FileInputStream.

Result:

import java.io.File;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
import java.io.FileInputStream;

/**
 *
 * @author TB
 */
public class Test {
  public static void test() {
    FileInputStream fis = new FileInputStream(new File("."));
  }  
}


The 2 imports should be in subsequent lines, but one is above and the
other below the comment.
Comment 1 Jiri Prox 2007-10-17 08:33:57 UTC
This happens only for classes in default package and only the first import is misplaced -> not so serious
Comment 2 Rastislav Komara 2009-02-03 10:56:44 UTC
Overtake.
Comment 3 Jiri Prox 2009-05-04 14:15:52 UTC
*** Issue 164308 has been marked as a duplicate of this issue. ***
Comment 4 Jan Lahoda 2009-08-20 10:00:12 UTC
Reassigning all moonko's java/source bugs to myself.
Comment 5 Martin Balin 2016-07-07 07:19:15 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss