How to instantiate nested classes in Java BaseLanguage?

As an example I would like enter the following statement:

Rectangle2D a = new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0);

But I can't get it work. There is no matching entry in the autocomplete menu after the new operator. A workaround is to enter:

Rectangle2D.Double b = new Rectangle2D.Double(1.0, 2.0, 3.0, 4.0);

and then copy & paste the initializer to the variable a, but this is kind of ugly. What is is correct way?

1 comment
Comment actions Permalink

Indeed, this is not quite polished editor experience. You can type "new Double" and the completion menu will contain also nested classes named "Double".


Please sign in to leave a comment.