aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Besedin2012-03-26 13:55:56 (EDT)
committerOleg Besedin2012-03-26 13:55:56 (EDT)
commitd260d1bea8f977b396660fad7a4acb81075054bc (patch)
tree3349104c74385b314ca4b795f2fed3749a690ad0
parent1db853b1f3d85838a00b9f813e7a380bab388959 (diff)
downloadeclipse.platform.ui-d260d1bea8f977b396660fad7a4acb81075054bc.zip
eclipse.platform.ui-d260d1bea8f977b396660fad7a4acb81075054bc.tar.gz
eclipse.platform.ui-d260d1bea8f977b396660fad7a4acb81075054bc.tar.bz2
Bug 375269 - Menus items from fragments multiply after restart (MCommandv20120326-1755
persistence is wrong)
-rw-r--r--examples/org.eclipse.e4.demo.contacts/Application.e4xmi136
-rw-r--r--examples/org.eclipse.e4.demo.contacts/fragment.e4xmi12
-rw-r--r--examples/org.eclipse.e4.demo.contacts/plugin.properties3
-rw-r--r--examples/org.eclipse.e4.demo.contacts/plugin.xml5
-rw-r--r--examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/handlers/FragmentHandler.java23
5 files changed, 111 insertions, 68 deletions
diff --git a/examples/org.eclipse.e4.demo.contacts/Application.e4xmi b/examples/org.eclipse.e4.demo.contacts/Application.e4xmi
index bbe8830..e2d12e0 100644
--- a/examples/org.eclipse.e4.demo.contacts/Application.e4xmi
+++ b/examples/org.eclipse.e4.demo.contacts/Application.e4xmi
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="ASCII"?>
-<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xsi:schemaLocation="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic http://www.eclipse.org/ui/2010/UIModel/application#//ui/basic http://www.eclipse.org/ui/2010/UIModel/application/ui/menu http://www.eclipse.org/ui/2010/UIModel/application#//ui/menu" xmi:id="_GRxcMXk5Ed-55voCTyIpVQ" bindingContexts="_SeXUHO8EEd6FC9cDb6iV7y">
- <children xsi:type="basic:TrimmedWindow" xmi:id="_SeXUAe8EEd6FC9cDb6iV7g" elementId="org.eclipse.e4.demo.contacts.main" selectedElement="_SeXUCu8EEd6FC9cDb6iV7g" label="%windowTitle" x="20" y="20" width="700" height="480">
- <children xsi:type="basic:PartSashContainer" xmi:id="_SeXUCu8EEd6FC9cDb6iV7g" elementId="_SeXUCu8EEd6FC9cDb6iV7g" horizontal="true">
- <children xsi:type="basic:PartStack" xmi:id="_SeXUC-8EEd6FC9cDb6iV7g" elementId="_SeXUC-8EEd6FC9cDb6iV7g" containerData="30">
- <children xsi:type="basic:Part" xmi:id="_SeXUDO8EEd6FC9cDb6iV7g" elementId="ContactsView" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.views.ListView" label="%contactsList" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/folder_user.png" tooltip="%contactsTooltip">
- <menus xsi:type="menu:PopupMenu" xmi:id="_UZ9dUFdZEeGsq_upV39tDA" elementId="contacts.popup" label="">
- <children xsi:type="menu:DirectMenuItem" xmi:id="_7I3l0FdTEeGJ6q6DQoiZvg" label="Open Email..." tooltip="Create a new email message" mnemonics="E" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SendEmailHandler"/>
- </menus>
- </children>
- </children>
- <children xsi:type="basic:PartStack" xmi:id="_SeXUDe8EEd6FC9cDb6iV7g" elementId="org.eclipse.e4.demo.contacts.partstacks.second" containerData="70">
- <children xsi:type="basic:Part" xmi:id="DetailsView" elementId="DetailsView" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.views.DetailsView" label="%partDetails" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/report_user.png" tooltip="%detailsTooltip"/>
- </children>
- </children>
- <mainMenu xmi:id="menu:org.eclipse.ui.main.menu" elementId="menu:org.eclipse.ui.main.menu">
- <children xsi:type="menu:Menu" xmi:id="_SeXUD-8EEd6FC9cDb6iV7g" elementId="_SeXUD-8EEd6FC9cDb6iV7g" label="%fileMenu">
- <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUEO8EEd6FC9cDb6iV7g" elementId="_SeXUEO8EEd6FC9cDb6iV7g" label="%menuLabelSave" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" command="contacts.save"/>
- <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUEe8EEd6FC9cDb6iV7g" elementId="_SeXUEe8EEd6FC9cDb6iV7g" label="%menuLabelDelete" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/user_delete.png" command="contacts.delete"/>
- <children xsi:type="menu:DirectMenuItem" xmi:id="_SeXUEu8EEd6FC9cDb6iV7g" elementId="_SeXUEu8EEd6FC9cDb6iV7g" label="%menuLabelDirectExit" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.ExitHandler"/>
- <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUE-8EEd6FC9cDb6iV7g" elementId="_SeXUE-8EEd6FC9cDb6iV7g" label="%menuLabelExit" command="contacts.exit"/>
- </children>
- <children xsi:type="menu:Menu" xmi:id="_7xM0QEIiEeGeqfJPkAYvgA" label="%windowMenu">
- <children xsi:type="menu:HandledMenuItem" xmi:id="_CSog8EIjEeGeqfJPkAYvgA" label="%menuLabelPreferences" command="_oKvyEEIiEeGeqfJPkAYvgA"/>
- </children>
- <children xsi:type="menu:Menu" xmi:id="_F9_YYEIjEeGeqfJPkAYvgA" label="%helpMenu">
- <children xsi:type="menu:HandledMenuItem" xmi:id="_-SFcoEIiEeGeqfJPkAYvgA" label="%menuLabelAbout" command="_gMuLkEIiEeGeqfJPkAYvgA"/>
- </children>
- </mainMenu>
- <trimBars xmi:id="_SeXUAu8EEd6FC9cDb6iV7g" elementId="_SeXUAu8EEd6FC9cDb6iV7g">
- <children xsi:type="menu:ToolBar" xmi:id="toolbar:org.eclipse.ui.main.toolbar" elementId="toolbar:org.eclipse.ui.main.toolbar">
- <children xsi:type="menu:DirectToolItem" xmi:id="_SeXUBO8EEd6FC9cDb6iV7g" elementId="_SeXUBO8EEd6FC9cDb6iV7g" label="" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" tooltip="%toolbarSaveTooltip" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SaveHandler"/>
- </children>
- <children xsi:type="menu:ToolBar" xmi:id="_6RnVUE8FEeCyZoR8urPqaw" elementId="toolbar:org.eclipse.ui.main.toolbar">
- <children xsi:type="menu:HandledToolItem" xmi:id="_Vw4jUE8FEeCyZoR8urPqaw" label="" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/user_delete.png" tooltip="%menuLabelDelete" command="contacts.delete"/>
- </children>
- </trimBars>
- </children>
- <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" elementId="_SeXUF-8EEd6FC9cDb6iV7g" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.ExitHandler" command="contacts.exit"/>
- <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" elementId="_SeXUGO8EEd6FC9cDb6iV7g" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SaveHandler" command="contacts.save"/>
- <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" elementId="_SeXUGe8EEd6FC9cDb6iV7g" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.DeleteContactHandler" command="contacts.delete"/>
- <handlers xmi:id="_SeXUG=8EEd6FC9cDb6iV7g" elementId="_SeXUG=8EEd6FC9cDb6iV7g" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SwitchThemeHandler" command="contacts.switchTheme"/>
- <handlers xmi:id="_fBxl8EIjEeGeqfJPkAYvgA" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.AboutHandler" command="_gMuLkEIiEeGeqfJPkAYvgA"/>
- <handlers xmi:id="_jdnfIEIjEeGeqfJPkAYvgA" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.PreferencesHandler" command="_oKvyEEIiEeGeqfJPkAYvgA"/>
- <bindingTables xmi:id="_SeXUEO8EEd6FC9cDb6iV7x" elementId="_SeXUEO8EEd6FC9cDb6iV7x" bindingContext="_SeXUHO8EEd6FC9cDb6iV7y">
- <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" elementId="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="M1+S" command="contacts.save"/>
- <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" elementId="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" command="contacts.delete"/>
- <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" elementId="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" command="contacts.exit"/>
- </bindingTables>
- <rootContext xmi:id="_SeXUHO8EEd6FC9cDb6iV7y" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows">
- <children xmi:id="_SeXUEO8EEd6FC9cDb6iV7w" elementId="org.eclipse.ui.contexts.window" name="In Windows"/>
- <children xmi:id="_SeXUEO8EEd6FC9cDb6iV7x" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
- </rootContext>
- <commands xmi:id="contacts.exit" elementId="org.eclipse.ui.file.exit" commandName="%menuLabelExit" description=""/>
- <commands xmi:id="contacts.save" elementId="org.eclipse.ui.file.save" commandName="%menuLabelSave" description=""/>
- <commands xmi:id="contacts.delete" elementId="org.eclipse.ui.edit.delete" commandName="%menuLabelDelete" description=""/>
- <commands xmi:id="contacts.switchTheme" elementId="contacts.switchTheme" commandName="%menuLabelSwitchTheme" description="">
- <parameters xmi:id="contacts.commands.switchtheme.themeid" elementId="contacts.commands.switchtheme.themeid" name="Theme Id" typeId="" optional="false"/>
- </commands>
- <commands xmi:id="_gMuLkEIiEeGeqfJPkAYvgA" elementId="org.eclipse.ui.help.aboutAction" commandName="%menuLabelAbout" description=""/>
- <commands xmi:id="_oKvyEEIiEeGeqfJPkAYvgA" elementId="org.eclipse.ui.window.preferences" commandName="%menuLabelPreferences"/>
- <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXg" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
- <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXh" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
- <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXi" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
- <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXj" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
- <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXk" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
- <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXl" elementId="org.eclipse.e4.ui.workbench.bindings.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
-</application:Application>
+<?xml version="1.0" encoding="ASCII"?>
+<application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xsi:schemaLocation="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic http://www.eclipse.org/ui/2010/UIModel/application#//ui/basic http://www.eclipse.org/ui/2010/UIModel/application/ui/menu http://www.eclipse.org/ui/2010/UIModel/application#//ui/menu" xmi:id="_GRxcMXk5Ed-55voCTyIpVQ" elementId="org.eclipse.e4.demo.contacts.application" bindingContexts="_SeXUHO8EEd6FC9cDb6iV7y">
+ <children xsi:type="basic:TrimmedWindow" xmi:id="_SeXUAe8EEd6FC9cDb6iV7g" elementId="org.eclipse.e4.demo.contacts.main" selectedElement="_SeXUCu8EEd6FC9cDb6iV7g" label="%windowTitle" x="20" y="20" width="700" height="480">
+ <children xsi:type="basic:PartSashContainer" xmi:id="_SeXUCu8EEd6FC9cDb6iV7g" elementId="_SeXUCu8EEd6FC9cDb6iV7g" horizontal="true">
+ <children xsi:type="basic:PartStack" xmi:id="_SeXUC-8EEd6FC9cDb6iV7g" elementId="_SeXUC-8EEd6FC9cDb6iV7g" containerData="30">
+ <children xsi:type="basic:Part" xmi:id="_SeXUDO8EEd6FC9cDb6iV7g" elementId="ContactsView" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.views.ListView" label="%contactsList" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/folder_user.png" tooltip="%contactsTooltip">
+ <menus xsi:type="menu:PopupMenu" xmi:id="_UZ9dUFdZEeGsq_upV39tDA" elementId="contacts.popup" label="">
+ <children xsi:type="menu:DirectMenuItem" xmi:id="_7I3l0FdTEeGJ6q6DQoiZvg" label="Open Email..." tooltip="Create a new email message" mnemonics="E" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SendEmailHandler"/>
+ </menus>
+ </children>
+ </children>
+ <children xsi:type="basic:PartStack" xmi:id="_SeXUDe8EEd6FC9cDb6iV7g" elementId="org.eclipse.e4.demo.contacts.partstacks.second" containerData="70">
+ <children xsi:type="basic:Part" xmi:id="DetailsView" elementId="DetailsView" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.views.DetailsView" label="%partDetails" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/report_user.png" tooltip="%detailsTooltip"/>
+ </children>
+ </children>
+ <mainMenu xmi:id="menu:org.eclipse.ui.main.menu" elementId="menu:org.eclipse.ui.main.menu">
+ <children xsi:type="menu:Menu" xmi:id="_SeXUD-8EEd6FC9cDb6iV7g" elementId="_SeXUD-8EEd6FC9cDb6iV7g" label="%fileMenu">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUEO8EEd6FC9cDb6iV7g" elementId="_SeXUEO8EEd6FC9cDb6iV7g" label="%menuLabelSave" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" command="contacts.save"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUEe8EEd6FC9cDb6iV7g" elementId="_SeXUEe8EEd6FC9cDb6iV7g" label="%menuLabelDelete" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/user_delete.png" command="contacts.delete"/>
+ <children xsi:type="menu:DirectMenuItem" xmi:id="_SeXUEu8EEd6FC9cDb6iV7g" elementId="_SeXUEu8EEd6FC9cDb6iV7g" label="%menuLabelDirectExit" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.ExitHandler"/>
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUE-8EEd6FC9cDb6iV7g" elementId="_SeXUE-8EEd6FC9cDb6iV7g" label="%menuLabelExit" command="contacts.exit"/>
+ </children>
+ <children xsi:type="menu:Menu" xmi:id="_7xM0QEIiEeGeqfJPkAYvgA" label="%windowMenu">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_CSog8EIjEeGeqfJPkAYvgA" label="%menuLabelPreferences" command="_oKvyEEIiEeGeqfJPkAYvgA"/>
+ </children>
+ <children xsi:type="menu:Menu" xmi:id="_F9_YYEIjEeGeqfJPkAYvgA" elementId="org.eclipse.e4.demo.contacts.mainmenu.help" label="%helpMenu">
+ <children xsi:type="menu:HandledMenuItem" xmi:id="_-SFcoEIiEeGeqfJPkAYvgA" label="%menuLabelAbout" command="_gMuLkEIiEeGeqfJPkAYvgA"/>
+ </children>
+ </mainMenu>
+ <trimBars xmi:id="_SeXUAu8EEd6FC9cDb6iV7g" elementId="_SeXUAu8EEd6FC9cDb6iV7g">
+ <children xsi:type="menu:ToolBar" xmi:id="toolbar:org.eclipse.ui.main.toolbar" elementId="toolbar:org.eclipse.ui.main.toolbar">
+ <children xsi:type="menu:DirectToolItem" xmi:id="_SeXUBO8EEd6FC9cDb6iV7g" elementId="_SeXUBO8EEd6FC9cDb6iV7g" label="" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" tooltip="%toolbarSaveTooltip" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SaveHandler"/>
+ </children>
+ <children xsi:type="menu:ToolBar" xmi:id="_6RnVUE8FEeCyZoR8urPqaw" elementId="toolbar:org.eclipse.ui.main.toolbar">
+ <children xsi:type="menu:HandledToolItem" xmi:id="_Vw4jUE8FEeCyZoR8urPqaw" label="" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/user_delete.png" tooltip="%menuLabelDelete" command="contacts.delete"/>
+ </children>
+ </trimBars>
+ </children>
+ <handlers xmi:id="_SeXUF-8EEd6FC9cDb6iV7g" elementId="_SeXUF-8EEd6FC9cDb6iV7g" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.ExitHandler" command="contacts.exit"/>
+ <handlers xmi:id="_SeXUGO8EEd6FC9cDb6iV7g" elementId="_SeXUGO8EEd6FC9cDb6iV7g" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SaveHandler" command="contacts.save"/>
+ <handlers xmi:id="_SeXUGe8EEd6FC9cDb6iV7g" elementId="_SeXUGe8EEd6FC9cDb6iV7g" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.DeleteContactHandler" command="contacts.delete"/>
+ <handlers xmi:id="_SeXUG=8EEd6FC9cDb6iV7g" elementId="_SeXUG=8EEd6FC9cDb6iV7g" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SwitchThemeHandler" command="contacts.switchTheme"/>
+ <handlers xmi:id="_fBxl8EIjEeGeqfJPkAYvgA" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.AboutHandler" command="_gMuLkEIiEeGeqfJPkAYvgA"/>
+ <handlers xmi:id="_jdnfIEIjEeGeqfJPkAYvgA" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.PreferencesHandler" command="_oKvyEEIiEeGeqfJPkAYvgA"/>
+ <bindingTables xmi:id="_SeXUEO8EEd6FC9cDb6iV7x" elementId="_SeXUEO8EEd6FC9cDb6iV7x" bindingContext="_SeXUHO8EEd6FC9cDb6iV7y">
+ <bindings xmi:id="_SeXUHu8EEd6FC9cDb6iV7g" elementId="_SeXUHu8EEd6FC9cDb6iV7g" keySequence="M1+S" command="contacts.save"/>
+ <bindings xmi:id="_SeXUH-8EEd6FC9cDb6iV7g" elementId="_SeXUH-8EEd6FC9cDb6iV7g" keySequence="Delete" command="contacts.delete"/>
+ <bindings xmi:id="_SeXUIO8EEd6FC9cDb6iV7g" elementId="_SeXUIO8EEd6FC9cDb6iV7g" keySequence="CTRL+5 X" command="contacts.exit"/>
+ </bindingTables>
+ <rootContext xmi:id="_SeXUHO8EEd6FC9cDb6iV7y" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows">
+ <children xmi:id="_SeXUEO8EEd6FC9cDb6iV7w" elementId="org.eclipse.ui.contexts.window" name="In Windows"/>
+ <children xmi:id="_SeXUEO8EEd6FC9cDb6iV7x" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs"/>
+ </rootContext>
+ <commands xmi:id="contacts.exit" elementId="org.eclipse.ui.file.exit" commandName="%menuLabelExit" description=""/>
+ <commands xmi:id="contacts.save" elementId="org.eclipse.ui.file.save" commandName="%menuLabelSave" description=""/>
+ <commands xmi:id="contacts.delete" elementId="org.eclipse.ui.edit.delete" commandName="%menuLabelDelete" description=""/>
+ <commands xmi:id="contacts.switchTheme" elementId="contacts.switchTheme" commandName="%menuLabelSwitchTheme" description="">
+ <parameters xmi:id="contacts.commands.switchtheme.themeid" elementId="contacts.commands.switchtheme.themeid" name="Theme Id" typeId="" optional="false"/>
+ </commands>
+ <commands xmi:id="_gMuLkEIiEeGeqfJPkAYvgA" elementId="org.eclipse.ui.help.aboutAction" commandName="%menuLabelAbout" description=""/>
+ <commands xmi:id="_oKvyEEIiEeGeqfJPkAYvgA" elementId="org.eclipse.ui.window.preferences" commandName="%menuLabelPreferences"/>
+ <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXg" elementId="org.eclipse.e4.core.commands.service" contributionURI="bundleclass://org.eclipse.e4.core.commands/org.eclipse.e4.core.commands.CommandServiceAddon"/>
+ <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXh" elementId="org.eclipse.e4.ui.contexts.service" contributionURI="bundleclass://org.eclipse.e4.ui.services/org.eclipse.e4.ui.services.ContextServiceAddon"/>
+ <addons xmi:id="_XGB3wPZlEd-XstlTZ6nTXi" elementId="org.eclipse.e4.ui.bindings.service" contributionURI="bundleclass://org.eclipse.e4.ui.bindings/org.eclipse.e4.ui.bindings.BindingServiceAddon"/>
+ <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXj" elementId="org.eclipse.e4.ui.workbench.commands.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.CommandProcessingAddon"/>
+ <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXk" elementId="org.eclipse.e4.ui.workbench.contexts.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench/org.eclipse.e4.ui.internal.workbench.addons.ContextProcessingAddon"/>
+ <addons xmi:id="_LK0NgPZmEd-XstlTZ6nTXl" elementId="org.eclipse.e4.ui.workbench.bindings.model" contributionURI="bundleclass://org.eclipse.e4.ui.workbench.swt/org.eclipse.e4.ui.workbench.swt.util.BindingProcessingAddon"/>
+</application:Application>
diff --git a/examples/org.eclipse.e4.demo.contacts/fragment.e4xmi b/examples/org.eclipse.e4.demo.contacts/fragment.e4xmi
new file mode 100644
index 0000000..5f47593
--- /dev/null
+++ b/examples/org.eclipse.e4.demo.contacts/fragment.e4xmi
@@ -0,0 +1,12 @@
+<?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:commands="http://www.eclipse.org/ui/2010/UIModel/application/commands" xmlns:fragment="http://www.eclipse.org/ui/2010/UIModel/fragment" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xmi:id="_-pEroHdcEeGgCfj4HrOz2g">
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_U7C34HdoEeGgCfj4HrOz2g" featurename="commands" parentElementId="org.eclipse.e4.demo.contacts.application">
+ <elements xsi:type="commands:Command" xmi:id="_igL34HdoEeGgCfj4HrOz2g" elementId="org.eclipse.e4.demo.contacts.fragment.command" commandName="%commandNameFeedback"/>
+ </fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_uBHkcHdoEeGgCfj4HrOz2g" featurename="handlers" parentElementId="org.eclipse.e4.demo.contacts.main">
+ <elements xsi:type="commands:Handler" xmi:id="_QhXscHdpEeGgCfj4HrOz2g" elementId="org.eclipse.e4.demo.contacts.fragment.handler" contributionURI="bundleclass://org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.FragmentHandler" command="_igL34HdoEeGgCfj4HrOz2g"/>
+ </fragments>
+ <fragments xsi:type="fragment:StringModelFragment" xmi:id="_dP834HdpEeGgCfj4HrOz2g" featurename="children" parentElementId="org.eclipse.e4.demo.contacts.mainmenu.help" positionInList="first">
+ <elements xsi:type="menu:HandledMenuItem" xmi:id="_okIh4HdpEeGgCfj4HrOz2g" elementId="org.eclipse.e4.demo.contacts.fragment.menuitem" label="%menuLabelFeedback" command="_igL34HdoEeGgCfj4HrOz2g"/>
+ </fragments>
+</fragment:ModelFragments>
diff --git a/examples/org.eclipse.e4.demo.contacts/plugin.properties b/examples/org.eclipse.e4.demo.contacts/plugin.properties
index bb8602f..1de88c6 100644
--- a/examples/org.eclipse.e4.demo.contacts/plugin.properties
+++ b/examples/org.eclipse.e4.demo.contacts/plugin.properties
@@ -24,3 +24,6 @@ windowTitle = e4 Contacts Demo
contactsTooltip = List of Contacts
detailsTooltip = Contact Details
toolbarSaveTooltip = Save
+menuLabelFeedback = Feedback
+commandNameFeedback = Provide Feedback
+
diff --git a/examples/org.eclipse.e4.demo.contacts/plugin.xml b/examples/org.eclipse.e4.demo.contacts/plugin.xml
index 6c932f7..8e1877f 100644
--- a/examples/org.eclipse.e4.demo.contacts/plugin.xml
+++ b/examples/org.eclipse.e4.demo.contacts/plugin.xml
@@ -73,4 +73,9 @@
</element>
</processor>
</extension>
+ <extension id="fragment" point="org.eclipse.e4.workbench.model">
+ <fragment
+ uri="fragment.e4xmi">
+ </fragment>
+ </extension>
</plugin>
diff --git a/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/handlers/FragmentHandler.java b/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/handlers/FragmentHandler.java
new file mode 100644
index 0000000..4b1b004
--- /dev/null
+++ b/examples/org.eclipse.e4.demo.contacts/src/org/eclipse/e4/demo/contacts/handlers/FragmentHandler.java
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.e4.demo.contacts.handlers;
+
+import org.eclipse.e4.core.di.annotations.Execute;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+
+public class FragmentHandler {
+
+ @Execute
+ public void run(Shell shell){
+ MessageDialog.openInformation(shell, "Hello", "See us at #eclipse-e4 !");
+ }
+} \ No newline at end of file