|
|
Re: Xml SourceViewer [message #232813 is a reply to message #232805] |
Mon, 22 June 2009 15:54 |
|
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 |
Eclipse User |
|
|
|
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.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02855 seconds