• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using XDoclet with an IDE

 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)?
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
norman richards
Author
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic