You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/10/16 18:32:05 UTC

[GitHub] [netbeans] jlahoda opened a new pull request #1573: Must ensure javac is initialized before attempting any lookups.

jlahoda opened a new pull request #1573: Must ensure javac is initialized before attempting any lookups.
URL: https://github.com/apache/netbeans/pull/1573
 
 
   tzezula reported that the Navigate/Go to Symbol feature does not work properly for Java:
   -the entries in the list are missing the icon
   -pressing Enter does not jump to the actual entry
   
   I believe the reason is that ElementUtils.getTypeElementByBinaryName is called on an javac instance, that is not sufficiently initialized (since JDK 9, javac must be initialized a little bit more that before to work). This is particularly problem since this feature uses the javac internal directly. The proposed patch is to force the proper initialization. There are multiple ways to do that, but JavacTask.getElements().getTypeElement("java.lang.Object") feels like the cleanest. (Alternative would be "jt.ensureEntered()", but that is yet another call to an javac internal method, while getTypeElement is public.)
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

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