Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » e3 editor in e4 RCP?
e3 editor in e4 RCP? [message #1413319] Thu, 28 August 2014 09:12 Go to next message
Ulrich Mertin is currently offline Ulrich MertinFriend
Messages: 7
Registered: August 2014
Junior Member
I am using Eclipse Luna (4.4.0) for RCP and RAP Developers. Is there yet a (simple) possiblity to use e3 editors (e.g. AbstractTextEditor or XMLMultiPageEditorPart) in a e4 RCP application?

All I have found is a rather complicated looking method in Lars Vogel's migration tutorial involving a modified LegacyIDE.e4xmi. There Lars also mentioned that Eclipse 4.4 plans to to enhance the support for mixing 3.x and 4.x API components. Unfortunately the linked bug report still has the status "NEW", so that method obviously has not been implemented yet.

Is there any other option?

Thanks
Ulrich
Re: e3 editor in e4 RCP? [message #1413863 is a reply to message #1413319] Fri, 29 August 2014 15:57 Go to previous messageGo to next message
Martin Tauber is currently offline Martin TauberFriend
Messages: 122
Registered: July 2009
Senior Member
Hi Ulrich

how did you manage to get the editors working?

Regards
Martin

Am .08.2014, 14:18 Uhr, schrieb Ulrich Mertin <forums-noreply@xxxxxxxx>:

> I am using Eclipse Luna (4.4.0) for RCP and RAP Developers. Is there yet
> a (simple) possiblity to use e3 editors (e.g. AbstractTextEditor or
> XMLMultiPageEditorPart) in a e4 RCP application?
>
> All I have found is a rather complicated looking method in Lars Vogel's
> migration tutorial involving a modified LegacyIDE.e4xmi. There Lars also
> mentioned that Eclipse 4.4 plans to to enhance the support for mixing
> 3.x and 4.x API components. Unfortunately the linked bug report still
> has the status "NEW", so that method obviously has not been implemented
> yet.
>
> Is there any other option?
>
> Thanks
> Ulrich


--
Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/
Re: e3 editor in e4 RCP? [message #1413865 is a reply to message #1413863] Fri, 29 August 2014 16:05 Go to previous messageGo to next message
Ulrich Mertin is currently offline Ulrich MertinFriend
Messages: 7
Registered: August 2014
Junior Member
Martin Tauber wrote on Fri, 29 August 2014 11:57
Hi Ulrich

how did you manage to get the editors working?

Regards
Martin


Not at all, so far. Still waiting for a hint. It should be possible, as Eclipse 4 itself uses the XMLMultiPageEditorPart, but I don't have a clue, how it is done.

Ulrich
Re: e3 editor in e4 RCP? [message #1413874 is a reply to message #1413865] Fri, 29 August 2014 16:35 Go to previous messageGo to next message
Martin Tauber is currently offline Martin TauberFriend
Messages: 122
Registered: July 2009
Senior Member
Here is what I did so far:

(1) I created a Area with the id "org.eclipse.ui.editorss" in the .e4xmi
file. (I debuged the openEditor code to find out how e4 findes the area to
open the editor in ... and it actually searches for the area with the id
mentioned above. Be aware of the double ss!


(2) I created a StackPart as the child of the area file
(3) I created a MPart in the e4xmi file :
(3.1) added an id
(3.2) added a label
(3.3) added the class uri
"bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor"
(3.4) now the compatibilityEditor class still needs to know which "old" e3
Editor it should wrap. I used the "Live Model Editor" view of e4 to see
how eclipse does it. obviously they add memento in the persisted state
with the following value:

<persistedState key="memento" value="&lt;?xml
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&#xD;&#xA;&lt;editor
id=&quot;org.example.ABCEditor&quot;/editor>"/>

with org.example.ABCEditor beeing the e3 class implementing the editor

So now my editor opens in the area, but I still have problems since it
disapears again when I resize the window. (It will show as soon as you do
something which causes the area to be rendered again, like resizing the
SashContainers ...

Hope this helps


Am .08.2014, 18:05 Uhr, schrieb Ulrich Mertin <forums-noreply@xxxxxxxx>:

> Martin Tauber wrote on Fri, 29 August 2014 11:57
>> Hi Ulrich
>> how did you manage to get the editors working?
>> Regards
>> Martin
>
>
> Not at all, so far. Still waiting for a hint. It should be possible, as
> Eclipse 4 itself uses the XMLMultiPageEditorPart, but I don't have a
> clue, how it is done.
>
> Ulrich


--
Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/
Re: e3 editor in e4 RCP? [message #1415187 is a reply to message #1413874] Tue, 02 September 2014 09:19 Go to previous messageGo to next message
Ulrich Mertin is currently offline Ulrich MertinFriend
Messages: 7
Registered: August 2014
Junior Member
Hi Martin,

thanks for sharing your progress.

I tried to follow your instructions as a starting point, but got the error message "Could not find satisfiable constructor in org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor". It seems that the Injector cannot inject the EditorReference needed by the CompatibilityEditor. For memento I have specified an e3 Editor extending AbstractTextEditor which in turn extends EditorPart. Do I need something in the plugin.xml, or do you see any other mistake?

Regards

Ulrich
Re: e3 editor in e4 RCP? [message #1415430 is a reply to message #1415187] Tue, 02 September 2014 19:22 Go to previous messageGo to next message
Martin Tauber is currently offline Martin TauberFriend
Messages: 122
Registered: July 2009
Senior Member
Actually I would be surprised that this would have th cause in the DI
since the DI is massaging the CompatibilityEditor class as I understand it
- strange. Do you have the stack trace? Also the MPart definition in the
e4xmi file might help ...



Am .09.2014, 11:19 Uhr, schrieb Ulrich Mertin <forums-noreply@xxxxxxxx>:

> Hi Martin,
>
> thanks for sharing your progress.
>
> I tried to follow your instructions as a starting point, but got the
> error message "Could not find satisfiable constructor in
> org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor". It seems
> that the Injector cannot inject the EditorReference needed by the
> CompatibilityEditor. For memento I have specified an e3 Editor extending
> AbstractTextEditor which in turn extends EditorPart. Do I need something
> in the plugin.xml, or do you see any other mistake?
>
> Regards
>
> Ulrich


--
Erstellt mit Operas E-Mail-Modul: http://www.opera.com/mail/
Re: e3 editor in e4 RCP? [message #1417309 is a reply to message #1415430] Fri, 05 September 2014 06:22 Go to previous messageGo to next message
Ulrich Mertin is currently offline Ulrich MertinFriend
Messages: 7
Registered: August 2014
Junior Member
Martin Tauber wrote on Tue, 02 September 2014 15:22
Do you have the stack trace? Also the MPart definition in the
e4xmi file might help ...


Here is the shortened stack trace:
org.eclipse.e4.core.di.InjectionException: Could not find satisfiable constructor in org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:346)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:258)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:104)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:73)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:55)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:127)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:983)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:662)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:766)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:737)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:731)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:715)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1251)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:66)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40)
[...]

And here the extract from the e4xmi file:
<children xsi:type="basic:PartStack" xmi:id="_VUNvUx4FEeSs74jShKIiAw" elementId="someapp.ui.e4.editorstack">
  <tags>NoAutoCollapse</tags>
  <children xsi:type="basic:Part" xmi:id="_xlORMDTDEeS_oeEvUIAjjw" elementId="someapp.ui.e4.part.testEditor" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor" label="Test Editor">
    <persistedState key="memento" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>&lt;editor id=&quot;someapp.ui.xmlEditor.XMLEditor&quot;>&lt;/editor>"/>
  </children>
</children>

Re: e3 editor in e4 RCP? [message #1489684 is a reply to message #1417309] Thu, 27 November 2014 15:41 Go to previous messageGo to next message
Ondrej Doubek is currently offline Ondrej DoubekFriend
Messages: 13
Registered: February 2013
Junior Member
Please do you have some progress in this matter?
Re: e3 editor in e4 RCP? [message #1490002 is a reply to message #1489684] Thu, 27 November 2014 21:43 Go to previous message
Ulrich Mertin is currently offline Ulrich MertinFriend
Messages: 7
Registered: August 2014
Junior Member
Ondrej Doubek wrote on Thu, 27 November 2014 10:41
Please do you have some progress in this matter?

Unfortunately not. Presently I'm using e3 plugins in compatibility mode.
Previous Topic:Integration of e3 RCP app into pure e4 RCP application
Next Topic:e4 css; removing extra padding around the styled font
Goto Forum:
  


Current Time: Sat Jan 16 11:53:25 GMT 2021

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

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

Back to the top