jlahoda opened a new pull request #1074: Have only one copy of TreeShims and 
copy it to java.hints and java.co…
URL: https://github.com/apache/incubator-netbeans/pull/1074
 
 
   …mpletion.
   
   Currently, we have a problem for supporting new Java language features:
   -our baseline API against which we build is JDK 9
   -we would like to introduce features for the Java language features 
introduced since that.
   -even if we upgraded the baseline to JDK 11, that would still not allow to 
use the APIs from JDK 12 for modelling switch enhancements (JEP 325)
   -I don't think we want to move the baseline to JDK 12 yet (and when we will, 
there may already be need to support JDK 13, etc.)
   
   So, the imperfect solution foreseen so far was to use reflection to access 
the newer APIs. In order to isolate the actual features from the reflection, 
TreeShims were introduced providing nice methods to access the new API/data.
   
   I don't think the TreeShims should be an API - there's just a handful of 
uses, and when the baseline is moved to a future JDK version, these would be 
just unnecessary, but would need to be kept in the API "forever". So the idea 
was to have a copy of TreeShims in the modules that need them. And now, as we 
need the TreeShims in java.completion as well, it is probably time to stop to 
copy the class manually, but rather automatically. This is what this patch is 
doing - there is only one instance of TreeShims in java.source.base, which is 
copied at compile-time to java.hints and java.completion.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
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