|
|
Re: Embedding XMLEditor in multipageditor [message #501104 is a reply to message #499497] |
Tue, 01 December 2009 04:24 |
|
Massi wrote:
> Hi all,
> I'm trying to create a multipageeditor with a page that contains a text
> xml. So I'd like to use the Xml editor that is present in WST. I read
> the tutorial
> http://www.eclipse.org/webtools/wst/components/sse/tutorials /multipage-editor-tutorial.html
> but I don't understand a thing : -Is it sufficient override the
> createSite method to have a page with all the features of the xml
> editor(highlighting, content assist, source validation), or I have to
> insert those features as extensions point in the plugin.xml?
Let's get back to basics: the wizard that the tutorial has you run
starts out by creating a multi-page editor with a plain text editor
for the source page. The next step is just switching the class for
the source page from TextEditor to the StructuredTextEditor from the
org.eclipse.wst.sse.ui plug-in. With content types provided in WTP,
a large amount of functionality works just from doing that. The
editor site comes into play in order to make sure the UI is using
the right IDs for loading actions and other contributions by the
platform's extension points.
There are other extension points defined in org.eclipse.wst.sse.ui,
but most of those will automatically be picked up by the
StructuredTextEditor instance at runtime. For example, if you're
editing an XML file, just by using the StructuredTextEditor class,
it'll know to use XML as the language to syntax color, validate, and
for which to provide content assist and outline support. Unless you
want to modify any of that behavior, you're fine ignoring these last
extension points when you're starting out.
--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Powered by
FUDForum. Page generated in 0.02857 seconds