If you run ant from inside eclipse, there is a custom ant task built into eclipse:  
<eclipse.refreshLocal resource="${resource.name}"/>

We try to name the ant project the same as the eclipse project, so you can use the 
construct:
<eclipse.refreshLocal resource="${ant.project.name}"/>

Eclipse also sets an ant property "eclipse.running", so you can use a build file both 
inside and outside eclipse:
<target name="gen-descriptors">
  <ejbdoclet destdir="src">
    <fileset dir="src" includes="*.java"/>
    <homeinterface/>
    <remoteinterface/>
  </ejbdoclet>
  <antcall target="refresh"/>
</target>
<target name="refresh" if="eclipse.running">
  <eclipse.refreshLocal resource="${ant.project.name}"/>
</target>

-Joe

>>> [EMAIL PROTECTED] 02/06/03 05:34PM >>>
I just ran into this myself.  What I did was to include the generated source root 
directory as a source directory known to Eclipse.  I end up doing "refresh" a lot on 
that folder in the navigator, but it seems to work OK for me and then I can inspect 
the generated stuff in Eclipse too.  

Best wishes,

Joanthan


>>> [EMAIL PROTECTED] 02/06/03 03:58PM >>>
I'm currently using XDoclet to generate EJB interfaces for entity and session beans.  
I have an Ant task that generates the interface source on the fly, compiles all of the 
source, and then JARs everything together.   Everything is working great.

My question comes when editing the project in an IDE.  I'm using Eclipse to create my 
source code.  Since all of the EJB interfaces are generated on the fly, Eclipse pops 
up lots of errors in any classes that try to reference those interfaces.  Everything 
still builds fine in Ant, but this makes it impossible to debug anything in Eclipse.  
My solution to this problem has been to create a separate JAR that contains only the 
XDoclet-generated classes.  I include this JAR in the Eclipse project's classpath and 
then everything compiles fine.

Is this the best way to handle this problem?  I wasn't sure if anyone else had come up 
with a better solution.

Thanks,
Adam



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com 
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED] 
https://lists.sourceforge.net/lists/listinfo/xdoclet-user 



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com 
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED] 
https://lists.sourceforge.net/lists/listinfo/xdoclet-user



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to