Bug 21934 - [Ant] Include setting to use Eclipse compiler automatically
Summary: [Ant] Include setting to use Eclipse compiler automatically
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.0   Edit
Hardware: Other other
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: core
Depends on:
Blocks:
 
Reported: 2002-07-25 20:29 EDT by Scott Rutledge CLA
Modified: 2002-11-04 15:41 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Rutledge CLA 2002-07-25 20:29:12 EDT
Currently, to get Ant scripts to compile from within Eclipse, the user has to manually map the Ant 
'build.compiler' variable to the Eclipse compiler adapter (which can be done in a number of 
ways).

Could we instead have a setting to do this automatically (and for the love of all that's 
holy, make it default to true).

Sincerely,
Someone-who-can't-take-directing-yet-another-
person-to-the-Eclpse-Wiki-to-explain-this.
Comment 1 Philipe Mulet CLA 2002-07-29 06:25:20 EDT
Currently Ant knows nothing about our compiler adapter. However, the setting 
approach is tempting if doable.

CC'ing Rodrigo for comment.
Comment 2 Olivier Thomann CLA 2002-07-29 09:53:59 EDT
I think this has to be done throught the ant support and not in JDT/Core.
Move to Platform/Core.
Comment 3 Rodrigo Peretti CLA 2002-07-29 10:51:55 EDT
It is an interesting suggestion but the implementation might be tricky. Since 
Ant Core does not depend on JDT Core we can't set that automatically. One 
alternative would be to provide an extension point where a plug-in could set a 
property before every script run. In this case JDT Core (or the External 
Tools - probably the best place) would provide the setting to define the JDT 
compiler to be the default.

Also, we have to be *very* careful when setting the JDT compiler to be the 
default compiler and I believe we should *only* do that if we can't find 
tools.jar since the Ant behaviour (and what Ant users are used to) is to use 
javac as the default compiler.
Comment 4 Olivier Thomann CLA 2002-07-29 10:57:29 EDT
I agree that the best place for such an option is the "External tools" support. 
I also agree that the Eclipse compiler should not be the default value. Having 
an option to change the default compiler is good enough. The default option has 
to be the one expected by the majority of Ant users. We should document as well 
that switching compilers might have an impact on the size of the 
generated .class files.
Comment 5 Darin Swanson CLA 2002-11-04 15:41:55 EST
Current solution: 
Global properties and global property files can be specified.
There is no extension point for plugins (yet ;-) ) but this would allow Eclipse 
users to easily set the build.compiler property to the JDTCompilerAdapter:
build.compiler= org.eclipse.jdt.core.JDTCompilerAdapter

See bug 25698 and bug 25699.

As well plain old javac works with tools.jar on the Ant classpath (which is 
done by default).