Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » How to set/force specific content type for a StructuredTextEditor in a MultiPageEditor
How to set/force specific content type for a StructuredTextEditor in a MultiPageEditor [message #212222] Thu, 10 April 2008 07:56 Go to next message
Eclipse UserFriend
Originally posted by: omoises.nospam-nordnet.fr

Hello all,

Using WST 2.0.1 I would like to create/open a multipage editor
containing several StructuredTextEditor pages.

The documents displayed are XML based but should have their own
ContentType (with validators, content assist ...).

The (root) IFile opened by the MultiPageEditor itself is an html one,
others embedded documents could be html or xml ones (href, xi:include
.....) .

I am able to run the example provided in "Embedding the
StructuredTextEditor in a MultiPageEditor"
( http://www.eclipse.org/webtools/wst/components/sse/tutorials /multipage-editor-tutorial.html)

but in this example, the MultiPageEditorSite provides a 'fake' ???
editor id and the document behave like an XML document.

In my case, since the opened (and first) document extension is html, the
MultiPageEditor does not behave as expected, the document behaves as an
HTML one (even with the MultiPageEditorSite fix!!)

What can I do ??

Thx

Olivier Moises
Re: How to set/force specific content type for a StructuredTextEditor in a Multi [message #212253 is a reply to message #212222] Thu, 10 April 2008 22:01 Go to previous message
Eclipse UserFriend
Originally posted by: wuamy.ca.ibm.com

So if I understand your situation correctly, you're opening an html file
in the editor, but you want the editor to treat it like an xml file?

The fake site/editor id trick is mainly just to get the editor actions
working. I think for most other cases, the editor will determine the
content type based on the editor input passed into the editor. If you
want to force a specific content type for the editor, you'll have to force
a specific content type for your editor input.



Olivier Moïses wrote:

> Hello all,

> Using WST 2.0.1 I would like to create/open a multipage editor
> containing several StructuredTextEditor pages.

> The documents displayed are XML based but should have their own
> ContentType (with validators, content assist ...).

> The (root) IFile opened by the MultiPageEditor itself is an html one,
> others embedded documents could be html or xml ones (href, xi:include
> .....) .

> I am able to run the example provided in "Embedding the
> StructuredTextEditor in a MultiPageEditor"
>
( http://www.eclipse.org/webtools/wst/components/sse/tutorials /multipage-editor-tutorial.html)

> but in this example, the MultiPageEditorSite provides a 'fake' ???
> editor id and the document behave like an XML document.

> In my case, since the opened (and first) document extension is html, the
> MultiPageEditor does not behave as expected, the document behaves as an
> HTML one (even with the MultiPageEditorSite fix!!)

> What can I do ??

> Thx

> Olivier Moises
Previous Topic:Tomcat runs good but don't stop correctly
Next Topic:Slow publishing in Linux?
Goto Forum:
  


Current Time: Fri Mar 29 15:17:04 GMT 2024

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

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

Back to the top