Hyperlink in Javadoc [message #493880] |
Wed, 28 October 2009 10:46 |
Alessandro Carraro Messages: 27 Registered: July 2009 |
Junior Member |
|
|
Hi to all,
I'm not sure if I wrote to the right ng, so forgive me if this request
is OT.
I have this use case (greatly simplified):
I have 2 resources, a generated java file (through JET) and an XML used
to feed information to the generator
An example (also greatly simplified):
config.xml:
<def>
<javaClass name="ClazzName" tableName="TAB_NAME">
<property name="prop" column="DB_COL_NAME">
</javaClass>
...
</def>
that generate a java file like this
ClazzName.java
public class ClazzName{
getProp(){
....
}
}
What I want now is to add some documentation to the class and method,
something like
public class ClazzName{
/**
* @see ClazzName.Prop
* @column="DB_COL_NAME"
*/
getProp(){
....
}
}
It is really easy to do with JET, what I want to know is if I can add an
Hyperlink to the defining XML file (I know I can, but want to know which
is the prefferred or the easiest way)
Here is what I found until now:
1)I could generate an URL link, like
/** http:///confi.xml/ClazzName/prop
but the only scheme i could verify is the http. Is there a scheme to
open a workspece resource instead? And if it does exists, can I navigate
with XPath to select the desired XML node?
2)Could create a custom annotation, like
/** @column="DB_COL_NAME"
the question is: how do I implement the hyperlink? Using APT, or is that
useless for hyperlinking?
3)Is it better to implement my custom IHyperlink and my custom
IHyperlinkDetector? Are there any classes I may subclass to reduce work?
(like for example an IHyperlink to navigate to an XML DOM node..)
Thanks for suggestion
|
|
|
Powered by
FUDForum. Page generated in 0.02138 seconds