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.
ie in this case: new File(".").listFiles().s| CC does not offer "sort()"
I think the code completion does not work (suggesting only methods for Object) on method calls in general. So this "new SomeObject().|" should work, while "new SomeObject().someMethod().|" does not work at all so far (afaik). So perhaps we should make this issue P1 enhancement. I think we will need some kind of type inference in order to determine (guess) return type of the method.
Actually I didn't want to argue about the category/severity. My point was that this is missing functionality.
...pretty important to have tracked at least (and implemented - in this case sooner is better I think) It's quite annoying to think about that I have to be using one statement per typed variable per line instead of just typing more statements at once to be able to use CC. compare what I have to type: Process p = (command + "").execute() p.waitForOrKill(5000); to what I want to type: (command + "").execute().waitForOrKill(5000) (or later maybe: def p = (command + "").execute() p.waitForOrKill(5000) p.exitValue() )
not sort example, but one gets an idea :-) Is issue 152779 dup or subset of this then?
Could be. Depends just on scope of type inference task we will define. In general it is a subset, but I would rather keep it tracked separate and establish some groups like 1) method calls, 2) operators 3)... Actually there should a very very simple type inference for cases like: def x = new Date() // the x is java.lang.Object in fact ... x.| // here Date cc should be offered despite the java.lang.Object type of variable
We can try to support basic scenario even for 7.0.
*** Issue 149715 has been marked as a duplicate of this issue. ***
Would be nice to have this as soon as possible, but not sure if there will be enough of time to do so for 7.2 --> Changing TM to Next
*** Bug 152779 has been marked as a duplicate of this bug. ***
*** Bug 153701 has been marked as a duplicate of this bug. ***
From the issue 152779: ("" + "").| should offer same methods as: "".| From the issue 153701: since /regex/ (as well as ~"regex") is only a shortcut for an instance of java.util.regex.Pattern editor should be able to recognize it and offer Pattern methods in code completion (at least for cases like "/regex/.|")
*** Bug 225731 has been marked as a duplicate of this bug. ***
First part of the issue done in: web-main #2553ab6b0c22 The code completion works on method chain but only in cases when the "base" variable is directly declared (statically typed). I need to spend more time on this to get it working also for dynamic variables.