Skip to main content



      Home
Home » Newcomers » Newcomers » JDTCompilerAdapter
JDTCompilerAdapter [message #167890] Mon, 28 August 2006 14:09 Go to next message
Eclipse UserFriend
Originally posted by: chadmichaeldavis.gmail.com

I am reading the Oreilly Eclipse book, by STeve Holzner, and he has the
following compiler added to an ant build, though he doesn't say why to
use it.

<property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"/>

1) I assume this makes ant use the built in compiler; is this correct?

2) Does this allow eclipse to become aware of project structure while
you use your ant build?
Re: JDTCompilerAdapter [message #167903 is a reply to message #167890] Mon, 28 August 2006 14:48 Go to previous messageGo to next message
Eclipse UserFriend
blackdog software a écrit :
> <property name="build.compiler"
> value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
> 1) I assume this makes ant use the built in compiler; is this correct?
Ant will then use the Eclipse compiler to compile the source code. Of
course the Eclipse compiler .class files need to be on the classpath.

> 2) Does this allow eclipse to become aware of project structure while
> you use your ant build?
Could you please explain what you mean by "become aware of project
structure"?
--
Olivier
Re: JDTCompilerAdapter [message #167912 is a reply to message #167903] Mon, 28 August 2006 14:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chadmichaeldavis.gmail.com

Olivier Thomann wrote:
> blackdog software a écrit :
>> <property name="build.compiler"
>> value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
>> 1) I assume this makes ant use the built in compiler; is this correct?
> Ant will then use the Eclipse compiler to compile the source code. Of
> course the Eclipse compiler .class files need to be on the classpath.
>
>> 2) Does this allow eclipse to become aware of project structure while
>> you use your ant build?
> Could you please explain what you mean by "become aware of project
> structure"?
> --
> Olivier
Thanks for your response.

I mean that Eclipse must somehow become aware of a project's structure
in order to provide such functionality as "Open Declaration",
"Refactor", etc. Normally, when an ant build is run, Eclipse doesn't
seem to gain this information. It seems that it only does this when it
uses its own compiler.

SO, does this ant property definition allow eclipse to learn the
structure of a project while its being built by an ant build?

ALSO, you mention that the Eclipse compiler must be on the path? How
could the Eclipse compiler not be in the classpath already?
Re: JDTCompilerAdapter [message #167919 is a reply to message #167912] Mon, 28 August 2006 15:00 Go to previous messageGo to next message
Eclipse UserFriend
chad a écrit :
> I mean that Eclipse must somehow become aware of a project's structure
> in order to provide such functionality as "Open Declaration",
> "Refactor", etc. Normally, when an ant build is run, Eclipse doesn't
> seem to gain this information. It seems that it only does this when it
> uses its own compiler.
Eclipse doesn't use an ant script to compile the source of a project in
general. It has its own java builder.

> ALSO, you mention that the Eclipse compiler must be on the path? How
> could the Eclipse compiler not be in the classpath already?
It looks like you are confusing two things. Ant scripts and builder in
Eclipse. If you are inside Eclipse, you should simply use the Java builder.
If you are outside of Eclipse or want to run an ant script using the
Eclipse compiler, then you can use the property that you gave.

HTH,
--
Olivier
Re: JDTCompilerAdapter [message #167927 is a reply to message #167919] Mon, 28 August 2006 15:19 Go to previous message
Eclipse UserFriend
Originally posted by: chadmichaeldavis.gmail.com

Olivier Thomann wrote:
> chad a écrit :
>> I mean that Eclipse must somehow become aware of a project's structure
>> in order to provide such functionality as "Open Declaration",
>> "Refactor", etc. Normally, when an ant build is run, Eclipse doesn't
>> seem to gain this information. It seems that it only does this when
>> it uses its own compiler.
> Eclipse doesn't use an ant script to compile the source of a project in
> general. It has its own java builder.
>
>> ALSO, you mention that the Eclipse compiler must be on the path? How
>> could the Eclipse compiler not be in the classpath already?
> It looks like you are confusing two things. Ant scripts and builder in
> Eclipse. If you are inside Eclipse, you should simply use the Java builder.
> If you are outside of Eclipse or want to run an ant script using the
> Eclipse compiler, then you can use the property that you gave.
>
> HTH,
> --
> Olivier

I understand the difference between the ant script and the internal
builder. The build for the project that I am working on is much too
complex to use the internal builder. So, I need to use the ant build.
Eclipse provides tools to use this from within Eclipse. But if i forgo
the internal builder, how does eclipse become aware of the project
structure in order to provide the extra functions it has?
Previous Topic:Getting error when loading eclipse after install
Next Topic:Perforce plugin?
Goto Forum:
  


Current Time: Wed Jul 23 03:53:03 EDT 2025

Powered by FUDForum. Page generated in 0.49693 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top