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.
Summary: | improve Autosuggest, Code completion for class instantiation, repetitive usage and local variables | ||
---|---|---|---|
Product: | java | Reporter: | ssteiner <ssteiner> |
Component: | Editor | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | Keywords: | USABILITY |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows 7 x64 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
ssteiner
2010-05-20 08:54:59 UTC
And I almost forgot Suppose I have an enum declared in com.mycompany.package1: public enum Pack1Enum {Value1, Value2, Value3}; and a method: private com.mycompany.package1.Pack1Enum testMethod() { return new com.mycompany.package2.Pack2Class1() } now when I call that method this.testMethod And I almost forgot Suppose I have an enum declared in com.mycompany.package1: public enum Pack1Enum {Value1, Value2, Value3}; and a method: public static com.mycompany.package1.Pack1Enum testMethod() { return Pack1Enum.Value1; } So in my code using those packages, if I type if (com.mycompany.package1.testMethod() == Then Visual Studio would realize that what I get back is com.mycompany.package1.Pack1Enum and would suggest com.mycompany.package1.Pack1Enum thus sparing me from typing "com." until the autosuggest kicks in, then press tab two more times then select Pack1Enum from the list until I'm at the same point. And, it would be even more work if the return value of testMethod were com.mycompany.package2.Pack2Enum... And I got one more. Suppose Pack3Class2 has one constructor: public Pack3Class2(String param1, String param2) { // do something } In my code I'm using Pack3Class2: com.mycompany.package3.Pack3Class2 p3c2 = new com.mycompany.package3.Pack3Class2 At that point, Visual Studio gracefully suggests all the available constructors. Netbeans just sits there waiting for me to figure out what kind of constructors there are. Similar behavior could be achieved by enabling 'Auto Popup on Typing Any Identifier Part' and adding space character to 'Auto Popup Triggers for Java' in Tools -> Options -> Editor -> Code Completion -> Java. You could also limit the list of 'Completion Selectors for Java' to '.(' in such a case. |