Netbeans not auto importing classes

View: New views
4 Messages — Rating Filter:   Alert me  

Netbeans not auto importing classes

by shang1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I recently did a new install of netbeans on my opensuse distro.



Before, when I used to use netbeans if I typed for example:

ArrayList<String> a = new ArrayList<String>();



Then I could click at the start of the line and select add import for java.util.ArrayList;



However, now with my fresh install, this option is no longer available.



I need to import it manually.



Is there an option I need to check or something I am missing with my install?



Thanks for any help..





Re: Netbeans not auto importing classes

by Peter Pis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

 I've just tried it for NB 6.8 Beta and it works fine (clicking on the
yellow bulb in the gutter, invoking hint by short cut on appropriate line)

Could you please provide further details? NB build, jdk version,
operating system, example source code?

Thanks,
-Peter

shang1 wrote:

> I recently did a new install of netbeans on my opensuse distro.
>
>
>
> Before, when I used to use netbeans if I typed for example:
>
> ArrayList<String> a = new ArrayList<String>();
>
>
>
> Then I could click at the start of the line and select add import for java.util.ArrayList;
>
>
>
> However, now with my fresh install, this option is no longer available.
>
>
>
> I need to import it manually.
>
>
>
> Is there an option I need to check or something I am missing with my install?
>
>
>
> Thanks for any help..
>
>
>
>
>  


Netbeans not auto importing classes

by shang1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

netbeans version - 6.5

java version - OpenJDK Runtime Environment (IcedTea6 1.6) (suse-5.9.3-i386)

                       OpenJDK Server VM (build 14.0-b16, mixed mode)

OS - opensuse 11.2



Example source:


Code:


public class Eg {



    ArrayList<String> s = new ArrayList<String>();

    String name;



    public Eg(String n, Date d){

        this.name = n;

    }



}







When I click on the red bulb on the arraylist line, (yellow does not show up), the only option is:

'Create class ArrayList in ..'



There is no import option, which is a feature I loved and now miss.'





Re: Netbeans not auto importing classes

by Peter Pis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

    for me: 6.5, 6.7, and 6.8 works fine on Mac.

Perhaps there might be problem related to jdk you use. Could you please
try to install standard jdk distribution?

Anyway, could you please send me messages.log (located in
<netbeans_user_directory>/var/log) privately?

Thanks,
-Peter

shang1 wrote:

> netbeans version - 6.5
>
> java version - OpenJDK Runtime Environment (IcedTea6 1.6) (suse-5.9.3-i386)
>
>                        OpenJDK Server VM (build 14.0-b16, mixed mode)
>
> OS - opensuse 11.2
>
>
>
> Example source:
>
>
> Code:
>
>
> public class Eg {
>
>
>
>     ArrayList<String> s = new ArrayList<String>();
>
>     String name;
>
>
>
>     public Eg(String n, Date d){
>
>         this.name = n;
>
>     }
>
>
>
> }
>
>
>
>
>
>
>
> When I click on the red bulb on the arraylist line, (yellow does not show up), the only option is:
>
> 'Create class ArrayList in ..'
>
>
>
> There is no import option, which is a feature I loved and now miss.'
>
>
>
>
>