Hyperlink to (Cross file) XML node [message #494102] |
Thu, 29 October 2009 04:47  |
Eclipse User |
|
|
|
I'm creating an hybernate-lile ORM with java generated code based on a
model defined in an XML file.
What I'm trying to do is an hyperlink from the javadoc (syntax yet to be
decided) to the XML node that definded it. Looking at the way the @see
javadoc fragment manages hyperlinking in javadoc viewed through the
hover, looks like it uses a normal 'url' with a special scheme
(something like eclipse-javadoc://)
I wonder if there is something like that in the WTP, in the sense that I
need a custom url scheme to address a specific node in an external xml
file, something like
eclipse-xml://<path relative to workspace root>/<XPath to a single dom node>
for example, <a href="exlipse-xml://projA/conf/conf.xml/A/B/C" would
hyperlink the * node
<A>
<B>
<C/>*
</B>
</A>
in file /conf/conf.xml in project projA
Is this already impleneted (I have no idea where these custom url scheme
are defined)? Should I place a feature request, or is it too specific to
have it in the WTP?
thanks
Alex
|
|
|
Re: Hyperlink to (Cross file) XML node [message #496979 is a reply to message #494102] |
Wed, 11 November 2009 22:44  |
Eclipse User |
|
|
|
carraro.alessandro@gmail.com wrote:
> I'm creating an hybernate-lile ORM with java generated code based on a
> model defined in an XML file.
>
> What I'm trying to do is an hyperlink from the javadoc (syntax yet to be
> decided) to the XML node that definded it. Looking at the way the @see
> javadoc fragment manages hyperlinking in javadoc viewed through the
> hover, looks like it uses a normal 'url' with a special scheme
> (something like eclipse-javadoc://)
>
> I wonder if there is something like that in the WTP, in the sense that I
> need a custom url scheme to address a specific node in an external xml
> file, something like
> eclipse-xml://<path relative to workspace root>/<XPath to a single dom
> node>
>
>
> for example, <a href="exlipse-xml://projA/conf/conf.xml/A/B/C" would
> hyperlink the * node
> <A>
> <B>
> <C/>*
> </B>
> </A>
> in file /conf/conf.xml in project projA
>
> Is this already impleneted (I have no idea where these custom url scheme
> are defined)? Should I place a feature request, or is it too specific to
> have it in the WTP?
The closest thing to that functionality in WTP lies in the
org.eclipse.jst.jsp.ui.internal.hyperlink.TLDFileHyperlink#o pen()
method, where it tries to find a specific element in a file to show
in the XML Editor. Having an actual URL doesn't sound like
something we'd do in WTP, plus it's not really necessary to use
URLs. When you register a hyperlink detector with the platform,
there aren't many limits on what your hyperlink instance's open()
method can do if you're creative in writing it.
--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational
|
|
|
Powered by
FUDForum. Page generated in 0.03840 seconds