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 19: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 13:50 |
Tom Crosman Messages: 70 Registered: July 2009 |
Member |
|
|
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 16: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 16: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
>
>
|
|
| | |
Goto Forum:
Current Time: Thu Nov 07 05:02:59 GMT 2024
Powered by FUDForum. Page generated in 0.03143 seconds
|