Opentools - sys.Author & classpath trouble
Hello everybody,
I just started developing my first opentools. This works fine, except for a
few strange problems I cannot solve. To briefly explain what I'm trying to
do : I'm adding several wizards to the Object Gallery that will generate
code based on templates. I'm using JBuilder2006 BTW, and I'm not a very
experienced JBuilder user.
1) I would like to add an Author automatically. Now, what I've found on the
internet is that you set this and several other properties using Project -
Project Properties - General and then there's a grid called Class Javadoc
fields. This grid contains title, description, company, @author and others.
I've given values to all of them.
In my code, I use :
jbproject.getProperty("sys", "Author", ""); // jbproject is a JBProject
instance
This, however, always gives me the default value I specify (""). What is
even more strange : I've asked for a list of all properties, and stepped
through them all using the debugger and *every single one* of the properties
(title, description, ...) is shown using this technique. There is a
sys.Authorlabel property which contains @author but then it jumps right to
the next property! There simply is no sys.Author property in my object,
allthough there is a value specified for it.
Anyone knows of another way to get the Author's name? Or knows what I'm
doing wrong?
2) second problem seems to be a classpath problem. Using my templates, I
add classes to my project. There is one wizard that must look for
(autogenerated) classes that implement a specific interface, and generate
extra code for those classes. I can locate the classes I want in my project
without a problem. I use reflection to see whether a class implements the
interface I want or not.
I'm debugging my opentools using the well known technique of starting
another jbuilder instance (see e.g.
http://www.devdaily.com/blog/Content/2/3/417/). When I debug my code (=run
in debug mode), it works fine. I look up my classes using Class.forName,
and they are found. When I deploy my opentool and run it without debug, I
get classNotFoundExceptions all the time using the exact same project with
the same classes, without changing my code.
I hope this makes some sense ;-) In short, I think there's a difference in
classpath setting between the debug and non-debug mode for classes that are
in my project classpath (all classes are in the classes directory of my
project).
Any ideas here, because I really have no clue how to solve this one.
Phew, not sure if anyone knows what the hell I'm talking about, but please
let me know if you need more information.
Thanks a lot,
Regards
alex.
|