Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Zalejko2014-09-30 09:46:18 -0400
committerThomas Schindl2014-10-01 07:59:34 -0400
commit54c7f86fb40e7c617d72e7ef8c6b72e8e7cc0241 (patch)
tree78449407d41d25ccb3c1812abbadfbbe300d9fb9 /testcases
parent9c82c29b608c1007340e812e0c9310fe04221196 (diff)
downloadorg.eclipse.efxclipse-54c7f86fb40e7c617d72e7ef8c6b72e8e7cc0241.tar.gz
org.eclipse.efxclipse-54c7f86fb40e7c617d72e7ef8c6b72e8e7cc0241.tar.xz
org.eclipse.efxclipse-54c7f86fb40e7c617d72e7ef8c6b72e8e7cc0241.zip
Bug 445077: Changes to the MCompositePart renderer.
This commit provides following changes: - instantiating a contribution class attached to the MCompositePart via contributionURI="bundleclass://..." - rendering a toolbar and menu for MCompositeParts(in the same way as it's done for MParts). - changes to the "org.eclipse.fx.testcases.e4". A new perspective was added which provides samples for introduced changes. https://bugs.eclipse.org/bugs/show_bug.cgi?id=445077 Change-Id: Ie6b9ef488450f514e092e3e552eb8ad58aaea877 Signed-off-by: Pawel Zalejko <pzalejko@gmail.com>
Diffstat (limited to 'testcases')
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/Application.e4xmi42
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product212
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/parts/MCompositePartContribution.java17
3 files changed, 168 insertions, 103 deletions
diff --git a/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi b/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
index 6f18bd745..1b509c4f1 100755
--- a/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
+++ b/testcases/org.eclipse.fx.testcases.e4/Application.e4xmi
@@ -129,6 +129,45 @@
</children>
</children>
</children>
+ <children xsi:type="advanced:Perspective" xmi:id="_g-UoYEijEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.perspective.7" label="MCompositePart with Toolbar and menu">
+ <children xsi:type="basic:PartStack" xmi:id="_rhOmcEijEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.partstack.2">
+ <children xsi:type="basic:CompositePart" xmi:id="_t_oikEijEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.compositepart.0" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.parts.MCompositePartContribution" label="Composite Part with toolbar and menu">
+ <menus xmi:id="_DFXwwEilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.menu.9">
+ <tags>ViewMenu</tags>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_D0TTUEilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.menuOption1" label="Menu option 1" command="_FEZr8OUcEeGP-5z69KadAQ"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_EEuU8EilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.menuOption2" label="Menu option 2" command="_3PQSEOqiEeGrz8mV_3Gr5A"/>
+ </menus>
+ <toolbar xmi:id="_Wxo8gEikEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.">
+ <children xsi:type="menu:HandledToolItem" xmi:id="_XOM8sEikEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledtoolitem.5" label="Command A" command="_FEZr8OUcEeGP-5z69KadAQ"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_XgF98EikEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledtoolitem.6" label="Command B" command="_3PQSEOqiEeGrz8mV_3Gr5A"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_Xw8dYEikEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledtoolitem.7" label="Command C" command="_8Tn3gD4rEeKaHfJUGGs7Mw"/>
+ </toolbar>
+ <children xsi:type="basic:Part" xmi:id="_u9l_oEijEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.part.partA" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.parts.StartCountPart" label="Part A"/>
+ <children xsi:type="basic:Part" xmi:id="_vXzPYEijEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.part.partB" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.parts.StartCountPart" label="Part B"/>
+ </children>
+ <children xsi:type="basic:CompositePart" xmi:id="_uZraQEijEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.compositepart.1" label="Composite Part without toolbar and menu" tooltip="This toolbar and the menu belongs to the part.">
+ <children xsi:type="basic:Part" xmi:id="_wFCI0EijEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.part.partA" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.parts.StartCountPart" label="Part A">
+ <menus xmi:id="_DFXwwEilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.menu.9">
+ <tags>ViewMenu</tags>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_D0TTUEilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.menuOption1" label="Menu option 1" command="_FEZr8OUcEeGP-5z69KadAQ"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_EEuU8EilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.menuOption2" label="Menu option 2" command="_3PQSEOqiEeGrz8mV_3Gr5A"/>
+ </menus>
+ </children>
+ <children xsi:type="basic:Part" xmi:id="_vt-TsEijEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.part.partB" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.parts.StartCountPart" label="Simple part which contains a toolbar and menu">
+ <menus xmi:id="_elqdAEilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.menu.10">
+ <tags>ViewMenu</tags>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_e-FkEEilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.menuOption1" label="Menu option 1" command="_3PQSEOqiEeGrz8mV_3Gr5A"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_fSTgkEilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.menuOption2" label="Menu option 2" command="_3PQSEOqiEeGrz8mV_3Gr5A"/>
+ </menus>
+ <toolbar xmi:id="_icOe4EilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.toolbar.7">
+ <children xsi:type="menu:HandledToolItem" xmi:id="_jKsucEilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledtoolitem.commandA" label="Command A" command="_FEZr8OUcEeGP-5z69KadAQ"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_jd-20EilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledtoolitem.commandB" label="Command B" command="_3PQSEOqiEeGrz8mV_3Gr5A"/>
+ <children xsi:type="menu:HandledToolItem" xmi:id="_jv2p8EilEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledtoolitem.commandC" label="Command c" command="_8Tn3gD4rEeKaHfJUGGs7Mw"/>
+ </toolbar>
+ </children>
+ </children>
+ </children>
+ </children>
</children>
<mainMenu xmi:id="_W8hHoORZEeGP-5z69KadAQ" elementId="org.eclipse.fx.testcases.e4.menu.0">
<children xsi:type="menu:Menu" xmi:id="_Xwuy0ORZEeGP-5z69KadAQ" elementId="org.eclipse.fx.testcases.e4.menu.1" label="M1">
@@ -186,6 +225,9 @@
<children xsi:type="menu:HandledMenuItem" xmi:id="_SnxwgAjwEeS-OoJT2xrBFg" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.14" label="Layout perspective" command="_kCbZQO6yEeG4lfn-YKJbJw">
<parameters xmi:id="_WMZGwAjwEeS-OoJT2xrBFg" elementId="" name="org.eclipse.fx.testcases.e4.command.2.perspective" value="org.eclipse.fx.testcases.e4.perspective.6"/>
</children>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_I3PeMEikEeSj0oj2ZLkHQQ" elementId="org.eclipse.fx.testcases.e4.handledmenuitem.compositePartWithToolbarAndMenu" label="Composite Part with toolbar and menu" command="_kCbZQO6yEeG4lfn-YKJbJw">
+ <parameters xmi:id="_OKPB0EikEeSj0oj2ZLkHQQ" elementId="" name="org.eclipse.fx.testcases.e4.command.2.perspective" value="org.eclipse.fx.testcases.e4.perspective.7"/>
+ </children>
</children>
<children xsi:type="menu:Menu" xmi:id="_xS050MayEeKo1rUjbZCXsQ" elementId="org.eclipse.fx.testcases.e4.menu.6" label="Multiple close">
<children xsi:type="menu:DirectMenuItem" xmi:id="_yhjWwMayEeKo1rUjbZCXsQ" elementId="org.eclipse.fx.testcases.e4.directmenuitem.9" label="Close all" iconURI="platform:/plugin/org.eclipse.fx.testcases.e4/css/images/window-close-over.png" contributionURI="bundleclass://org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.handlers.BatchRemoveHandler"/>
diff --git a/testcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product b/testcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product
index a69a2ef05..21569f12b 100755
--- a/testcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product
+++ b/testcases/org.eclipse.fx.testcases.e4/org.eclipse.fx.testcases.e4.product
@@ -1,103 +1,109 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="org.eclipse.fx.testcases.e4" id="org.eclipse.fx.testcases.e4.product" application="org.eclipse.fx.ui.workbench.fx.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <programArgs>-nosplash
- </programArgs>
- <vmArgs>-Dosgi.framework.extensions=org.eclipse.fx.osgi
- </vmArgs>
- </launcherArgs>
-
- <windowImages/>
-
- <launcher>
- <solaris/>
- <win useIco="false">
- <bmp/>
- </win>
- </launcher>
-
- <vm>
- </vm>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="javax.annotation"/>
- <plugin id="javax.inject"/>
- <plugin id="javax.xml"/>
- <plugin id="org.apache.commons.lang"/>
- <plugin id="org.apache.commons.logging"/>
- <plugin id="org.eclipse.core.commands"/>
- <plugin id="org.eclipse.core.contenttype"/>
- <plugin id="org.eclipse.core.databinding"/>
- <plugin id="org.eclipse.core.databinding.observable"/>
- <plugin id="org.eclipse.core.databinding.property"/>
- <plugin id="org.eclipse.core.expressions"/>
- <plugin id="org.eclipse.core.filesystem"/>
- <plugin id="org.eclipse.core.jobs"/>
- <plugin id="org.eclipse.core.resources"/>
- <plugin id="org.eclipse.core.runtime"/>
- <plugin id="org.eclipse.e4.core.commands"/>
- <plugin id="org.eclipse.e4.core.contexts"/>
- <plugin id="org.eclipse.e4.core.di"/>
- <plugin id="org.eclipse.e4.core.di.extensions"/>
- <plugin id="org.eclipse.e4.core.services"/>
- <plugin id="org.eclipse.e4.ui.di"/>
- <plugin id="org.eclipse.e4.ui.model.workbench"/>
- <plugin id="org.eclipse.e4.ui.services"/>
- <plugin id="org.eclipse.e4.ui.workbench"/>
- <plugin id="org.eclipse.emf.common"/>
- <plugin id="org.eclipse.emf.databinding"/>
- <plugin id="org.eclipse.emf.databinding.edit"/>
- <plugin id="org.eclipse.emf.ecore"/>
- <plugin id="org.eclipse.emf.ecore.change"/>
- <plugin id="org.eclipse.emf.ecore.de" fragment="true"/>
- <plugin id="org.eclipse.emf.ecore.xmi"/>
- <plugin id="org.eclipse.emf.edit"/>
- <plugin id="org.eclipse.equinox.app"/>
- <plugin id="org.eclipse.equinox.common"/>
- <plugin id="org.eclipse.equinox.concurrent"/>
- <plugin id="org.eclipse.equinox.ds"/>
- <plugin id="org.eclipse.equinox.event"/>
- <plugin id="org.eclipse.equinox.preferences"/>
- <plugin id="org.eclipse.equinox.registry"/>
- <plugin id="org.eclipse.equinox.util"/>
- <plugin id="org.eclipse.fx.core"/>
- <plugin id="org.eclipse.fx.core.databinding"/>
- <plugin id="org.eclipse.fx.core.di"/>
- <plugin id="org.eclipse.fx.core.di.context"/>
- <plugin id="org.eclipse.fx.core.fxml"/>
- <plugin id="org.eclipse.fx.emf.databinding"/>
- <plugin id="org.eclipse.fx.javafx"/>
- <plugin id="org.eclipse.fx.osgi" fragment="true"/>
- <plugin id="org.eclipse.fx.osgi.util"/>
- <plugin id="org.eclipse.fx.testcases.e4"/>
- <plugin id="org.eclipse.fx.ui.animation"/>
- <plugin id="org.eclipse.fx.ui.controls"/>
- <plugin id="org.eclipse.fx.ui.databinding"/>
- <plugin id="org.eclipse.fx.ui.di"/>
- <plugin id="org.eclipse.fx.ui.dialogs"/>
- <plugin id="org.eclipse.fx.ui.keybindings"/>
- <plugin id="org.eclipse.fx.ui.keybindings.e4"/>
- <plugin id="org.eclipse.fx.ui.keybindings.generic"/>
- <plugin id="org.eclipse.fx.ui.lifecycle"/>
- <plugin id="org.eclipse.fx.ui.modelviewer"/>
- <plugin id="org.eclipse.fx.ui.panes"/>
- <plugin id="org.eclipse.fx.ui.services"/>
- <plugin id="org.eclipse.fx.ui.theme"/>
- <plugin id="org.eclipse.fx.ui.workbench.base"/>
- <plugin id="org.eclipse.fx.ui.workbench.fx"/>
- <plugin id="org.eclipse.fx.ui.workbench.renderers.base"/>
- <plugin id="org.eclipse.fx.ui.workbench.renderers.fx"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/>
- <plugin id="org.eclipse.osgi.services"/>
- </plugins>
-
-
-</product>
+<?xml version="1.0" encoding="UTF-8"?>
+<?pde version="3.5"?>
+
+<product name="org.eclipse.fx.testcases.e4" id="org.eclipse.fx.testcases.e4.product" application="org.eclipse.fx.ui.workbench.fx.application" version="1.0.0.qualifier" useFeatures="false" includeLaunchers="true">
+
+ <configIni use="default">
+ </configIni>
+
+ <launcherArgs>
+ <programArgs>-nosplash
+ </programArgs>
+ <vmArgs>-Dosgi.framework.extensions=org.eclipse.fx.osgi
+ </vmArgs>
+ </launcherArgs>
+
+ <windowImages/>
+
+ <launcher>
+ <solaris/>
+ <win useIco="false">
+ <bmp/>
+ </win>
+ </launcher>
+
+ <vm>
+ </vm>
+
+ <plugins>
+ <plugin id="com.ibm.icu"/>
+ <plugin id="javax.annotation"/>
+ <plugin id="javax.inject"/>
+ <plugin id="javax.transaction" fragment="true"/>
+ <plugin id="javax.xml"/>
+ <plugin id="org.apache.commons.lang"/>
+ <plugin id="org.apache.commons.logging"/>
+ <plugin id="org.apache.felix.configadmin"/>
+ <plugin id="org.eclipse.core.commands"/>
+ <plugin id="org.eclipse.core.contenttype"/>
+ <plugin id="org.eclipse.core.databinding"/>
+ <plugin id="org.eclipse.core.databinding.observable"/>
+ <plugin id="org.eclipse.core.databinding.property"/>
+ <plugin id="org.eclipse.core.expressions"/>
+ <plugin id="org.eclipse.core.filesystem"/>
+ <plugin id="org.eclipse.core.jobs"/>
+ <plugin id="org.eclipse.core.resources"/>
+ <plugin id="org.eclipse.core.runtime"/>
+ <plugin id="org.eclipse.core.runtime.compatibility.registry" fragment="true"/>
+ <plugin id="org.eclipse.e4.core.commands"/>
+ <plugin id="org.eclipse.e4.core.contexts"/>
+ <plugin id="org.eclipse.e4.core.di"/>
+ <plugin id="org.eclipse.e4.core.di.extensions"/>
+ <plugin id="org.eclipse.e4.core.services"/>
+ <plugin id="org.eclipse.e4.ui.di"/>
+ <plugin id="org.eclipse.e4.ui.model.workbench"/>
+ <plugin id="org.eclipse.e4.ui.services"/>
+ <plugin id="org.eclipse.e4.ui.workbench"/>
+ <plugin id="org.eclipse.emf.common"/>
+ <plugin id="org.eclipse.emf.databinding"/>
+ <plugin id="org.eclipse.emf.databinding.edit"/>
+ <plugin id="org.eclipse.emf.ecore"/>
+ <plugin id="org.eclipse.emf.ecore.change"/>
+ <plugin id="org.eclipse.emf.ecore.de" fragment="true"/>
+ <plugin id="org.eclipse.emf.ecore.xmi"/>
+ <plugin id="org.eclipse.emf.edit"/>
+ <plugin id="org.eclipse.equinox.app"/>
+ <plugin id="org.eclipse.equinox.common"/>
+ <plugin id="org.eclipse.equinox.concurrent"/>
+ <plugin id="org.eclipse.equinox.ds"/>
+ <plugin id="org.eclipse.equinox.event"/>
+ <plugin id="org.eclipse.equinox.preferences"/>
+ <plugin id="org.eclipse.equinox.registry"/>
+ <plugin id="org.eclipse.equinox.util"/>
+ <plugin id="org.eclipse.equinox.weaving.hook" fragment="true"/>
+ <plugin id="org.eclipse.fx.core"/>
+ <plugin id="org.eclipse.fx.core.databinding"/>
+ <plugin id="org.eclipse.fx.core.di"/>
+ <plugin id="org.eclipse.fx.core.di.context"/>
+ <plugin id="org.eclipse.fx.core.fxml"/>
+ <plugin id="org.eclipse.fx.emf.databinding"/>
+ <plugin id="org.eclipse.fx.javafx"/>
+ <plugin id="org.eclipse.fx.osgi" fragment="true"/>
+ <plugin id="org.eclipse.fx.osgi.util"/>
+ <plugin id="org.eclipse.fx.testcases.e4"/>
+ <plugin id="org.eclipse.fx.ui.animation"/>
+ <plugin id="org.eclipse.fx.ui.controls"/>
+ <plugin id="org.eclipse.fx.ui.databinding"/>
+ <plugin id="org.eclipse.fx.ui.di"/>
+ <plugin id="org.eclipse.fx.ui.dialogs"/>
+ <plugin id="org.eclipse.fx.ui.keybindings"/>
+ <plugin id="org.eclipse.fx.ui.keybindings.e4"/>
+ <plugin id="org.eclipse.fx.ui.keybindings.generic"/>
+ <plugin id="org.eclipse.fx.ui.lifecycle"/>
+ <plugin id="org.eclipse.fx.ui.modelviewer"/>
+ <plugin id="org.eclipse.fx.ui.panes"/>
+ <plugin id="org.eclipse.fx.ui.services"/>
+ <plugin id="org.eclipse.fx.ui.theme"/>
+ <plugin id="org.eclipse.fx.ui.workbench.base"/>
+ <plugin id="org.eclipse.fx.ui.workbench.fx"/>
+ <plugin id="org.eclipse.fx.ui.workbench.renderers.base"/>
+ <plugin id="org.eclipse.fx.ui.workbench.renderers.fx"/>
+ <plugin id="org.eclipse.fx.ui.workbench.services"/>
+ <plugin id="org.eclipse.osgi"/>
+ <plugin id="org.eclipse.osgi.compatibility.state" fragment="true"/>
+ <plugin id="org.eclipse.osgi.services"/>
+ <plugin id="osgi.enterprise"/>
+ </plugins>
+
+
+</product>
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/parts/MCompositePartContribution.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/parts/MCompositePartContribution.java
new file mode 100644
index 000000000..25a82feb1
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/parts/MCompositePartContribution.java
@@ -0,0 +1,17 @@
+package org.eclipse.fx.testcases.e4.parts;
+
+import javax.annotation.PostConstruct;
+
+import org.eclipse.e4.ui.model.application.ui.basic.MCompositePart;
+
+/**
+ * The {@link MCompositePartContribution} is a contribution class which is attached to the
+ * {@link MCompositePart} via <code>contributionURI</code>.
+ */
+public class MCompositePartContribution {
+
+ @PostConstruct
+ public void init(final MCompositePart part) {
+ System.err.println("Created MCompositePartContribution for: " + part.getElementId());
+ }
+}

Back to the top