Content of TrimmedWindow gets MainWindow added when adding it to Application [message #1836254] |
Sat, 26 December 2020 17:05 |
|
I think before explaining my problem I should point out my use case. And I guess I most probably I'm doing something wrong or solving my problem with the wrong tools.
What I want to do is that I have an Eclipse RCP (4diac IDE on the compatibility layer, 2020-12) and I want to have a separate window. In this separate window there should be a few forms and the console view. So far I have solved the problem with an own perspective and opening a second workbench window with that perspective. While this was a quick solution it feels not good. The biggest problem is that the perspective is also available in the main workbench window, which is what we want to forbid.
After some research and lots of reading I found that my problem could be nicely solved with an E4 snippet. So I created an model fragment, created a snippet there with my parts and also was able to get the console view in. I also managed to open that window from an handlers.
So far so good.
However my problem now is that after I clone the snippet in my handler I have to add it to my Application. During the add process my correct TrimmWindow is now extended with the elements from the already running main workbench window. I'm expecting that I have an issue in my model fragment (see below). But I have no clue what it could be. Therefore I would be very happy for any tips to get me back on track.
Alois
<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/ui/basic" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmi:id="_yi6ZoEdmEeuRhIOBaMMvFw">
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_1n-tIEdmEeuRhIOBaMMvFw" featurename="snippets" parentElementId="org.eclipse.e4.legacy.ide.application">
<elements xsi:type="basic:TrimmedWindow" xmi:id="_8runQEdnEeuRhIOBaMMvFw" elementId="org.eclipse.fordiac.ide.runtime.trimmedwindow.simulateddevicesmanager" visible="false" selectedElement="_9hMaMEdoEeuRhIOBaMMvFw" label="Simulated Devices Manager">
<children xsi:type="basic:PartSashContainer" xmi:id="_9hMaMEdoEeuRhIOBaMMvFw" elementId="org.eclipse.fordiac.ide.runtime.partsashcontainer.0">
<children xsi:type="basic:Part" xmi:id="_VWyWUEdpEeuRhIOBaMMvFw" elementId="org.eclipse.fordiac.ide.runtime.part.launchsimulateddevices" contributionURI="bundleclass://org.eclipse.fordiac.ide.runtime/org.eclipse.fordiac.ide.runtime.views.RuntimeLauncherViewPart" label="Launch Simulated Devices"/>
<children xsi:type="basic:PartSashContainer" xmi:id="_FjHpQEdpEeuRhIOBaMMvFw" elementId="org.eclipse.fordiac.ide.runtime.partsashcontainer.1" accessibilityPhrase="bottom" horizontal="true">
<children xsi:type="basic:Part" xmi:id="_NKVSQEdpEeuRhIOBaMMvFw" elementId="org.eclipse.fordiac.ide.runtime.part.startedsimulateddevices" contributionURI="bundleclass://org.eclipse.fordiac.ide.runtime/org.eclipse.fordiac.ide.runtime.views.RuntimesView" label="Started Simulated Devices"/>
<children xsi:type="basic:PartStack" xmi:id="_1dPNAEd3EeuRhIOBaMMvFw" elementId="org.eclipse.fordiac.ide.runtime.consoleContainer" accessibilityPhrase="consoleContainer">
<children xsi:type="advanced:Placeholder" xmi:id="_8gn4kEdpEeuRhIOBaMMvFw" elementId="org.eclipse.ui.console.ConsoleView" ref="_DHSpoBkCEea2ENFkqfwc7g"/>
</children>
</children>
</children>
</elements>
</fragments>
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_gg_gwEdwEeuRhIOBaMMvFw" featurename="sharedElements" parentElementId="IDEWindow">
<elements xsi:type="basic: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"/>
</fragments>
</fragment:ModelFragments>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02983 seconds