Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-895

Code completion for field initializer does not add import without nbjavac

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 13
    • java - Editor
    • None
    • release-302-on-20180517 without nbjavac

    Description

      Code completion for a field initializer does not add import when nbjavac is not enabled.

      for a field type, there are `SecurityException` and `SecurityManager` but are not `Set` for candidates in the completion list.

      class Foo {
        Se[ctrl]+[space]
      }
      

      for a field initializer, choising `HashSet` does not add `import java.util.HashSet`

      import java.util.Set;
      class Foo {
        Set s = new Hash[ctrl]+[space]
      }
      

      for a field initializer, choising `HashSet` does not insert the `HashSet`

      import java.util.Set;
      class Foo {
        static Set s = new Hash[ctrl]+[space]
      }
      

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            kishida Naoki Kishida
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: