stevedlawrence opened a new pull request #486:
URL: https://github.com/apache/incubator-daffodil/pull/486


   Although updateEclipseClasspaths works, it is not really the best way
   tweak the eclipse configuration files created via "sbt eclipse". It's a bit
   fragile since environment variables must be set correctly, one must
   always remember to run it after running "sbt eclipse", and it's a decent
   amount of code that we need to maintain/debug.
   
   Instead, the expect way to make modifications to the "sbt eclipse"
   generated files is to create "transformers". These transformers are
   essentially just scala.xml.RewriteRules that the sbt plugin evaluates
   after creating the .classpath/.project files to transform the resulting
   XML. And the eclipse plugin provides some useful abstractions so you
   don't even need to know the details of RewriteRule's to make common
   changes to these files, though the capability is there if the
   abstractions are not sufficient.
   
   So this removes the updateEclipseClasspaths code and replaces it with
   sbt eclipse plugin settings and transformers. Only one transform is
   actually needed, which is to add the missing macroLib dependency in
   classpath files of projects that use macros. UpdateEclipseClasspaths
   doesn't actually make any other functional changes to these files
   anymore.
   
   This means we no longer need to run sbt updateEclipseClasspaths or
   configure DAFFODIL_HOME in order to create eclipse configs, so should
   reduce errors that people might run into when trying to use eclipse. And
   the sbt eclipse abstractions should make it relatively straightforward
   to add new changes if needed (although, documentation is unfortunately 
sparse).
   
   This also adds eclipse to the set of plugins we use. Configuring these
   settings requires that the plugin exists, but it also makes it easier
   for users that want to use this since it's already enable. This doesn't
   really affect users that never run "sbt eclipse".
   
   DAFFODIL-2465


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


Reply via email to