How do I find out the source-file? Please help!

Marco Schulze <[email protected]>
Newsgroups gmane.comp.java.xdoclet.devel
Message-ID <[email protected]>
Hello all,

you probably noticed that I'm currently working on the JDO module. In
order to finish the work which I started yesterday, I need to know in my
tags-handler, in which source-file I currently am. I searched for hours
and simply didn't find any possibility - please help!

I need to know the source-file belonging to the "currentClass", because
I want to have the possibility to include files into the generated
objectid-classes. I know that there is a "merge directory" and somehow
code from this directory can be merged. But this is - as far as I
understand it - not suitable for my needs: I want to search NOT only in
ONE directory, but relative to the source-java-file. Additionally, I
want to give the user the possibility to have his include files in a
subdirectory or otherwise relatively addressed. How can I do that?

I saw that there's "Sourceclass.getFile()" which looks pretty much like
what I search for, but when I call
"getXJavaDoc().getSourceclasses().iterator()" in order to generate a
lookup-map (class => file), I get a NullPointerException. This is the
case as well in my tags-handler as in my subtask.

Then I thought I could access the fileset from the ant declaration (and
simply append my package-class-path):

        <jdodoclet jdospec="2.0" destdir="${project.dir}/${ejbsrc.dir}">
            <fileset dir="../../src" defaultexcludes="yes"/>
            <jdometadata project="package" generation="package"/>
            <jdoobjectidgenerator interfaces="com.nightlabs.jdo.ObjectID"/>
        </jdodoclet>

But I didn't find out how to get this fileset.

Does anyone have an idea how I can get the absolute path to the file
which belongs to the current class??? Thousand thanks in advance!

Best regards, Marco ;-)



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.