File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes Using XDoclet with an IDE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Using XDoclet with an IDE" Watch "Using XDoclet with an IDE" New topic
Author

Using XDoclet with an IDE

Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I was wondering. If one leaves all the nasty stuff like EJB interfaces for XDoclet to generate, wouldn't that render the IDEs' "syntax checking" features helpless (for example, if there is no MyEjbHome, the client code would be "red" because the IDE can't guess that the missing interface will be generated by the Ant script nor that the interface will contain the particular method the developer is calling)?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
Originally posted by Lasse Koskela:
I was wondering. If one leaves all the nasty stuff like EJB interfaces for XDoclet to generate, wouldn't that render the IDEs' "syntax checking" features helpless (for example, if there is no MyEjbHome, the client code would be "red" because the IDE can't guess that the missing interface will be generated by the Ant script nor that the interface will contain the particular method the developer is calling)?

Why not add your generated source directory to the source path of your IDE?
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Yes, you definitely need to let your IDE know about the generated code if you want it to make use of it. You'll have to build to get all the source files, but after that it shouldn't be an issue.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Yep, I thought of this. I guess running the Ant script once when adding a new EJB, for example, is not that big a deal after all.
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
After you do it once, they tend to stay around until you do a clean. And it's rare for me a clean without a new build right after it. I think the bigger issue would be the IDE detecting changes in the compiled code. But, I believe most IDEs play nicely when you use an external editor to update the code, so XDoclet changes should look like those of any other external "editor".
I wonder if anyone has used an IDE that didn't work well with XDoclet. I know the major IDEs are fine, but I could imagine a smaller IDE being less friendly.
Juan Rolando Prieur-Reza
Ranch Hand

Joined: Jun 20, 2003
Posts: 235
Originally posted by Lasse Koskela:
...running the Ant script once when adding a new EJB, for example, is not that big a deal ...

Thanks. This addresses a concern about round-trip engineering with XDoclet that I raised in a previous thread here.


Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
This is a slightly different topic, but one really interesting aspect of round tripping to external tools is when the tools are XDoclet aware. We've touched on AndroMDA and middlegen already, and someone mentione xdocletgui which was intended to be an external xdoclet tag editor. When you can change your bean name in a modelling tool, for example, and have the reflected in the XDoclet tags (and vice versa) then you really have a complete solutiion. I wonder of TogetherJ or any of those tools have XDoclet aware solutions.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using XDoclet with an IDE
 
Similar Threads
EJB
Code Generation - Opinions Please?
using Xdoclet to create EJBs
Session objects from XDoclet
Session objects from XDoclet