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 90767 - Code Completion in static blocks and instance Initializers not working
Summary: Code Completion in static blocks and instance Initializers not working
Status: RESOLVED DUPLICATE of bug 87560
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on: 87560
Blocks:
  Show dependency tree
 
Reported: 2006-12-07 15:15 UTC by elishae
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 elishae 2006-12-07 15:15:10 UTC
While coding in a static block or 'instance initializer block', NetBeans does 
not list the local variables or static variables available in the Class in the 
code completion popup. Please Fix this.

e.g:

Class X {
   public static String str1 = "STR1";

   public static String str2 = null;

   static {
      StringBuilder b = new StringBuilder().
      //Typing "b." here pops up the code completion window which does NOT show 
      // the methods of StringBuilder. Instead, it looks up for a class 
      // named "b" and shows that class's members in the code completion popup.
      // This is very much confusing.
   }  
}

// This behavior can be simulated in the "Instance Initializer block" also.

Class Y {
   private String s;

   {
       StringBuilder b = new StringBuilder();
       // Typing "b." does not show methods of StringBuilder, 
       // instead they show methods of some class 'b' 
      
   }
}

Please Fix.
Comment 1 Jiri Prox 2006-12-07 17:12:23 UTC
It's duplicate of issue 87560, thanks for your report anyway.

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