Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Marker in node XML
Marker in node XML [message #458814] Sat, 25 November 2006 12:22 Go to next message
Eclipse UserFriend
Hello, I want to put a marker in a simple XML editor.
I don't know how to obtain the line number to put it like marker's attribute
or how to put marker in a certain node.
I have got a string which is a xpointer, and I dont't know what to probe
more. I'm desperate!!

Please, some suggestion? Thanks!

PS: I'm not very good with English, I'm sorry.
Re: Marker in node XML [message #458824 is a reply to message #458814] Sun, 26 November 2006 22:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: remy.suen.gmail.com

Hi,

Sara wrote:
> Hello, I want to put a marker in a simple XML editor.
> I don't know how to obtain the line number to put it like marker's attribute
> or how to put marker in a certain node.

You don't know how to get the line number of a parsing error? Are you
using SAX? You can implement ErrorHandler and hook it to your parser to
retrieve the values from the SAXParseException. Have you looked at the
XML editor example template that comes with PDE?

> I have got a string which is a xpointer, and I dont't know what to probe
> more. I'm desperate!!

What is an xpointer?

Regards,
Rem
Re: Marker in node XML [message #458836 is a reply to message #458824] Mon, 27 November 2006 05:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smiguel.dit.upm.es

Hi!
I don't want to put the marker in a parsing error, I want to put the
marker in a certain node, which I have determined. My application run a
test and return one XML node.

I have proved what you say and I'm using the XML editor example that comes
with PDE.

Thanks, Sara.


XPointer is a language which enables addressing into the internal
structures of XML documents. In particular, it provides for specific
reference to nodes of XML documents.
Re: Marker in node XML [message #459261 is a reply to message #458814] Wed, 29 November 2006 11:17 Go to previous messageGo to next message
Eclipse UserFriend
Please, help with my markers. I don't know what to try.

Thanks.
Re: Marker in node XML [message #459279 is a reply to message #459261] Wed, 29 November 2006 19:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: remy.suen.gmail.com

Sara wrote:
> Please, help with my markers. I don't know what to try.

I don't think there's a way if you don't know the location of the node.
You can't expect Eclipse to just know which node you're talking about,
its line and column number, unless you implement your own IGotoMarker
that does the parsing itself.

In your EditorPart you'd need to override getAdapter(Class).

public Object getAdapter(Class adapter) {
if (adapter.equals(IGotoMarker.class)) {
return myMarker;
} else {
return super.getAdapter(adapter);
}
}

I could be wrong, but I'm out of ideas myself, sorry.

Regards,
Rem
Re: Marker in node XML [message #459365 is a reply to message #459279] Thu, 30 November 2006 08:46 Go to previous message
Eclipse UserFriend
Thanks Rem, I go to try what you say me.


"Remy Suen" <remy.suen@gmail.com> escribi
Previous Topic:Update Manager
Next Topic:How to open an login dialog before the Window is initialized
Goto Forum:
  


Current Time: Fri Mar 21 20:28:21 EDT 2025

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

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

Back to the top