Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Xml SourceViewer
Xml SourceViewer [message #232798] Mon, 22 June 2009 13:48 Go to next message
Franziska Haeger is currently offline Franziska HaegerFriend
Messages: 27
Registered: July 2009
Junior Member
Hi all,

I'm trying to create a Dialog containing a TreeView and an XML - Soruce
Viewer. Requirements for the viewer are:
- XML editable
- syntax highlighting
- validation against a XSD-schema
- auto completion (intelli sense) with the same schema
- the schema will be provided in a jar and will always be the same (not
defined in the xml itself)
Re: Xml SourceViewer [message #232805 is a reply to message #232798] Mon, 22 June 2009 13:52 Go to previous messageGo to next message
Franziska Haeger is currently offline Franziska HaegerFriend
Messages: 27
Registered: July 2009
Junior Member
Franziska Haeger wrote:

> Hi all,

> I'm trying to create a Dialog containing a TreeView and an XML - Soruce
> Viewer. Requirements for the viewer are:
> - XML editable
> - syntax highlighting
> - validation against a XSD-schema
> - auto completion (intelli sense) with the same schema
> - the schema will be provided in a jar and will always be the same (not
> defined in the xml itself)

Sorry wasn't done yet. I already tried to create a SourceViewer providing
my own tag rules, content assist processor and so on. But now my schema is
gettin a lot more complicated and i would like to use already existing
stuff.

It seems that the WTP/ WST XML Editor can do all i need. The only problem
is i don't need a complete editor but only a viewer, since it has to
integrate into a SashForm dialog. Is ther any way to get / use /configure
the StructuedTextViewer to do all I need? Or can I use some ohter classes?

Thanks for your help

Franzi
Re: Xml SourceViewer [message #232813 is a reply to message #232805] Mon, 22 June 2009 15:54 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

Franziska Haeger wrote:
> Franziska Haeger wrote:
>> I'm trying to create a Dialog containing a TreeView and an XML -
>> Soruce Viewer. Requirements for the viewer are:
>> - XML editable
>> - syntax highlighting
>> - validation against a XSD-schema
>> - auto completion (intelli sense) with the same schema
>> - the schema will be provided in a jar and will always be the same
>> (not defined in the xml itself)
>
> Sorry wasn't done yet. I already tried to create a SourceViewer
> providing my own tag rules, content assist processor and so on. But now
> my schema is gettin a lot more complicated and i would like to use
> already existing stuff.
> It seems that the WTP/ WST XML Editor can do all i need. The only
> problem is i don't need a complete editor but only a viewer, since it
> has to integrate into a SashForm dialog. Is ther any way to get / use
> /configure the StructuedTextViewer to do all I need? Or can I use some
> ohter classes?

The
org.eclipse.wst.xml.ui.internal.preferences.XMLTemplatePrefe rencePage
class has to do the same thing, and makes for a fair example. The
only difference in your case would be that IStructuredModel being
shown should come from a real file and be properly managed,
otherwise your Schema may not be found. Keybindings might be an
issue for you, though, as the editor's actions normally connect them
to the operations that need to be run. And then there's the issue
of not having the schema reference within the source itself, but
that's not particular to your usage.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Xml SourceViewer [message #232817 is a reply to message #232813] Mon, 22 June 2009 20:33 Go to previous message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

If the XML has a namespace, you can have your schemas contribute to the
XML Catalog through the extension point. Then when your xml is loaded
into the model, the necessary grammar will be loaded for the namespace
as well.

This should help provide the content assistance you want.

Dave

Nitin Dahyabhai wrote:
> Franziska Haeger wrote:
>> Franziska Haeger wrote:
>>> I'm trying to create a Dialog containing a TreeView and an XML -
>>> Soruce Viewer. Requirements for the viewer are:
>>> - XML editable
>>> - syntax highlighting
>>> - validation against a XSD-schema
>>> - auto completion (intelli sense) with the same schema
>>> - the schema will be provided in a jar and will always be the same
>>> (not defined in the xml itself)
>>
>> Sorry wasn't done yet. I already tried to create a SourceViewer
>> providing my own tag rules, content assist processor and so on. But
>> now my schema is gettin a lot more complicated and i would like to use
>> already existing stuff.
>> It seems that the WTP/ WST XML Editor can do all i need. The only
>> problem is i don't need a complete editor but only a viewer, since it
>> has to integrate into a SashForm dialog. Is ther any way to get / use
>> /configure the StructuedTextViewer to do all I need? Or can I use some
>> ohter classes?
>
> The
> org.eclipse.wst.xml.ui.internal.preferences.XMLTemplatePrefe rencePage
> class has to do the same thing, and makes for a fair example. The only
> difference in your case would be that IStructuredModel being shown
> should come from a real file and be properly managed, otherwise your
> Schema may not be found. Keybindings might be an issue for you, though,
> as the editor's actions normally connect them to the operations that
> need to be run. And then there's the issue of not having the schema
> reference within the source itself, but that's not particular to your
> usage.
>
Previous Topic:Reloading context hangs with tomcat
Next Topic:displaying an image on JSP
Goto Forum:
  


Current Time: Wed Apr 24 22:16:30 GMT 2024

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

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

Back to the top