|
|
|
|
Re: Adding 3.x ViewParts to E4XMI [message #972206 is a reply to message #932491] |
Mon, 05 November 2012 12:45   |
|
Hi Georges,
I do have the same problem. I started by using the wizard to create a simple E4-Application example. I then tried to add an old Eclipse3 view to. Im failing with the same error messages you got. Do you have any solution to that issue?
Cheers
Phil
|
|
|
Re: Adding 3.x ViewParts to E4XMI [message #972343 is a reply to message #972206] |
Mon, 05 November 2012 14:55   |
|
Allright.... I found some answer by myself. Instead of creating an E4 RCP Application using an E3 RCP APplication it works. I just defined the E3 App to use the e4xmi model. Still I am not sure about the implications doing it this way :-/
Cheers
Phil
|
|
|
Re: Adding 3.x ViewParts to E4XMI [message #1732196 is a reply to message #972343] |
Fri, 13 May 2016 11:41   |
|
Quick questions, has anyone tried this using a fragment?
I'm trying to contribute a perspective as fragment to the 'org.eclipse.e4.legacy.ide.application'. I do get the empty perspective to show up. I also do get to add parts to it. However, I'm sort of stuck adding placeholders for things like the editor area and existing views. It doesn't even work for views contributed as e4 fragment as well. The trouble seems to be the references. The fragment model does not have any visibility to shared elements. Thus, I'm unable to select any reference in the e4 model editor.
Does anyone have any tips how to add the editor area and other views to such a contributed perspective? Is placeholders the right approach or should I add parts and area directly?
|
|
|
|
Re: Adding 3.x ViewParts to E4XMI [message #1732204 is a reply to message #1732200] |
Fri, 13 May 2016 12:25   |
|
Thanks, I figured that out earlier today through various postings. However, the part that's also not document is how to get placeholders working. Thanks to the link you provided, I now made a bit more progress.
That's what I have in my fragment which sort of works:
<?xml version="1.0" encoding="ASCII"?>
<fragment:ModelFragments xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:advanced="http://www.eclipse.org/ui/2010/UIModel/application/ui/advanced" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/descriptor/basic" xmlns:basic_1="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_BxaXACerEeWxCPrV0pAZQQ">
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_EI7oACerEeWxCPrV0pAZQQ" featurename="descriptors" parentElementId="xpath:/">
<elements xsi:type="basic:PartDescriptor" xmi:id="_KMklcCerEeWxCPrV0pAZQQ" elementId="gunnars.ide.views.toolbelt" label="Toolbelt Commands" iconURI="platform:/plugin/gunnars.ide/icon16.png" tooltip="" category="Gunnar" contributionURI="bundleclass://gunnars.ide/gunnars.ide.cli.parts.ToolbeltView">
<tags>View</tags>
<tags>categoryTag:Gunnar</tags>
</elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_fqQIEBjnEeaRNZC3Vs8uvw" featurename="snippets" parentElementId="org.eclipse.e4.legacy.ide.application" positionInList="">
<elements xsi:type="advanced:Perspective" xmi:id="_guJ1EBjnEeaRNZC3Vs8uvw" elementId="gunnars.ide.perspective.appcloud" label="Gunnar's View" iconURI="platform:/plugin/gunnars.ide/icon16.png">
<children xsi:type="basic_1:PartSashContainer" xmi:id="_jJuvkBj7Eea2ENFkqfwc7g" elementId="gunnars.ide.partsashcontainer.0">
<children xsi:type="basic_1:PartSashContainer" xmi:id="_xRfUcBj7Eea2ENFkqfwc7g" elementId="top" containerData="75" horizontal="true">
<children xsi:type="basic_1:PartStack" xmi:id="_zrPaEBj7Eea2ENFkqfwc7g" elementId="gunnars.ide.partstack.0" containerData="26">
<children xsi:type="advanced:Placeholder" xmi:id="_sDtHUBkDEea2ENFkqfwc7g" elementId="org.eclipse.ui.navigator.ProjectExplorer" ref="_Ww7GMBkDEea2ENFkqfwc7g"/>
<children xsi:type="advanced:Placeholder" xmi:id="_ydjI0BkEEea2ENFkqfwc7g" elementId="org.eclipse.egit.ui.RepositoriesView" ref="_cVUtcBkEEea2ENFkqfwc7g"/>
</children>
<children xsi:type="advanced:Placeholder" xmi:id="_m8LewBkBEea2ENFkqfwc7g" elementId="org.eclipse.ui.editorss" containerData="74" ref="_S91hABkBEea2ENFkqfwc7g"/>
</children>
<children xsi:type="basic_1:PartSashContainer" xmi:id="_orGtcBj7Eea2ENFkqfwc7g" elementId="bottom" containerData="25" horizontal="true">
<children xsi:type="advanced:Placeholder" xmi:id="_Biv4QBkDEea2ENFkqfwc7g" elementId="gunnars.ide.part.toolbelt" containerData="26" ref="_yWl3IBkCEea2ENFkqfwc7g"/>
<children xsi:type="advanced:Placeholder" xmi:id="_J0-poBkCEea2ENFkqfwc7g" elementId="org.eclipse.ui.console.ConsoleView" containerData="74" ref="_DHSpoBkCEea2ENFkqfwc7g"/>
</children>
</children>
</elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_zLGvMBkAEea2ENFkqfwc7g" featurename="sharedElements" parentElementId="IDEWindow">
<elements xsi:type="advanced:Area" xmi:id="_S91hABkBEea2ENFkqfwc7g" elementId="org.eclipse.ui.editorss" label="Editor Area">
<children xsi:type="basic_1:PartStack" xmi:id="_asB7wBkBEea2ENFkqfwc7g" elementId="org.eclipse.e4.primaryDataStack">
<tags>org.eclipse.e4.primaryDataStack</tags>
<tags>EditorStack</tags>
</children>
</elements>
<elements xsi:type="basic_1:Part" xmi:id="_DHSpoBkCEea2ENFkqfwc7g" elementId="org.eclipse.ui.console.ConsoleView" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView" label="Console" iconURI="platform:/plugin/org.eclipse.ui.console/icons/full/cview16/console_view.png"/>
<elements xsi:type="basic_1:Part" xmi:id="_yWl3IBkCEea2ENFkqfwc7g" elementId="gunnars.ide.part.toolbelt" contributionURI="bundleclass://gunnars.ide/gunnars.ide.cli.parts.ToolbeltView" label="Toolbelt Commands" iconURI="platform:/plugin/gunnars.ide/icon16.png"/>
<elements xsi:type="basic_1:Part" xmi:id="_Ww7GMBkDEea2ENFkqfwc7g" elementId="org.eclipse.ui.navigator.ProjectExplorer" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView" label="Project Explorer" iconURI="platform:/plugin/org.eclipse.ui.ide.application/icons/full/eview16/resource_persp.png"/>
<elements xsi:type="basic_1:Part" xmi:id="_cVUtcBkEEea2ENFkqfwc7g" elementId="org.eclipse.egit.ui.RepositoriesView" contributionURI="bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView" label="Git Repositories" iconURI="platform:/plugin/org.eclipse.egit.ui/icons/eview16/repo_rep.gif"/>
</fragments>
</fragment:ModelFragments>
The trick is to define a fragment which adds things to the "sharedElements" of "IDEWindow". However, I'm unsure if this approach is sane, i.e. will it create duplicate shared elements?
|
|
|
|
Re: Adding 3.x ViewParts to E4XMI [message #1732208 is a reply to message #1732205] |
Fri, 13 May 2016 12:56   |
|
Dirk Fauth wrote on Fri, 13 May 2016 12:28Could you import shared elements?
I don't know. The model editor in Neon does not give me an option in the drop-down to import a shared element.
Importing a "Part" does not work. There are none and/or the ones created by the compatibility layer are not visible to the model editor. I'm also not sure if the compatibility layer uses stable xmi ids that would work as stable references.
[Updated on: Fri, 13 May 2016 13:06] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02583 seconds