errael opened a new pull request #2399:
URL: https://github.com/apache/netbeans/pull/2399


   @sdedic could you take a look at this fix.
   
   The assertion was due to CompilerInfo not having a list of modules. Fixed in 
`FXMLCompletion2.Q.Taks.run` with the getPackageElement:
   ```
       ci = CompilationInfo.get(result);
       // following populates module info, partial fix for [NETBEANS-4832]
       ci.getElements().getPackageElement("java.lang");
   ```
   
   This fixed code completion inside an UI element, for example<Label.../>"
   
   However there was an NPE inside a list, for example 
in`<children>...</children>`. This was fixed by what looks like a bug/oversight 
in `ElementUtils.getTypeElementByBinaryName`.
   
   In FxIncludeCompleter.createCompleter
   ```
       TypeMirror tm = prop.getType().resolve(ctx.getCompilationInfo());
   ```
   returned null which causes NPE in jdk.  fixed by the identity check in
   ```
       ElementUtils.getTypeElementByBinaryName
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to