Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Hyperlink to (Cross file) XML node
Hyperlink to (Cross file) XML node [message #494102] Thu, 29 October 2009 04:47 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:String literal is not properly closed by a double-quote
Next Topic:Taglib Build Error Hell!
Goto Forum:
  


Current Time: Thu Jul 03 06:10:48 EDT 2025

Powered by FUDForum. Page generated in 0.03840 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top