Home » Language IDEs » Java Development Tools (JDT) » Inherit Javadoc from sources outside own project fails
Inherit Javadoc from sources outside own project fails [message #134823] |
Wed, 14 January 2004 14:36  |
Eclipse User |
|
|
|
Originally posted by: carsten.langer.nokia.com
Hi all,
I want to use the Javadoc feature for implicit and explicit (@inheritDoc)
inheriting Javadoc method comments for overridden methods as described by
the Javadoc documentation, chapter "Automatic Copying of Method Comments". I
want to generate the Javadoc for my project from within Eclipse
(Project/Generate Javadoc...), not with Ant.
It works fine if I override a method from my own sourcepath. However, if I
override a method from outside my own sourcepath, e. g. a method from the
JDK, I just get empty comments.
So far I analysed the reason for this to be:
- javadoc needs to know where the sources are where it should look up the
inherited comments, therefore the configuration parameter -sourcepath xxx is
needed.
- This -sourcepath xxx seems to be set by Eclipse automatically to the
project source path (Projects/Properties/Java Build Path/Source, checked
boxes) when javadoc is called. I found this out by letting Eclipse generate
Ant XML files for Javadoc.
- You can't give Javadoc another -sourcepath as an extra Javadoc option,
as -sourcepath is only allowed once.
Now I feel gotten stuck:
- If I wanted to inherit comments e. g. from JDK, I would need to put the
JDK source to the projects sourcepath - not a good idea, isn't it?
- I don't know wheter I can influence the -sourcepath set by Eclipse
otherwise.
- I can't give an extra -sourcepath configuration parameter.
Does anybody have a idea or solution on this?
(I feel Ant could do the trick, but as up to now I never needed to use Ant I
would rather like to keep it this way.)
Thanks
Carsten
|
|
|
Re: Inherit Javadoc from sources outside own project fails [message #135001 is a reply to message #134823] |
Thu, 15 January 2004 08:50   |
Eclipse User |
|
|
|
It's easily done.
In my ant.properties file I've added the following lines
jdk.api.docs=http://localhost:8080/jdk/api
junit.api.docs=http://www.junit.org/junit/javadoc/3.8.1
log4j.api.docs=http://jakarta.apache.org/log4j/docs/api
Then my java doc target in my build.xml looks like
<javadoc packagenames="*" sourcepath="${src.java.dir}"
destdir="${javadoc.dir}" author="true" private="true"
version="true" use="true"
header="<img src='/wapa/image/gswapa1.gif' />"
footer="" excludepackagenames="**/test/**/"
windowtitle="${ant.project.name} API Documentation"
doctitle="'rmr${ant.project.name}' Library API Documentation"
bottom="Created ${doc.time} for ${company.name}">
<classpath refid="classpath" />
<link href="${jdk.api.docs}" />
<link href="${junit.api.docs}" />
<link href="${log4j.api.docs}" />
</javadoc>
On Wed, 14 Jan 2004 20:36:26 +0100, "Carsten Langer"
<carsten.langer@nokia.com> wrote:
>Hi all,
>
>I want to use the Javadoc feature for implicit and explicit (@inheritDoc)
>inheriting Javadoc method comments for overridden methods as described by
>the Javadoc documentation, chapter "Automatic Copying of Method Comments". I
>want to generate the Javadoc for my project from within Eclipse
>(Project/Generate Javadoc...), not with Ant.
>
>It works fine if I override a method from my own sourcepath. However, if I
>override a method from outside my own sourcepath, e. g. a method from the
>JDK, I just get empty comments.
>
>So far I analysed the reason for this to be:
>- javadoc needs to know where the sources are where it should look up the
>inherited comments, therefore the configuration parameter -sourcepath xxx is
>needed.
>- This -sourcepath xxx seems to be set by Eclipse automatically to the
>project source path (Projects/Properties/Java Build Path/Source, checked
>boxes) when javadoc is called. I found this out by letting Eclipse generate
>Ant XML files for Javadoc.
>- You can't give Javadoc another -sourcepath as an extra Javadoc option,
>as -sourcepath is only allowed once.
>
>Now I feel gotten stuck:
>- If I wanted to inherit comments e. g. from JDK, I would need to put the
>JDK source to the projects sourcepath - not a good idea, isn't it?
>- I don't know wheter I can influence the -sourcepath set by Eclipse
>otherwise.
>- I can't give an extra -sourcepath configuration parameter.
>
>Does anybody have a idea or solution on this?
>(I feel Ant could do the trick, but as up to now I never needed to use Ant I
>would rather like to keep it this way.)
>
>Thanks
>Carsten
>
|
|
|
Re: Inherit Javadoc from sources outside own project fails [message #135052 is a reply to message #135001] |
Thu, 15 January 2004 11:33   |
Eclipse User |
|
|
|
Originally posted by: carsten.langer.nokia.com
Hi,
thanks for the Ant XML file.
But I was looking for a solution without using Ant, so just with using
(Project/Generate Javadoc...) from within Eclipse. Any idea for this?
Carsten
"Tom" <tcrosman@wapa.gov> wrote in message
news:ab6d00lk7071nlmajfv72r45jojtjdgrcm@4ax.com...
> It's easily done.
> In my ant.properties file I've added the following lines
>
> jdk.api.docs=http://localhost:8080/jdk/api
> junit.api.docs=http://www.junit.org/junit/javadoc/3.8.1
> log4j.api.docs=http://jakarta.apache.org/log4j/docs/api
>
> Then my java doc target in my build.xml looks like
>
> <javadoc packagenames="*" sourcepath="${src.java.dir}"
> destdir="${javadoc.dir}" author="true" private="true"
> version="true" use="true"
> header="<img src='/wapa/image/gswapa1.gif' />"
> footer="" excludepackagenames="**/test/**/"
> windowtitle="${ant.project.name} API Documentation"
> doctitle="'rmr${ant.project.name}' Library API Documentation"
> bottom="Created ${doc.time} for ${company.name}">
> <classpath refid="classpath" />
> <link href="${jdk.api.docs}" />
> <link href="${junit.api.docs}" />
> <link href="${log4j.api.docs}" />
> </javadoc>
>
>
>
> On Wed, 14 Jan 2004 20:36:26 +0100, "Carsten Langer"
> <carsten.langer@nokia.com> wrote:
>
> >Hi all,
> >
> >I want to use the Javadoc feature for implicit and explicit (@inheritDoc)
> >inheriting Javadoc method comments for overridden methods as described by
> >the Javadoc documentation, chapter "Automatic Copying of Method
Comments". I
> >want to generate the Javadoc for my project from within Eclipse
> >(Project/Generate Javadoc...), not with Ant.
> >
> >It works fine if I override a method from my own sourcepath. However, if
I
> >override a method from outside my own sourcepath, e. g. a method from the
> >JDK, I just get empty comments.
> >
> >So far I analysed the reason for this to be:
> >- javadoc needs to know where the sources are where it should look up the
> >inherited comments, therefore the configuration parameter -sourcepath xxx
is
> >needed.
> >- This -sourcepath xxx seems to be set by Eclipse automatically to the
> >project source path (Projects/Properties/Java Build Path/Source, checked
> >boxes) when javadoc is called. I found this out by letting Eclipse
generate
> >Ant XML files for Javadoc.
> >- You can't give Javadoc another -sourcepath as an extra Javadoc option,
> >as -sourcepath is only allowed once.
> >
> >Now I feel gotten stuck:
> >- If I wanted to inherit comments e. g. from JDK, I would need to put the
> >JDK source to the projects sourcepath - not a good idea, isn't it?
> >- I don't know wheter I can influence the -sourcepath set by Eclipse
> >otherwise.
> >- I can't give an extra -sourcepath configuration parameter.
> >
> >Does anybody have a idea or solution on this?
> >(I feel Ant could do the trick, but as up to now I never needed to use
Ant I
> >would rather like to keep it this way.)
> >
> >Thanks
> >Carsten
> >
>
|
|
|
Re: Inherit Javadoc from sources outside own project fails [message #135908 is a reply to message #134823] |
Tue, 20 January 2004 11:25   |
Eclipse User |
|
|
|
Originally posted by: carsten.langer.nokia.com
Hi all,
finally I found the solution myself. As javadoc command likes to have the
the path of the sources wherefrom to inherit comments given in
the -sourcepath argument, I put the external sources to the project source
path (Project/Properties/Java Build Path/Source). However, as these sources
are actually outside of my project, I set the exclusion filter to "*", so
nothing gets compiled from this source path.
Now I can create Javadoc that inherits from sources outside of my project
without using Ant.
Regards
Carsten
"Carsten Langer" <carsten.langer@nokia.com> wrote in message
news:bu5jo5$u86$1@eclipse.org...
> Hi all,
>
> I want to use the Javadoc feature for implicit and explicit (@inheritDoc)
> inheriting Javadoc method comments for overridden methods as described by
> the Javadoc documentation, chapter "Automatic Copying of Method Comments".
I
> want to generate the Javadoc for my project from within Eclipse
> (Project/Generate Javadoc...), not with Ant.
>
> It works fine if I override a method from my own sourcepath. However, if I
> override a method from outside my own sourcepath, e. g. a method from the
> JDK, I just get empty comments.
>
> So far I analysed the reason for this to be:
> - javadoc needs to know where the sources are where it should look up the
> inherited comments, therefore the configuration parameter -sourcepath xxx
is
> needed.
> - This -sourcepath xxx seems to be set by Eclipse automatically to the
> project source path (Projects/Properties/Java Build Path/Source, checked
> boxes) when javadoc is called. I found this out by letting Eclipse
generate
> Ant XML files for Javadoc.
> - You can't give Javadoc another -sourcepath as an extra Javadoc option,
> as -sourcepath is only allowed once.
>
> Now I feel gotten stuck:
> - If I wanted to inherit comments e. g. from JDK, I would need to put the
> JDK source to the projects sourcepath - not a good idea, isn't it?
> - I don't know wheter I can influence the -sourcepath set by Eclipse
> otherwise.
> - I can't give an extra -sourcepath configuration parameter.
>
> Does anybody have a idea or solution on this?
> (I feel Ant could do the trick, but as up to now I never needed to use Ant
I
> would rather like to keep it this way.)
>
> Thanks
> Carsten
>
>
|
|
| |
Javadoc ant absolute path problem (was Re: Inherit Javadoc from sources outside own project fails) [message #136717 is a reply to message #135001] |
Fri, 23 January 2004 06:41  |
Eclipse User |
|
|
|
Hi gurus,
I have the problem that, when I let eclipse generate an ant file to make
my javadoc, it generates absolute pathnames for the classpath, like
classpath=" bin:/home/thm/Apps/Eclipse-3.0M5/plugins/org.eclipse.core.re sources_3.0.0/resources.jar:[...] "
(only one entry shown).
Which is of course not the best thing when checking this in and let
other people check it out. Is there any way to put relative paths in
there? I tried removing that "/home/thm/Apps/Eclipse-3.0M5/" prefix but
that did not do the job. Yes, I have never used ant before :).
I have also tried using
<classpath refid="classpath" />
from Tom's ant file without knowing what it does. I hoped it referenced
Eclipse's classpath but ant only terminated with
"Reference classpath not found."
TIA, Thomas.
Tom wrote:
> It's easily done.
> In my ant.properties file I've added the following lines
>
> jdk.api.docs=http://localhost:8080/jdk/api
> junit.api.docs=http://www.junit.org/junit/javadoc/3.8.1
> log4j.api.docs=http://jakarta.apache.org/log4j/docs/api
>
> Then my java doc target in my build.xml looks like
>
> <javadoc packagenames="*" sourcepath="${src.java.dir}"
> destdir="${javadoc.dir}" author="true" private="true"
> version="true" use="true"
> header="<img src='/wapa/image/gswapa1.gif' />"
> footer="" excludepackagenames="**/test/**/"
> windowtitle="${ant.project.name} API Documentation"
> doctitle="'rmr${ant.project.name}' Library API Documentation"
> bottom="Created ${doc.time} for ${company.name}">
> <classpath refid="classpath" />
> <link href="${jdk.api.docs}" />
> <link href="${junit.api.docs}" />
> <link href="${log4j.api.docs}" />
> </javadoc>
>
--
Thomas Maier <Thomas.Maier@uni-kassel.de>
|
|
|
Goto Forum:
Current Time: Sun May 04 19:45:46 EDT 2025
Powered by FUDForum. Page generated in 0.03997 seconds
|