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 54657

Summary: Provide possibility automatically add import statement on autocompletion action
Product: editor Reporter: Denis Anisimov <ads>
Component: Completion & TemplatesAssignee: Dusan Balek <dbalek>
Status: CLOSED FIXED    
Severity: blocker    
Priority: P1    
Version: 4.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Denis Anisimov 2005-02-08 09:33:27 UTC
It is very usefull feature when needed
import statement atomatically appear in Java file
when you using completion.
F.e. You type:
Fil
Press Ctrl-Enter.
Autocompletion chhoser appear. 
You choose File and File tyle declaration appear
in source code. You choose in this manner concrete
( from concrete package ) class , so it should
be added in import section.

This feature extremely usefull by me in eclipse.
Comment 1 Denis Anisimov 2005-02-08 09:36:42 UTC
This bug is High priority usbility ussue.

It was fixed by me in Bow release branch as RFE and should be
transfered in NetBeans branch.
By the way , Buzz and Coke will be base on NetBeans in binary format,
so for both it will regression and it should be fixed in Sun Java 
Studio, so in NetBeans.
Comment 2 Miloslav Metelka 2005-02-08 10:14:35 UTC
I've changed this to enhancement because this is not a defect and not
a regression. Unfortunately we are already in a bug-fixing phase after
feature freeze of promoE so it's more likely that your patch will get
integrated during promoF. As you already have the implementation of
the feature could you please provide us with a diff of the feature?
Please attach it to this issue. Thanks.
Comment 3 Dusan Balek 2005-02-18 17:40:01 UTC
After discussions with the editor team, changing back to defect.

Fixed in [maintrunk].

Checking in Completion.java;
/cvs/editor/libsrc/org/netbeans/editor/ext/Completion.java,v  <-- 
Completion.java
new revision: 1.39; previous revision: 1.38
done
Checking in JDCPopupPanel.java;
/cvs/editor/libsrc/org/netbeans/editor/ext/JDCPopupPanel.java,v  <-- 
JDCPopupPanel.java
new revision: 1.32; previous revision: 1.31
done
Checking in lib/src/org/netbeans/editor/ext/java/JavaFastImport.java;
/cvs/java/editor/lib/src/org/netbeans/editor/ext/java/JavaFastImport.java,v
 <--  JavaFastImport.java
new revision: 1.3; previous revision: 1.2
done
Checking in src/org/netbeans/modules/editor/java/JMIUtils.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/JMIUtils.java,v
 <--  JMIUtils.java
new revision: 1.12; previous revision: 1.11
done
Checking in src/org/netbeans/modules/editor/java/NbJMIResultItem.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJMIResultItem.java,v
 <--  NbJMIResultItem.java
new revision: 1.5; previous revision: 1.4
done
Checking in src/org/netbeans/modules/editor/java/NbJavaJMICompletion.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaJMICompletion.java,v
 <--  NbJavaJMICompletion.java
new revision: 1.3; previous revision: 1.2
done
Checking in
src/org/netbeans/modules/editor/java/NbJavaJMICompletionQuery.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaJMICompletionQuery.java,v
 <--  NbJavaJMICompletionQuery.java
new revision: 1.5; previous revision: 1.4
done
Checking in src/org/netbeans/modules/editor/java/NbJavaJMIFastImport.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaJMIFastImport.java,v
 <--  NbJavaJMIFastImport.java
new revision: 1.5; previous revision: 1.4
done
Checking in src/org/netbeans/modules/editor/java/NbJavaJMIFastOpen.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaJMIFastOpen.java,v
 <--  NbJavaJMIFastOpen.java
new revision: 1.5; previous revision: 1.4
done
Comment 4 Roman Strobl 2005-02-22 12:19:20 UTC
Please fix this issue in 4.1 beta branch, too. Thanks.
Comment 5 Dusan Balek 2005-02-22 14:10:04 UTC
Integrated into [release41_beta] branch.

Checking in Completion.java;
/cvs/editor/libsrc/org/netbeans/editor/ext/Completion.java,v  <-- 
Completion.java
new revision: 1.38.2.1; previous revision: 1.38
done
Checking in JDCPopupPanel.java;
/cvs/editor/libsrc/org/netbeans/editor/ext/JDCPopupPanel.java,v  <-- 
JDCPopupPanel.java
new revision: 1.31.18.1; previous revision: 1.31
done
Checking in lib/src/org/netbeans/editor/ext/java/JavaFastImport.java;
/cvs/java/editor/lib/src/org/netbeans/editor/ext/java/JavaFastImport.java,v
 <--  JavaFastImport.java
new revision: 1.2.8.1; previous revision: 1.2
done
Checking in src/org/netbeans/modules/editor/java/JMIUtils.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/JMIUtils.java,v
 <--  JMIUtils.java
new revision: 1.10.2.1; previous revision: 1.10
done
Checking in src/org/netbeans/modules/editor/java/NbJMIResultItem.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJMIResultItem.java,v
 <--  NbJMIResultItem.java
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in src/org/netbeans/modules/editor/java/NbJavaJMICompletion.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaJMICompletion.java,v
 <--  NbJavaJMICompletion.java
new revision: 1.2.8.1; previous revision: 1.2
done
Checking in
src/org/netbeans/modules/editor/java/NbJavaJMICompletionQuery.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaJMICompletionQuery.java,v
 <--  NbJavaJMICompletionQuery.java
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in src/org/netbeans/modules/editor/java/NbJavaJMIFastImport.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaJMIFastImport.java,v
 <--  NbJavaJMIFastImport.java
new revision: 1.4.2.1; previous revision: 1.4
done
Checking in src/org/netbeans/modules/editor/java/NbJavaJMIFastOpen.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/NbJavaJMIFastOpen.java,v
 <--  NbJavaJMIFastOpen.java
new revision: 1.4.6.1; previous revision: 1.4
done