Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsXml SourceViewer
https://www.eclipse.org/forums/index.php/mv/msg/74511/232798/#msg_232798
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)]]>Franziska Haeger2009-06-22T13:48:04-00:00Re: Xml SourceViewer
https://www.eclipse.org/forums/index.php/mv/msg/74511/232805/#msg_232805
> 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]]>Franziska Haeger2009-06-22T13:52:20-00:00Re: Xml SourceViewer
https://www.eclipse.org/forums/index.php/mv/msg/74511/232813/#msg_232813
> 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 Dahyabhai2009-06-22T15:54:49-00:00Re: Xml SourceViewer
https://www.eclipse.org/forums/index.php/mv/msg/74511/232817/#msg_232817
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.
>]]>2009-06-22T20:33:43-00:00