Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Problems using the org.eclipse.wst.xml.ui.StructuredTextEditorXML
Problems using the org.eclipse.wst.xml.ui.StructuredTextEditorXML [message #60136] Tue, 04 January 2005 17:09 Go to next message
Raphael A. Bauer is currently offline Raphael A. BauerFriend
Messages: 47
Registered: July 2009
Member
Hi everybody,

I am just trying to integrate the wst XML Editor into my project, but I
have some struggling problems.

As lamer solution I just added the class
org.eclipse.wst.xml.ui.StructuredTextEditorXML as contributor class to
the plugins.xml file of my plugin.

Normally this works (tried it with my other plugins), but the
org.eclipse.wst.xml.ui.StructuredTextEditorXML only displays a modal
error message box: "Problems opening Editor - Editor could not be
initialized".

Is this issue known to you? And how do I get clearer debug information
(on the console is nothing - and as well no errors).

Thanks a lot!
...and a happy new year,

Raphael


--snipp--
my tiny test plugins.xml:


<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.jface.text"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
<import plugin="org.eclipse.wst.xml.ui"/>
</requires>

<extension
point="org.eclipse.ui.editors">
<editor
name="Sample XML Editor"
extensions="grenouille"
icon="icons/sample.gif"

contributorClass="org.eclipse.ui.texteditor.BasicTextEditorActionContributor "
class="ra.scs.texteditor_test.editors.XMLEditor"
id="ra.scs.texteditor_test.editors.XMLEditor">
</editor>

<editor
name="TestName"
icon="icons/sample.gif"
extensions="g_t"

contributorClass="org.eclipse.wst.xml.ui.actions.ActionContributorXML "
class="org.eclipse.wst.xml.ui.StructuredTextEditorXML"
id="org.eclipse.wst.xml.ui.StructuredTextEditorXML2">
</editor>

--snapp--
Re: Problems using the org.eclipse.wst.xml.ui.StructuredTextEditorXML [message #60285 is a reply to message #60136] Tue, 04 January 2005 18:37 Go to previous messageGo to next message
David Williams is currently offline David WilliamsFriend
Messages: 722
Registered: July 2009
Senior Member
On Tue, 04 Jan 2005 18:09:21 +0100, Raphael A. Bauer <raphael.bauer@temis-group.com> wrote:

> And how do I get clearer debug information (on the console is nothing - and as well no errors).


I've opened an enhancement request against the base, long long ago, to not swallow those exceptions,
see (and vote on?) https://bugs.eclipse.org/bugs/show_bug.cgi?id=52081

I've found it useful to set up the debugger to stop on CoreException in such cases and usually can help provide a starting point ... to know where else to set breakpoints, etc.

(Sorry, not sure what the underlying problem might be, off the top of my head).
Re: Problems using the org.eclipse.wst.xml.ui.StructuredTextEditorXML [message #60306 is a reply to message #60136] Tue, 04 January 2005 19:01 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4492
Registered: July 2009
Senior Member

Raphael,
The first thing to check is if your test files open with the XML
Source Page Editor. The SSE editors require the SSE IDocument
implementation and throw assertion failures if that's not what
they're given for an input. This is one of the big causes for bugs
78340 and 81710.

If it really is XML and just an unrecognized filename extension, you
can try teaching Eclipse that it is XML with this _as a workaround_:

<extension
point="org.eclipse.core.runtime.contentTypes">
<file-association
content-type="org.eclipse.core.runtime.xml"
file-extensions="g_t,grenouille,xmlfoo2"/>
</extension>

---
Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Problems using the org.eclipse.wst.xml.ui.StructuredTextEditorXML [message #60964 is a reply to message #60306] Wed, 05 January 2005 09:30 Go to previous messageGo to next message
Raphael A. Bauer is currently offline Raphael A. BauerFriend
Messages: 47
Registered: July 2009
Member
Nitin Dahyabhai wrote:
> The first thing to check is if your test files open with the XML Source
> Page Editor. The SSE editors require the SSE IDocument implementation
> and throw assertion failures if that's not what they're given for an
> input. This is one of the big causes for bugs 78340 and 81710.
>
> If it really is XML and just an unrecognized filename extension, you can
> try teaching Eclipse that it is XML with this _as a workaround_:
>
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <file-association
> content-type="org.eclipse.core.runtime.xml"
> file-extensions="g_t,grenouille,xmlfoo2"/>
> </extension>

thanks Nitin, I just tried your workaround and it works perfectly.
Hmm. Although I do not realise what the problem really is.

What I do not understand is, when I use the basic XML Editor delivered
in eclipse as an example (titled Plug-In with an editor) it works fine
with just a "reference" to this editor in the plugins.xml of my other
plugin. But when I use the same mechanism with the
StructuredTextEdtiorXML it does not work (error I described above). With
your workaround it works... I do not get the point.

But many thanks for all replies - good to have a helping community...!

Raphael
Re: Problems using the org.eclipse.wst.xml.ui.StructuredTextEditorXML [message #61035 is a reply to message #60285] Wed, 05 January 2005 10:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

David Williams wrote:

> On Tue, 04 Jan 2005 18:09:21 +0100, Raphael A. Bauer
> <raphael.bauer@temis-group.com> wrote:
>
>> And how do I get clearer debug information (on the console is nothing
>> - and as well no errors).
>
>
>
> I've opened an enhancement request against the base, long long ago, to
> not swallow those exceptions,
> see (and vote on?) https://bugs.eclipse.org/bugs/show_bug.cgi?id=52081

I've tracked the problem down, updated the bug report and moved it to
the right component.

Dani

>
> I've found it useful to set up the debugger to stop on CoreException
> in such cases and usually can help provide a starting point ... to
> know where else to set breakpoints, etc.
>
> (Sorry, not sure what the underlying problem might be, off the top of
> my head).
Re: Problems using the org.eclipse.wst.xml.ui.StructuredTextEditorXML [message #61133 is a reply to message #60964] Wed, 05 January 2005 12:01 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4492
Registered: July 2009
Senior Member

Raphael A. Bauer wrote:
> thanks Nitin, I just tried your workaround and it works perfectly.
> Hmm. Although I do not realise what the problem really is.

The symptom really is that the SSE editors *require* the SSE
IDocument implementation and that that implementation is not the
default for your filename extensions. SSE makes it's implementation
the default for common XML file extensions that we know about in
advance, but for unknown extensions like g_t and grenouille the
default remains the Eclipse platform's default.

Keep an eye on bug 78340,
https://bugs.eclipse.org/bugs/show_bug.cgi?id=78340

---
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Updating JSP Index error
Next Topic:how to deploy a project with multiple depencent projects?
Goto Forum:
  


Current Time: Thu Sep 26 22:49:06 GMT 2024

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

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

Back to the top