Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » DOM model of StructuredTextEditorXML
DOM model of StructuredTextEditorXML [message #117322] Thu, 07 July 2005 06:16 Go to next message
Eclipse UserFriend
Hi,

I have a question about the way to obtain the XML model of the
StructuredTextEditorXML. In 1.0M4 I used the method getDOMDocument() to do
this, but it has disappeared in the 0.7M5 release, so now I use the
following method :

private IDOMNode getDocumentElement() {
IDOMNode result = null;
IDOMDocument document = null;
IStructuredModel structuredModel = processDefinitionXMLEditor.getModel();
if (structuredModel != null) {
document = (IDOMDocument) structuredModel.getAdapter(Document.class);
}
if (document != null) {
result = (IDOMNode)document.getDocumentElement();
}
return result;
}

This works fine, but the getModel() method on StructuredTextEditorXML is
deprecated. So I wondered what the alternative ways of doing this are...
As you can see, I am also pretty heavily dependent on some of the
'internal.provisional' classes such as IDOMNode. This is because I use the
event notifications to do all kinds of stuff on the other tab of my
multipage editor. So I will also use this entry to lobby for these classes
to make it in the real API ;-)

Regards,
Koen
Re: DOM model of StructuredTextEditorXML [message #117670 is a reply to message #117322] Thu, 07 July 2005 15:10 Go to previous messageGo to next message
Eclipse UserFriend
Koen Aers wrote:
> I have a question about the way to obtain the XML model of the
> StructuredTextEditorXML. In 1.0M4 I used the method getDOMDocument() to do
> this, but it has disappeared in the 0.7M5 release, so now I use the
> following method :

You should be able to ask the processDefinitionXMLEditor for its
org.w3c.Document adapter:

IDOMDocument document = (IDOMDocument)
processDefinitionXMLEditor.getAdapter(org.w3c.Document.class );

--
- Nitin
Re: DOM model of StructuredTextEditorXML [message #117861 is a reply to message #117670] Fri, 08 July 2005 03:32 Go to previous message
Eclipse UserFriend
>
> You should be able to ask the processDefinitionXMLEditor for its
> org.w3c.Document adapter:
>

This works fine, thanks!

Regards,
Koen
Previous Topic:tomcat deployments
Next Topic:Extending code completion of HTML editor
Goto Forum:
  


Current Time: Sat Apr 19 11:56:29 EDT 2025

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

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

Back to the top