Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvs2svn2010-07-03 09:44:47 -0400
committercvs2svn2010-07-03 09:44:47 -0400
commit846cb07b73ed2325410581b85e416ecedc25fa95 (patch)
tree206bca0aa68f606fcc949d2c002989042bd4c5fa
parentee8fa5b84b0e6fe4a33573559ade8bc698566d7e (diff)
downloadorg.eclipse.e4.tools-846cb07b73ed2325410581b85e416ecedc25fa95.tar.gz
org.eclipse.e4.tools-846cb07b73ed2325410581b85e416ecedc25fa95.tar.xz
org.eclipse.e4.tools-846cb07b73ed2325410581b85e416ecedc25fa95.zip
This commit was manufactured by cvs2svn to create branch 'interm_rc2'.
Sprout from master 2010-07-03 13:44:44 UTC Thomas Schindl <tschindl> 'Bug 304584 - [Tooling] Implement Workbench-Model-Tooling' Delete: bundles/org.eclipse.e4.tools.compat/.classpath bundles/org.eclipse.e4.tools.compat/.project bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml bundles/org.eclipse.e4.tools.compat/build.properties bundles/org.eclipse.e4.tools.compat/plugin.xml bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java bundles/org.eclipse.e4.tools.context/.classpath bundles/org.eclipse.e4.tools.context/.project bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF bundles/org.eclipse.e4.tools.context/build.properties bundles/org.eclipse.e4.tools.context/plugin.xml bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java bundles/org.eclipse.e4.tools.emf.editor/.classpath bundles/org.eclipse.e4.tools.emf.editor/.project bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml bundles/org.eclipse.e4.tools.emf.editor/build.properties bundles/org.eclipse.e4.tools.emf.editor/css/default.css bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.png bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNG bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNG bundles/org.eclipse.e4.tools.emf.editor/plugin.xml bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java bundles/org.eclipse.e4.tools.emf.editor3x/.classpath bundles/org.eclipse.e4.tools.emf.editor3x/.project bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml bundles/org.eclipse.e4.tools.emf.editor3x/about.html bundles/org.eclipse.e4.tools.emf.editor3x/build.properties bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.png bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/plugin.png bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/BaseApplicationModelWizard.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewApplicationModelWizard.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewContributionModelWizard.java bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewModelFilePage.java bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath bundles/org.eclipse.e4.tools.emf.liveeditor/.project bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java bundles/org.eclipse.e4.tools.emf.ui/.classpath bundles/org.eclipse.e4.tools.emf.ui/.project bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.core.prefs bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/contributioncollector.xml bundles/org.eclipse.e4.tools.emf.ui/about.html bundles/org.eclipse.e4.tools.emf.ui/build.properties bundles/org.eclipse.e4.tools.emf.ui/css/default.css bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Addons.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Application.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/BindingTable.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Command.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectMenuItem.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectToolItem.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledMenuItem.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledToolItem.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Handler.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/KeyBinding.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Menu.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuContribution.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuItem.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuSeparator.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ModelFragments.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Part.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartDescriptor.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer_vertical.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartStack.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Perspective.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PerspectiveStack.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Placeholder.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/StringModelFragment.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBar.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarContribution.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarSeparator.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolControl.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/TrimContribution.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Window.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WindowTrim.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/EPackage.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_down.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_up.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/class_obj.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/field_public_obj.gif bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/headermenu.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_add.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_delete.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/zoom.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/fieldrefact_wiz.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/import_wiz.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newclass_wiz.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newexp_wiz.png bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/typerefact_wiz.png bundles/org.eclipse.e4.tools.emf.ui/plugin.properties bundles/org.eclipse.e4.tools.emf.ui/plugin.xml bundles/org.eclipse.e4.tools.emf.ui/schema/org.eclipse.e4.tools.emf.ui.editors.exsd bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/EStackLayout.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorDescriptor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorFeature.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IModelResource.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ISelectionProviderService.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ImageTooltip.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ObservableColumnLabelProvider.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ShadowComposite.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ClassContributionCollector.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/VirtualEntry.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/AddAddonCommand.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/MoveAddonCommand.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/RemoveAddonCommand.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/AddonsEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ApplicationEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/BindingTableEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectMenuItemEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectToolItemEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledMenuItemEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledToolItemEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandlerEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/InputPartEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/KeyBindingEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuContributionEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuItemEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuSeparatorEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartDescriptorEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartSashContainerEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartStackEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PerspectiveEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PerspectiveStackEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PlaceholderEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolBarContributionEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolBarEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolBarSeparatorEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolControlEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolItemEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/TrimBarEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/TrimContributionEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/TrimmedWindowEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WindowEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIconDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FeatureSelectionDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FindImportElementDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/HandledMenuItemCommandSelectionDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/HandledToolItemCommandSelectionDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/HandlerCommandSelectionDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/KeyBindingCommandSelectionDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/MenuIconDialogEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/MenuItemIconDialogEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/PartDescriptorIconDialogEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/PartIconDialogEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/PerspectiveIconDialogEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SharedElementsDialog.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ToolItemIconDialogEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/WindowIconDialogEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VApplicationAddons.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VBindingTableEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VCommandEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VHandlerEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuContributionsEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelFragmentsEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelImportsEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VPartDescriptor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VToolBarContributionsEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VTrimContributionsEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowControlEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowSharedElementsEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowTrimEditor.java bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/wbm/ApplicationModelEditor.java bundles/org.eclipse.e4.tools.jdt.templates/.classpath bundles/org.eclipse.e4.tools.jdt.templates/.project bundles/org.eclipse.e4.tools.jdt.templates/.settings/org.eclipse.jdt.core.prefs bundles/org.eclipse.e4.tools.jdt.templates/META-INF/MANIFEST.MF bundles/org.eclipse.e4.tools.jdt.templates/build.properties bundles/org.eclipse.e4.tools.jdt.templates/icons/full/elcl16/e4assist_co.gif bundles/org.eclipse.e4.tools.jdt.templates/plugin.xml bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4ContextType.java bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4TemplateCompletionProposalComputer.java bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml features/org.eclipse.e4.core.tools.feature/.project features/org.eclipse.e4.core.tools.feature/build.properties features/org.eclipse.e4.core.tools.feature/feature.properties features/org.eclipse.e4.core.tools.feature/feature.xml features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/eclipse_update_120.jpg features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/epl-v10.html features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/feature.properties features/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/license.html features/org.eclipse.e4.core.tools.feature/sourceTemplatePlugin/build.properties
-rw-r--r--bundles/org.eclipse.e4.tools.compat/.classpath7
-rw-r--r--bundles/org.eclipse.e4.tools.compat/.project33
-rw-r--r--bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF19
-rw-r--r--bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml8
-rw-r--r--bundles/org.eclipse.e4.tools.compat/build.properties6
-rw-r--r--bundles/org.eclipse.e4.tools.compat/plugin.xml13
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java131
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java20
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java103
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java186
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java39
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java26
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java143
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java104
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java60
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java64
-rw-r--r--bundles/org.eclipse.e4.tools.context/.classpath7
-rw-r--r--bundles/org.eclipse.e4.tools.context/.project28
-rw-r--r--bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF12
-rw-r--r--bundles/org.eclipse.e4.tools.context/build.properties5
-rw-r--r--bundles/org.eclipse.e4.tools.context/plugin.xml46
-rw-r--r--bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java34
-rw-r--r--bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java37
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/.classpath7
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/.project33
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi40
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF23
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product78
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/build.properties10
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/css/default.css8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css21
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.pngbin465 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.pngbin620 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.pngbin688 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNGbin275 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNGbin434 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/plugin.xml37
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java67
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java60
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java62
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java25
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java19
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java32
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/.classpath7
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/.project33
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml7
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/about.html45
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/build.properties7
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.pngbin465 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/plugin.pngbin591 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml42
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java22
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java19
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java149
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java62
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java60
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java118
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java38
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java87
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/BaseApplicationModelWizard.java187
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewApplicationModelWizard.java27
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewContributionModelWizard.java27
-rw-r--r--bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewModelFilePage.java199
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath7
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/.project28
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF18
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties5
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml13
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java63
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java49
-rw-r--r--bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java72
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/.classpath7
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/.project33
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs335
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs61
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF41
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/contributioncollector.xml8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/about.html45
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/build.properties11
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/css/default.css27
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Addons.pngbin859 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Application.pngbin465 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/BindingTable.pngbin728 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Command.gifbin495 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectMenuItem.gifbin587 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectToolItem.gifbin227 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledMenuItem.gifbin587 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledToolItem.gifbin561 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Handler.gifbin379 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/KeyBinding.gifbin321 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Menu.gifbin607 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuContribution.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuItem.gifbin348 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuSeparator.gifbin352 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ModelFragments.pngbin591 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Part.gifbin342 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartDescriptor.gifbin361 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer.gifbin378 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer_vertical.gifbin347 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartStack.gifbin607 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Perspective.gifbin953 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PerspectiveStack.gifbin570 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Placeholder.gifbin145 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/StringModelFragment.pngbin746 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBar.gifbin607 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarContribution.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarSeparator.gifbin608 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolControl.gifbin377 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/TrimContribution.gifbin129 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Window.gifbin358 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WindowTrim.gifbin358 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/EPackage.gifbin207 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_down.pngbin379 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_up.pngbin372 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/class_obj.gifbin586 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/field_public_obj.gifbin124 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/headermenu.pngbin711 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_add.pngbin663 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_delete.pngbin660 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/zoom.pngbin692 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/fieldrefact_wiz.pngbin8469 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/import_wiz.pngbin6650 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newclass_wiz.pngbin7824 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newexp_wiz.pngbin6210 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/typerefact_wiz.pngbin8536 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/plugin.properties8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/plugin.xml12
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/schema/org.eclipse.e4.tools.emf.ui.editors.exsd141
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/EStackLayout.java46
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java45
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorDescriptor.java8
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorFeature.java20
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IModelResource.java31
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ISelectionProviderService.java5
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ImageTooltip.java192
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java15
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java116
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java123
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java359
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties351
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ObservableColumnLabelProvider.java103
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java354
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ShadowComposite.java659
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java451
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ClassContributionCollector.java36
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java96
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java610
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/VirtualEntry.java88
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/AddAddonCommand.java30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/MoveAddonCommand.java20
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/RemoveAddonCommand.java34
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/AddonsEditor.java179
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ApplicationEditor.java205
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/BindingTableEditor.java336
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java435
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java302
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectMenuItemEditor.java96
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectToolItemEditor.java95
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledMenuItemEditor.java283
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledToolItemEditor.java282
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandlerEditor.java215
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/InputPartEditor.java59
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/KeyBindingEditor.java356
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuContributionEditor.java370
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuEditor.java424
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuItemEditor.java289
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuSeparatorEditor.java146
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java421
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartDescriptorEditor.java531
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartEditor.java464
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartSashContainerEditor.java365
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartStackEditor.java317
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PerspectiveEditor.java384
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PerspectiveStackEditor.java285
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PlaceholderEditor.java232
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java380
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolBarContributionEditor.java370
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolBarEditor.java339
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolBarSeparatorEditor.java143
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolControlEditor.java243
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ToolItemEditor.java277
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/TrimBarEditor.java328
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/TrimContributionEditor.java337
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/TrimmedWindowEditor.java54
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WindowEditor.java428
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java196
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIconDialog.java299
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ContributionClassDialog.java198
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FeatureSelectionDialog.java441
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/FindImportElementDialog.java94
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/HandledMenuItemCommandSelectionDialog.java49
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/HandledToolItemCommandSelectionDialog.java49
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/HandlerCommandSelectionDialog.java49
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/KeyBindingCommandSelectionDialog.java49
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/MenuIconDialogEditor.java30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/MenuItemIconDialogEditor.java30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/PartDescriptorIconDialogEditor.java30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/PartIconDialogEditor.java30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/PerspectiveIconDialogEditor.java30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/SharedElementsDialog.java234
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/ToolItemIconDialogEditor.java30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/WindowIconDialogEditor.java30
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VApplicationAddons.java219
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VBindingTableEditor.java492
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VCommandEditor.java238
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VHandlerEditor.java243
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuContributionsEditor.java252
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VMenuEditor.java169
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelFragmentsEditor.java233
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VModelImportsEditor.java277
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VPartDescriptor.java233
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VToolBarContributionsEditor.java256
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VTrimContributionsEditor.java260
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowControlEditor.java249
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowEditor.java282
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowSharedElementsEditor.java251
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowTrimEditor.java155
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/wbm/ApplicationModelEditor.java29
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/.classpath7
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/.project28
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/META-INF/MANIFEST.MF12
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/build.properties7
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/icons/full/elcl16/e4assist_co.gifbin225 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/plugin.xml47
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4ContextType.java47
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/src/org/eclipse/e4/internal/tools/jdt/templates/E4TemplateCompletionProposalComputer.java204
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.properties0
-rw-r--r--bundles/org.eclipse.e4.tools.jdt.templates/templates/default-e4templates.xml59
-rw-r--r--features/org.eclipse.e4.core.tools.feature/.project17
-rw-r--r--features/org.eclipse.e4.core.tools.feature/build.properties2
-rwxr-xr-xfeatures/org.eclipse.e4.core.tools.feature/feature.properties148
-rw-r--r--features/org.eclipse.e4.core.tools.feature/feature.xml55
-rwxr-xr-xfeatures/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes
-rwxr-xr-xfeatures/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/epl-v10.html328
-rwxr-xr-xfeatures/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/feature.properties144
-rwxr-xr-xfeatures/org.eclipse.e4.core.tools.feature/sourceTemplateFeature/license.html79
-rwxr-xr-xfeatures/org.eclipse.e4.core.tools.feature/sourceTemplatePlugin/build.properties12
250 files changed, 0 insertions, 24555 deletions
diff --git a/bundles/org.eclipse.e4.tools.compat/.classpath b/bundles/org.eclipse.e4.tools.compat/.classpath
deleted file mode 100644
index 64c5e31b..00000000
--- a/bundles/org.eclipse.e4.tools.compat/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.e4.tools.compat/.project b/bundles/org.eclipse.e4.tools.compat/.project
deleted file mode 100644
index e5e9a152..00000000
--- a/bundles/org.eclipse.e4.tools.compat/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.e4.tools.compat</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 4fe42718..00000000
--- a/bundles/org.eclipse.e4.tools.compat/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Mon May 31 09:52:05 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
deleted file mode 100644
index 4225c506..00000000
--- a/bundles/org.eclipse.e4.tools.compat/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,19 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Compat
-Bundle-SymbolicName: org.eclipse.e4.tools.compat;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime;bundle-version="3.6.0",
- org.eclipse.e4.core.contexts;bundle-version="0.9.0",
- org.eclipse.e4.core.services;bundle-version="0.9.1",
- org.eclipse.e4.ui.services;bundle-version="0.9.1",
- org.eclipse.e4.core.di;bundle-version="0.9.0",
- org.eclipse.e4.tools.services;bundle-version="1.0.0",
- org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0",
- org.eclipse.e4.ui.di;bundle-version="0.9.0",
- javax.inject;bundle-version="1.0.0"
-Service-Component: OSGI-INF/selectionproviderfunction.xml
-Export-Package: org.eclipse.e4.tools.compat.parts
-Bundle-ActivationPolicy: lazy
diff --git a/bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml b/bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml
deleted file mode 100644
index 15b8531d..00000000
--- a/bundles/org.eclipse.e4.tools.compat/OSGI-INF/selectionproviderfunction.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.compat.selectionprovider">
- <implementation class="org.eclipse.e4.tools.compat.internal.SelectionProviderContextFunction"/>
- <service>
- <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
- </service>
- <property name="service.context.key" type="String" value="org.eclipse.e4.tools.services.ISelectionProviderService"/>
-</scr:component>
diff --git a/bundles/org.eclipse.e4.tools.compat/build.properties b/bundles/org.eclipse.e4.tools.compat/build.properties
deleted file mode 100644
index 4975ca25..00000000
--- a/bundles/org.eclipse.e4.tools.compat/build.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- OSGI-INF/selectionproviderfunction.xml
-source.. = src/
diff --git a/bundles/org.eclipse.e4.tools.compat/plugin.xml b/bundles/org.eclipse.e4.tools.compat/plugin.xml
deleted file mode 100644
index a8396863..00000000
--- a/bundles/org.eclipse.e4.tools.compat/plugin.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.services">
- <serviceFactory
- factoryClass="org.eclipse.e4.tools.compat.internal.ContextServiceFactory">
- <service
- serviceClass="org.eclipse.e4.core.contexts.IEclipseContext"></service>
- </serviceFactory>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
deleted file mode 100644
index 4db5af43..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ContextServiceFactory.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.compat.internal;
-
-import org.eclipse.e4.core.contexts.ContextInjectionFactory;
-import org.eclipse.e4.core.contexts.EclipseContextFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.core.services.contributions.IContributionFactory;
-import org.eclipse.e4.core.services.log.ILoggerProvider;
-import org.eclipse.e4.core.services.log.Logger;
-import org.eclipse.e4.ui.css.swt.theme.IThemeEngine;
-import org.eclipse.e4.ui.css.swt.theme.IThemeManager;
-import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.e4.ui.services.IStylingEngine;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.ISelectionListener;
-import org.eclipse.ui.ISelectionService;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.internal.services.IWorkbenchLocationService;
-import org.eclipse.ui.services.AbstractServiceFactory;
-import org.eclipse.ui.services.IServiceLocator;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.w3c.dom.css.CSSStyleDeclaration;
-
-@SuppressWarnings("restriction")
-public class ContextServiceFactory extends AbstractServiceFactory {
-
- @Override
- public Object create(@SuppressWarnings("rawtypes") Class serviceInterface, IServiceLocator parentLocator,
- IServiceLocator locator) {
- if( ! IEclipseContext.class.equals(serviceInterface) ) {
- return null;
- }
-
-
- IWorkbenchLocationService wls = (IWorkbenchLocationService) locator.getService(IWorkbenchLocationService.class);
- final IWorkbenchWindow window = wls.getWorkbenchWindow();
- final IWorkbenchPartSite site = wls.getPartSite();
-
-// System.err.println("The locator: " + locator);
-// System.err.println(" Window: " + window);
-// System.err.println(" Site: " + site);
-
- Object o = parentLocator.getService(serviceInterface);
-
- // This happens when we run in plain 3.x
- // We need to create a parent service context
- if( window == null && site == null ) {
- Bundle bundle = FrameworkUtil.getBundle(ContextServiceFactory.class);
- BundleContext bundleContext = bundle.getBundleContext();
- IEclipseContext serviceContext = EclipseContextFactory.getServiceContext(bundleContext);
-
- final IEclipseContext appContext = serviceContext.createChild("WorkbenchContext"); //$NON-NLS-1$
- appContext.set(Logger.class, new WorkbenchLogger());
- IContributionFactory contributionFactory = ContextInjectionFactory.make(ReflectionContributionFactory.class, appContext);
- appContext.set(IContributionFactory.class.getName(),contributionFactory);
-
- IThemeManager manager = serviceContext.get(IThemeManager.class);
- final IThemeEngine engine = manager.getEngineForDisplay(Display.getCurrent());
- appContext.set(IThemeEngine.class, engine);
-
- appContext.set(IStylingEngine.class, new IStylingEngine() {
-
- public void setClassname(Object widget, String classname) {
- ((Widget) widget).setData(
- "org.eclipse.e4.ui.css.CssClassName", classname); //$NON-NLS-1$
- engine.applyStyles((Widget) widget, true);
- }
-
- public void setId(Object widget, String id) {
- ((Widget) widget).setData("org.eclipse.e4.ui.css.id", id); //$NON-NLS-1$
- engine.applyStyles((Widget) widget, true);
- }
-
- public void style(Object widget) {
- engine.applyStyles((Widget) widget, true);
- }
-
- public CSSStyleDeclaration getStyle(Object widget) {
- return engine.getStyle((Widget) widget);
- }
- });
-
- if( appContext.get(ILoggerProvider.class) == null ) {
- appContext.set(ILoggerProvider.class, ContextInjectionFactory.make(DefaultLoggerProvider.class, appContext));
- }
-
- return appContext;
- } else if( o != null && site == null ) {
- final IEclipseContext windowContext = ((IEclipseContext)o).createChild("WindowContext("+window+")");
- windowContext.set(ISelectionService.class, window.getSelectionService());
-
- windowContext.declareModifiable(IServiceConstants.ACTIVE_SELECTION);
- window.getSelectionService().addSelectionListener(new ISelectionListener() {
-
- public void selectionChanged(IWorkbenchPart part, ISelection selection) {
- if( ! selection.isEmpty() ) {
- if( selection instanceof IStructuredSelection ) {
- IStructuredSelection s = (IStructuredSelection) selection;
- if( s.size() == 1 ) {
- windowContext.set(IServiceConstants.ACTIVE_SELECTION, s.getFirstElement());
- } else {
- windowContext.set(IServiceConstants.ACTIVE_SELECTION, s.toList());
- }
- } else {
- windowContext.set(IServiceConstants.ACTIVE_SELECTION, selection);
- }
- }
- }
- });
- return windowContext;
- }
-
- return o;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java
deleted file mode 100644
index b3f922b0..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/DefaultLoggerProvider.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.e4.tools.compat.internal;
-
-import javax.inject.Inject;
-
-import org.eclipse.e4.core.contexts.ContextInjectionFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.core.services.log.ILoggerProvider;
-import org.eclipse.e4.core.services.log.Logger;
-import org.osgi.framework.FrameworkUtil;
-
-public class DefaultLoggerProvider implements ILoggerProvider {
- @Inject
- private IEclipseContext context;
-
- public Logger getClassLogger(Class<?> clazz) {
- IEclipseContext childContext = context.createChild();
- childContext.set("logger.bundlename", FrameworkUtil.getBundle(clazz).getSymbolicName()); //$NON-NLS-1$
- return (Logger) ContextInjectionFactory.make(WorkbenchLogger.class, childContext);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
deleted file mode 100644
index 58484ff4..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/PartHelper.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.compat.internal;
-
-import java.lang.reflect.Method;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.e4.core.contexts.ContextInjectionFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.ui.services.IStylingEngine;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.WorkbenchPart;
-
-public class PartHelper {
- public static IEclipseContext createPartContext(WorkbenchPart part) throws PartInitException {
- IWorkbenchPartSite site = part.getSite();
- IEclipseContext parentContext = (IEclipseContext) site.getService(IEclipseContext.class);
-
- // Check if running in 4.x
- if( parentContext.get("org.eclipse.e4.workbench.ui.IPresentationEngine") != null ) {
- // Hack to get the MPart-Context
- try {
- Class<?> clazz = Util.getBundle("org.eclipse.e4.ui.model.workbench").loadClass("org.eclipse.e4.ui.model.application.ui.basic.MPart");
- Object instance = site.getService(clazz);
- Method m = clazz.getMethod("getContext", new Class[0]);
- return (IEclipseContext) m.invoke(instance);
- } catch (Exception e) {
- throw new PartInitException("Could not create context",e);
- }
- } else {
- return parentContext.createChild("EditPart('"+part.getPartName()+"')"); //$NON-NLS-1$
- }
-
- }
-
- public static <C> C creatComponent(Composite parent, IEclipseContext context, Class<C> clazz, WorkbenchPart part) {
- ISelectionProvider s = new SelectionProviderImpl();
- context.set(ISelectionProvider.class, s);
- part.getSite().setSelectionProvider(s);
-
- IStylingEngine styleEngine = context.get(IStylingEngine.class);
- Composite comp = new Composite(parent, SWT.NONE);
- comp.setBackgroundMode(SWT.INHERIT_DEFAULT);
-
- //FIXME This should be read from the CSS
- FillLayout layout = new FillLayout();
- layout.marginWidth = 10;
- layout.marginHeight = 10;
- comp.setLayout(layout);
-
- context.set(Composite.class.getName(), comp);
- C component = ContextInjectionFactory.make(clazz, context);
-
- styleEngine.setClassname(comp, part.getClass().getSimpleName());
-
- return component;
- }
-
- static class SelectionProviderImpl implements ISelectionProvider {
- private ISelection currentSelection = StructuredSelection.EMPTY;
-
- private ListenerList listeners = new ListenerList();
-
- public void setSelection(ISelection selection) {
- currentSelection = selection;
- SelectionChangedEvent evt = new SelectionChangedEvent(this, selection);
-
- for( Object l : listeners.getListeners() ) {
- ((ISelectionChangedListener)l).selectionChanged(evt);
- }
- }
-
- public void removeSelectionChangedListener(
- ISelectionChangedListener listener) {
- listeners.remove(listener);
- }
-
- public ISelection getSelection() {
- return currentSelection;
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- listeners.add(listener);
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java
deleted file mode 100644
index 5b61577c..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/ReflectionContributionFactory.java
+++ /dev/null
@@ -1,186 +0,0 @@
-package org.eclipse.e4.tools.compat.internal;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.inject.Inject;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.InvalidRegistryObjectException;
-import org.eclipse.e4.core.contexts.ContextInjectionFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.core.di.InjectionException;
-import org.eclipse.e4.core.services.contributions.IContributionFactory;
-import org.eclipse.e4.core.services.contributions.IContributionFactorySpi;
-import org.eclipse.e4.core.services.log.Logger;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * Create the contribution factory.
- */
-@SuppressWarnings("restriction")
-public class ReflectionContributionFactory implements IContributionFactory {
-
- private IExtensionRegistry registry;
- private Map<String, Object> languages;
-
- @Inject
- private PackageAdmin packageAdmin;
-
- @Inject
- private Logger logger;
-
- /**
- * Create a reflection factory.
- *
- * @param registry
- * to read languages.
- */
- @Inject
- public ReflectionContributionFactory(IExtensionRegistry registry) {
- this.registry = registry;
- processLanguages();
- }
-
- public Object create(String uriString, IEclipseContext context, IEclipseContext staticContext) {
- return doCreate(uriString, context, staticContext);
- }
-
- public Object create(String uriString, IEclipseContext context) {
- return doCreate(uriString, context, null);
- }
-
- private Object doCreate(String uriString, IEclipseContext context, IEclipseContext staticContext) {
- if (uriString == null) {
- return null;
- }
- URI uri = URI.createURI(uriString);
- Bundle bundle = getBundle(uri);
- Object contribution;
- if (bundle != null) {
- contribution = createFromBundle(bundle, context, staticContext, uri);
- } else {
- contribution = null;
- logger.error("Unable to retrive the bundle from the URI: " //$NON-NLS-1$
- + uriString);
- }
- return contribution;
- }
-
- protected Object createFromBundle(Bundle bundle, IEclipseContext context,
- IEclipseContext staticContext, URI uri) {
- Object contribution;
- if (uri.segmentCount() > 3) {
- String prefix = uri.segment(2);
- IContributionFactorySpi factory = (IContributionFactorySpi) languages.get(prefix);
- StringBuffer resource = new StringBuffer(uri.segment(3));
- for (int i = 4; i < uri.segmentCount(); i++) {
- resource.append('/');
- resource.append(uri.segment(i));
- }
- contribution = factory.create(bundle, resource.toString(), context);
- } else {
- String clazz = uri.segment(2);
- try {
- Class<?> targetClass = bundle.loadClass(clazz);
- if (staticContext == null)
- contribution = ContextInjectionFactory.make(targetClass, context);
- else
- contribution = ContextInjectionFactory
- .make(targetClass, context, staticContext);
-
- if (contribution == null) {
- String message = "Unable to load class '" + clazz + "' from bundle '" //$NON-NLS-1$ //$NON-NLS-2$
- + bundle.getBundleId() + "'"; //$NON-NLS-1$
- logger.error(message);
- }
- } catch (ClassNotFoundException e) {
- contribution = null;
- String message = "Unable to load class '" + clazz + "' from bundle '" //$NON-NLS-1$ //$NON-NLS-2$
- + bundle.getBundleId() + "'"; //$NON-NLS-1$
- logger.error(e,message);
- } catch (InjectionException e) {
- contribution = null;
- String message = "Unable to create class '" + clazz + "' from bundle '" //$NON-NLS-1$ //$NON-NLS-2$
- + bundle.getBundleId() + "'"; //$NON-NLS-1$
- logger.error(e, message);
- }
- }
- return contribution;
- }
-
- protected void processLanguages() {
- languages = new HashMap<String, Object>();
- String extId = "org.eclipse.e4.languages"; //$NON-NLS-1$
- IConfigurationElement[] languageElements = registry.getConfigurationElementsFor(extId);
- for (int i = 0; i < languageElements.length; i++) {
- IConfigurationElement languageElement = languageElements[i];
- try {
- languages.put(languageElement.getAttribute("name"), //$NON-NLS-1$
- languageElement.createExecutableExtension("contributionFactory")); //$NON-NLS-1$
- } catch (InvalidRegistryObjectException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
-
- protected Bundle getBundle(URI platformURI) {
- return getBundleForName(platformURI.segments[1]);
- }
-
- public Bundle getBundle(String uriString) {
- return getBundle(new URI(uriString));
- }
-
- public Bundle getBundleForName(String bundlename) {
- if( packageAdmin == null ) {
- Bundle bundle = FrameworkUtil.getBundle(getClass());
- BundleContext context = bundle.getBundleContext();
- ServiceReference reference = context.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin) context.getService(reference);
- }
-
- Bundle[] bundles = packageAdmin.getBundles(bundlename, null);
- if (bundles == null)
- return null;
- // Return the first bundle that is not installed or uninstalled
- for (int i = 0; i < bundles.length; i++) {
- if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
- return bundles[i];
- }
- }
- return null;
- }
-
- static class URI {
- String[] segments;
- String uri;
-
- URI(String uriString) {
- segments = uriString.substring(uriString.indexOf('/')+1).split("/");
- }
-
- public String segment(int i) {
- return segments[i];
- }
-
- public int segmentCount() {
- return segments.length;
- }
-
- static URI createURI(String uriString) {
- return new URI(uriString);
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java
deleted file mode 100644
index 901627cd..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/SelectionProviderContextFunction.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.compat.internal;
-
-import java.util.List;
-
-import org.eclipse.e4.core.contexts.ContextFunction;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.tools.services.ISelectionProviderService;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-
-
-public class SelectionProviderContextFunction extends ContextFunction {
-
- @Override
- public Object compute(final IEclipseContext context) {
- return new ISelectionProviderService() {
- public void setSelection(Object selection) {
- ISelectionProvider pv = context.get(ISelectionProvider.class);
-
- if( selection instanceof List<?> ) {
- pv.setSelection(new StructuredSelection((List<?>)selection));
- } else {
- pv.setSelection(new StructuredSelection(selection));
- }
-
- }
- };
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java
deleted file mode 100644
index 567fcc2b..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/Util.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.eclipse.e4.tools.compat.internal;
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-public class Util {
- public static Bundle getBundle(String bundleName) {
- Bundle bundle = FrameworkUtil.getBundle(Util.class);
- BundleContext ctx = bundle.getBundleContext();
- ServiceReference ref = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());
- PackageAdmin bundleAdmin = (PackageAdmin) ctx.getService(ref);
- Bundle[] bundles = bundleAdmin.getBundles(bundleName, null);
- if (bundles == null)
- return null;
- // Return the first bundle that is not installed or uninstalled
- for (int i = 0; i < bundles.length; i++) {
- if ((bundles[i].getState() & (Bundle.INSTALLED | Bundle.UNINSTALLED)) == 0) {
- return bundles[i];
- }
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java
deleted file mode 100644
index d5e64d8a..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/internal/WorkbenchLogger.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package org.eclipse.e4.tools.compat.internal;
-
-import java.util.ArrayList;
-import javax.inject.Inject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.e4.core.services.log.Logger;
-import org.eclipse.osgi.framework.log.FrameworkLog;
-import org.eclipse.osgi.framework.log.FrameworkLogEntry;
-import org.eclipse.osgi.service.debug.DebugOptions;
-import org.eclipse.osgi.service.debug.DebugTrace;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The workbench implementation of the logger service.
- */
-public final class WorkbenchLogger extends Logger {
- protected DebugTrace trace;
- protected FrameworkLog log;
- private Bundle bundle = FrameworkUtil.getBundle(WorkbenchLogger.class);
-
- /**
- * Creates a new workbench logger
- */
- public WorkbenchLogger() {
- super();
- }
-
- public void debug(Throwable t) {
- debug(t, null);
- }
-
- public void debug(Throwable t, String message) {
- trace(t, message);
- }
-
- public void error(Throwable t, String message) {
- log(new Status(IStatus.ERROR, bundle.getSymbolicName(),
- message, t));
- }
-
- /**
- * Copied from PlatformLogWriter in core runtime.
- */
- private static FrameworkLogEntry getLog(IStatus status) {
- Throwable t = status.getException();
- ArrayList childlist = new ArrayList();
-
- int stackCode = t instanceof CoreException ? 1 : 0;
- // ensure a substatus inside a CoreException is properly logged
- if (stackCode == 1) {
- IStatus coreStatus = ((CoreException) t).getStatus();
- if (coreStatus != null) {
- childlist.add(getLog(coreStatus));
- }
- }
-
- if (status.isMultiStatus()) {
- IStatus[] children = status.getChildren();
- for (int i = 0; i < children.length; i++) {
- childlist.add(getLog(children[i]));
- }
- }
-
- FrameworkLogEntry[] children = (FrameworkLogEntry[]) (childlist.size() == 0 ? null
- : childlist.toArray(new FrameworkLogEntry[childlist.size()]));
-
- return new FrameworkLogEntry(status.getPlugin(), status.getSeverity(), status.getCode(),
- status.getMessage(), stackCode, t, children);
- }
-
- public void info(Throwable t, String message) {
- log(new Status(IStatus.INFO, bundle.getSymbolicName(), message,
- t));
- }
-
- public boolean isDebugEnabled() {
- return false;
- }
-
- public boolean isErrorEnabled() {
- return true;
- }
-
- public boolean isInfoEnabled() {
- return true;
- }
-
- public boolean isTraceEnabled() {
- return false;
- }
-
- public boolean isWarnEnabled() {
- return true;
- }
-
- private void log(IStatus status) {
- if (log != null) {
- log.log(getLog(status));
- } else {
- System.out.println(status.getMessage());
- if (status.getException() != null)
- status.getException().printStackTrace();
- }
- }
-
- /**
- * Sets the debug options service for this logger.
- *
- * @param options
- * The debug options to be used by this logger
- */
- @Inject
- public void setDebugOptions(DebugOptions options) {
- if (options != null) {
- this.trace = options.newDebugTrace(bundle.getSymbolicName(), WorkbenchLogger.class);
- }
- }
-
- /**
- * @param log
- */
- @Inject
- public void setFrameworkLog(FrameworkLog log) {
- this.log = log;
- }
-
- public void trace(Throwable t, String message) {
- if (trace != null) {
- trace.trace(null, message, t);
- } else {
- System.out.println(message);
- t.printStackTrace();
- }
- }
-
- public void warn(Throwable t, String message) {
- log(new Status(IStatus.WARNING, bundle.getSymbolicName(),
- message, t));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
deleted file mode 100644
index dc711b9e..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.compat.parts;
-
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.e4.core.contexts.ContextInjectionFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.tools.compat.internal.PartHelper;
-import org.eclipse.e4.tools.services.IDirtyProviderService;
-import org.eclipse.e4.ui.di.Focus;
-import org.eclipse.e4.ui.di.Persist;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.EditorPart;
-
-public abstract class DIEditorPart<C> extends EditorPart implements IDirtyProviderService {
- private IEclipseContext context;
- private C component;
- private Class<C> clazz;
- private boolean dirtyState;
-
- public DIEditorPart(Class<C> clazz) {
- this.clazz = clazz;
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- IEclipseContext saveContext = context.createChild();
- ContextInjectionFactory.invoke(component, Persist.class, saveContext);
- saveContext.dispose();
- }
-
- @Override
- public void doSaveAs() {
-
- }
-
- @Override
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- @Override
- public void init(IEditorSite site, IEditorInput input)
- throws PartInitException {
- setSite(site);
- setInput(input);
-
- context = PartHelper.createPartContext(this);
- context.declareModifiable(IEditorInput.class);
- context.declareModifiable(IEditorPart.class);
- context.declareModifiable(IDirtyProviderService.class);
-
- context.set(IEditorPart.class,this);
- context.set(IDirtyProviderService.class,this);
- context.set(IEditorInput.class, input);
- }
-
-
- @Override
- public void createPartControl(Composite parent) {
- component = PartHelper.creatComponent(parent, context, clazz, this);
- }
-
- public C getComponent() {
- return component;
- }
-
- public void setDirtyState(boolean dirtyState) {
- if( dirtyState != this.dirtyState ) {
- this.dirtyState = dirtyState;
- firePropertyChange(PROP_DIRTY);
- }
- }
-
- @Override
- public boolean isDirty() {
- return dirtyState;
- }
-
- @Override
- public void setFocus() {
- ContextInjectionFactory.invoke(component, Focus.class, context);
- }
-
- @Override
- public void dispose() {
- context.dispose();
- context = null;
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java
deleted file mode 100644
index b9cb94eb..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DISaveableViewPart.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.compat.parts;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.e4.core.contexts.ContextInjectionFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.tools.services.IDirtyProviderService;
-import org.eclipse.e4.ui.di.Persist;
-import org.eclipse.ui.ISaveablePart2;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-
-public abstract class DISaveableViewPart<C> extends DIViewPart<C> implements ISaveablePart2, IDirtyProviderService {
- private boolean dirtyState;
-
- public DISaveableViewPart(Class<C> clazz) {
- super(clazz);
- }
-
- public void doSave(IProgressMonitor monitor) {
- IEclipseContext saveContext = getContext().createChild();
- ContextInjectionFactory.invoke(getComponent(), Persist.class, saveContext);
- saveContext.dispose();
- }
-
- public void doSaveAs() {
-
- }
-
- public boolean isSaveAsAllowed() {
- return false;
- }
-
- public void setDirtyState(boolean dirtyState) {
- if( dirtyState != this.dirtyState ) {
- this.dirtyState = dirtyState;
- firePropertyChange(PROP_DIRTY);
- }
- }
-
- public boolean isDirty() {
- return dirtyState;
- }
-
- public void init(IViewSite site) throws PartInitException {
- super.init(site);
-
- getContext().declareModifiable(IDirtyProviderService.class);
- getContext().set(IDirtyProviderService.class, this);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
deleted file mode 100644
index 46a29f69..00000000
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.compat.parts;
-
-import org.eclipse.e4.core.contexts.ContextInjectionFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.core.di.InjectionException;
-import org.eclipse.e4.tools.compat.internal.PartHelper;
-import org.eclipse.e4.ui.di.Focus;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
-
-public abstract class DIViewPart<C> extends ViewPart {
- private IEclipseContext context;
- private Class<C> clazz;
- private C component;
-
- public DIViewPart(Class<C> clazz) {
- this.clazz = clazz;
- }
-
- @Override
- public void init(IViewSite site) throws PartInitException {
- super.init(site);
- context = PartHelper.createPartContext(this);
-
- context.declareModifiable(IViewPart.class);
-
- context.set(IViewPart.class, this);
- }
-
- @Override
- public void createPartControl(Composite parent) {
- component = PartHelper.creatComponent(parent, context, clazz, this);
- }
-
- protected IEclipseContext getContext() {
- return context;
- }
-
- public C getComponent() {
- return component;
- }
-
- @Override
- public void setFocus() {
- try {
- ContextInjectionFactory.invoke(component, Focus.class, context);
- } catch (InjectionException e) {
- // TODO: handle exception
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.context/.classpath b/bundles/org.eclipse.e4.tools.context/.classpath
deleted file mode 100644
index 64c5e31b..00000000
--- a/bundles/org.eclipse.e4.tools.context/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.e4.tools.context/.project b/bundles/org.eclipse.e4.tools.context/.project
deleted file mode 100644
index 079583bd..00000000
--- a/bundles/org.eclipse.e4.tools.context/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.e4.tools.context</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c987469a..00000000
--- a/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Wed Mar 24 16:01:57 EDT 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 041d6be3..00000000
--- a/bundles/org.eclipse.e4.tools.context/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Wed Mar 24 16:13:19 EDT 2010
-eclipse.preferences.version=1
-pluginProject.extensions=true
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF
deleted file mode 100644
index 39ffa787..00000000
--- a/bundles/org.eclipse.e4.tools.context/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,12 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Tools
-Bundle-SymbolicName: org.eclipse.e4.tools.context;singleton:=true
-Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.e4.core.services;bundle-version="0.9.1",
- org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1",
- org.eclipse.e4.core.contexts;bundle-version="0.9.0",
- org.eclipse.e4.core.di;bundle-version="0.9.0"
-Export-Package: org.eclipse.e4.tools.handlers
diff --git a/bundles/org.eclipse.e4.tools.context/build.properties b/bundles/org.eclipse.e4.tools.context/build.properties
deleted file mode 100644
index e9863e28..00000000
--- a/bundles/org.eclipse.e4.tools.context/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/bundles/org.eclipse.e4.tools.context/plugin.xml b/bundles/org.eclipse.e4.tools.context/plugin.xml
deleted file mode 100644
index f68f7c7a..00000000
--- a/bundles/org.eclipse.e4.tools.context/plugin.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.commands">
- <command
- categoryId="org.eclipse.e4.tools.category1"
- defaultHandler="org.eclipse.e4.tools.handlers.GenerateSnapshotHandler"
- id="org.eclipse.e4.tools.globalSnapshot"
- name="Global Snapshot">
- </command>
- <command
- categoryId="org.eclipse.e4.tools.category1"
- defaultHandler="org.eclipse.e4.tools.handlers.DiffSnapshotHandler"
- id="org.eclipse.e4.tools.globalDiff"
- name="Global Diff">
- </command>
- <category
- description="e4 tools"
- id="org.eclipse.e4.tools.category1"
- name="e4 tools">
- </category>
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="menu:org.eclipse.ui.main.menu?after=additions">
- <menu
- id="org.eclipse.e4.tools.menu"
- label="e4 tools">
- <command
- commandId="org.eclipse.e4.tools.globalSnapshot"
- mnemonic="S"
- style="push">
- </command>
- <command
- commandId="org.eclipse.e4.tools.globalDiff"
- mnemonic="D"
- style="push">
- </command>
- </menu>
- </menuContribution>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java b/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java
deleted file mode 100644
index ca1c9117..00000000
--- a/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/DiffSnapshotHandler.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.tools.handlers;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.e4.core.internal.contexts.EclipseContext;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Generates a diff of the main application context, showing changes since the
- * last snapshot.
- */
-public class DiffSnapshotHandler extends AbstractHandler {
-
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- MApplication app = (MApplication) HandlerUtil.getVariableChecked(event,
- MApplication.class.getName());
- ((EclipseContext) app.getContext()).debugDiff();
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java b/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java
deleted file mode 100644
index 3b212b6d..00000000
--- a/bundles/org.eclipse.e4.tools.context/src/org/eclipse/e4/tools/handlers/GenerateSnapshotHandler.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.tools.handlers;
-
-import org.eclipse.core.commands.*;
-import org.eclipse.e4.core.internal.contexts.EclipseContext;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.ui.handlers.HandlerUtil;
-
-/**
- * Generates a snapshot of the current main application context state
- */
-public class GenerateSnapshotHandler extends AbstractHandler {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
- * ExecutionEvent)
- */
- public Object execute(ExecutionEvent event) throws ExecutionException {
- MApplication app = (MApplication) HandlerUtil.getVariableChecked(event,
- MApplication.class.getName());
- ((EclipseContext) app.getContext()).debugSnap();
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/.classpath b/bundles/org.eclipse.e4.tools.emf.editor/.classpath
deleted file mode 100644
index 64c5e31b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/.project b/bundles/org.eclipse.e4.tools.emf.editor/.project
deleted file mode 100644
index 624efe93..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.e4.tools.emf.editor</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index da2d41a3..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Sun Mar 07 16:24:33 CET 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi b/bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi
deleted file mode 100644
index 9bb548c7..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/Application.e4xmi
+++ /dev/null
@@ -1,40 +0,0 @@
-<?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" xmi:id="_oq6MwEY6Ed-3Rue18XuTew" elementId="org.eclipse.e4.ide.application">
- <children xsi:type="basic:TrimmedWindow" xmi:id="_Z-NzMUjJEd-FKq59UN1_HA" elementId="_Z-NzMUjJEd-FKq59UN1_HA" width="800" height="600">
- <children xsi:type="basic:PartStack" xmi:id="_gkgxwEjJEd-FKq59UN1_HA" elementId="org.eclipse.e4.tools.emf.editor.mainwindow.editorstack">
- <tags>newtablook</tags>
- </children>
- <mainMenu xmi:id="_LqyFoEjQEd-XR9_8rlW1bQ" elementId="e4.modeleditor.menu.file">
- <children xsi:type="menu:Menu" xmi:id="_cURncEjQEd-XR9_8rlW1bQ" elementId="e4.modeleditor.menu.file" label="File">
- <children xsi:type="menu:Menu" xmi:id="_mRNKoEjQEd-XR9_8rlW1bQ" elementId="_mRNKoEjQEd-XR9_8rlW1bQ" label="New">
- <children xsi:type="menu:HandledMenuItem" xmi:id="_pdLXYEjQEd-XR9_8rlW1bQ" elementId="_pdLXYEjQEd-XR9_8rlW1bQ" label="Application Model" command="_OI-FgEZCEd-3Rue18XuTew"/>
- <children xsi:type="menu:HandledMenuItem" xmi:id="_z0xdUEjQEd-XR9_8rlW1bQ" elementId="_z0xdUEjQEd-XR9_8rlW1bQ" label="Model Contribution" command="_OcpPcEZCEd-3Rue18XuTew"/>
- </children>
- <children xsi:type="menu:HandledMenuItem" xmi:id="_5agWwEjQEd-XR9_8rlW1bQ" elementId="_5agWwEjQEd-XR9_8rlW1bQ" label="Open XMI ..." iconURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png" command="_Hx2ycEZCEd-3Rue18XuTew"/>
- <children xsi:type="menu:HandledMenuItem" xmi:id="_ATY6IEjREd-XR9_8rlW1bQ" elementId="_ATY6IEjREd-XR9_8rlW1bQ" label="Save" command="_NyiigEZCEd-3Rue18XuTew"/>
- </children>
- </mainMenu>
- <trimBars xmi:id="_5UAKUUjJEd-Y_4Sy4ZiGUQ" elementId="_5UAKUUjJEd-Y_4Sy4ZiGUQ">
- <children xsi:type="menu:ToolBar" xmi:id="_8DUQQEjJEd-Y_4Sy4ZiGUQ" elementId="_8DUQQEjJEd-Y_4Sy4ZiGUQ">
- <children xsi:type="menu:HandledToolItem" xmi:id="_GTv-QEjKEd-Y_4Sy4ZiGUQ" elementId="org.eclipse.e4.tools.emf.editor.mainwindow.trims.top.toolbars.main.items.openxmi" iconURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png" tooltip="Open XMI File" command="_Hx2ycEZCEd-3Rue18XuTew"/>
- <children xsi:type="menu:HandledToolItem" xmi:id="_G1D7kEjKEd-Y_4Sy4ZiGUQ" elementId="org.eclipse.e4.tools.emf.editor.mainwindow.trims.top.toolbars.main.items.savexmi" iconURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/disk.png" tooltip="Save XMI" command="_NyiigEZCEd-3Rue18XuTew"/>
- </children>
- </trimBars>
- </children>
- <handlers xmi:id="_Jp-AEEZBEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.handlers.openxmi" contributionURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/org.eclipse.e4.tools.emf.editor.OpenModelFileHandler" command="_Hx2ycEZCEd-3Rue18XuTew"/>
- <handlers xmi:id="_OTM1AEZBEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.handlers.savexmi" contributionURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/org.eclipse.e4.tools.emf.editor.SaveModelFileHandler" command="_NyiigEZCEd-3Rue18XuTew"/>
- <handlers xmi:id="_Owa8gEZBEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.handlers.newappmodel" contributionURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/org.eclipse.e4.tools.emf.editor.NewApplicationModelHandler" command="_OI-FgEZCEd-3Rue18XuTew"/>
- <handlers xmi:id="_PhoXAEZBEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.handlers.newcontribmodel" contributionURI="platform:/plugin/org.eclipse.e4.tools.emf.editor/org.eclipse.e4.tools.emf.editor.NewModelContributionHandler" command="_OcpPcEZCEd-3Rue18XuTew"/>
- <bindingTables xmi:id="_a8i7IEZBEd-3Rue18XuTew" elementId="org.eclipse.ui.bindingtables.dialogAndWindow" bindingContextId="org.eclipse.ui.contexts.dialogAndWindow">
- <bindings xmi:id="_pTpjkEZBEd-3Rue18XuTew" keySequence="M1+S" elementId="_pTpjkEZBEd-3Rue18XuTew" command="_NyiigEZCEd-3Rue18XuTew"/>
- </bindingTables>
- <rootContext xmi:id="_uvPCgEZBEd-3Rue18XuTew" elementId="org.eclipse.ui.contexts.dialogAndWindow" name="In Dialog and Windows" description="">
- <children xmi:id="_1GFP0EZBEd-3Rue18XuTew" elementId="org.eclipse.ui.contexts.window" name="In Windows" description=""/>
- <children xmi:id="_9_03sEZBEd-3Rue18XuTew" elementId="org.eclipse.ui.contexts.dialog" name="In Dialogs" description=""/>
- </rootContext>
- <bindingContexts>org.eclipse.ui.contexts.dialogAndWindow</bindingContexts>
- <commands xmi:id="_Hx2ycEZCEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.commands.openxmi" commandName="e4editor.openxmi"/>
- <commands xmi:id="_NyiigEZCEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.commands.savexmi" commandName="e4editor.savexmi"/>
- <commands xmi:id="_OI-FgEZCEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.commands.newappmodel" commandName="e4editor.newappmodel"/>
- <commands xmi:id="_OcpPcEZCEd-3Rue18XuTew" elementId="org.eclipse.e4.tools.emf.editor.commands.newcontribmodel" commandName="e4editor.newcontribmodel"/>
-</application:Application>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF
deleted file mode 100644
index 83a17d18..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,23 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Editor
-Bundle-SymbolicName: org.eclipse.e4.tools.emf.editor; singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.e4.ui.workbench.swt;bundle-version="0.9.1",
- org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1",
- org.eclipse.e4.ui.workbench;bundle-version="0.9.1",
- org.eclipse.swt;bundle-version="3.6.0",
- javax.inject;bundle-version="1.0.0",
- org.eclipse.e4.tools.emf.ui;bundle-version="0.9.0",
- org.eclipse.e4.core.services;bundle-version="0.9.1",
- org.eclipse.e4.ui.services;bundle-version="0.9.1",
- org.eclipse.core.databinding.observable;bundle-version="1.3.0",
- org.eclipse.emf.edit;bundle-version="2.6.0",
- org.eclipse.core.resources;bundle-version="3.6.0",
- org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Import-Package: org.eclipse.e4.core.contexts,
- org.eclipse.e4.core.di.annotations
-Service-Component: OSGI-INF/xmiresourcecontextfunction.xml, OSGI-INF/selectionproviderfunction.xml
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product b/bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product
deleted file mode 100644
index 1d6d2f00..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/ModelEditor.product
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?pde version="3.5"?>
-
-<product name="ModelEditor" id="org.eclipse.e4.tools.emf.editor.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" useFeatures="false" includeLaunchers="true">
-
- <configIni use="default">
- </configIni>
-
- <launcherArgs>
- <vmArgsMac>-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac>
- </launcherArgs>
-
- <plugins>
- <plugin id="com.ibm.icu"/>
- <plugin id="javax.inject"/>
- <plugin id="org.apache.batik.css"/>
- <plugin id="org.apache.batik.util"/>
- <plugin id="org.apache.batik.util.gui"/>
- <plugin id="org.apache.commons.beanutils"/>
- <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.filesystem.macosx" fragment="true"/>
- <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.services"/>
- <plugin id="org.eclipse.e4.core.services.annotations" fragment="true"/>
- <plugin id="org.eclipse.e4.tools.emf.editor"/>
- <plugin id="org.eclipse.e4.tools.emf.ui"/>
- <plugin id="org.eclipse.e4.ui.bindings"/>
- <plugin id="org.eclipse.e4.ui.css.core"/>
- <plugin id="org.eclipse.e4.ui.css.nebula"/>
- <plugin id="org.eclipse.e4.ui.css.swt"/>
- <plugin id="org.eclipse.e4.ui.model.workbench"/>
- <plugin id="org.eclipse.e4.ui.model.workbench.edit"/>
- <plugin id="org.eclipse.e4.ui.services"/>
- <plugin id="org.eclipse.e4.ui.workbench"/>
- <plugin id="org.eclipse.e4.ui.workbench.renderers.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench.swt"/>
- <plugin id="org.eclipse.e4.ui.workbench3"/>
- <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.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.jface"/>
- <plugin id="org.eclipse.jface.databinding"/>
- <plugin id="org.eclipse.nebula.widgets.gallery"/>
- <plugin id="org.eclipse.osgi"/>
- <plugin id="org.eclipse.osgi.services"/>
- <plugin id="org.eclipse.swt"/>
- <plugin id="org.eclipse.swt.cocoa.macosx.x86_64" fragment="true"/>
- <plugin id="org.eclipse.swt.gtk.linux.x86" fragment="true"/>
- <plugin id="org.w3c.css.sac"/>
- <plugin id="org.w3c.dom.smil"/>
- <plugin id="org.w3c.dom.svg"/>
- </plugins>
-
-
-</product>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml b/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml
deleted file mode 100644
index c5204caa..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/selectionproviderfunction.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor.selectionprovider">
- <implementation class="org.eclipse.e4.tools.emf.editor.SelectionProviderContextFunction"/>
- <service>
- <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
- </service>
- <property name="service.context.key" type="String" value="org.eclipse.e4.tools.emf.ui.common.ISelectionProviderService"/>
-</scr:component>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml b/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml
deleted file mode 100644
index 2c7c2e29..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/OSGI-INF/xmiresourcecontextfunction.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor.xmiresource">
- <implementation class="org.eclipse.e4.tools.emf.editor.XMIResourceFunction"/>
- <service>
- <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
- </service>
- <property name="service.context.key" type="String" value="org.eclipse.e4.tools.emf.ui.common.IModelResource"/>
-</scr:component>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/build.properties b/bundles/org.eclipse.e4.tools.emf.editor/build.properties
deleted file mode 100644
index 51b87b7d..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/build.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- css/,\
- icons/,\
- Application.e4xmi,\
- OSGI-INF/xmiresourcecontextfunction.xml,\
- OSGI-INF/selectionproviderfunction.xml
-source.. = src/
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/css/default.css b/bundles/org.eclipse.e4.tools.emf.editor/css/default.css
deleted file mode 100644
index 192ddf5e..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/css/default.css
+++ /dev/null
@@ -1,8 +0,0 @@
-CTabFolder {
- tab-renderer: url('platform:/plugin/org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.workbench.ui.renderers.swt.CTabRendering');
-
-}
-
-Shell {
- background-color: #ffffff;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css b/bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css
deleted file mode 100644
index b78bf7f9..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/css/e4_default.css
+++ /dev/null
@@ -1,21 +0,0 @@
-
-.MWindow {
- background-color: #EEF2F7 #DEEBF3 100%;
-}
-
-.MPartStack {
- tab-renderer: url('platform:/plugin/org.eclipse.e4.ui.workbench.renderers.swt/org.eclipse.e4.workbench.ui.renderers.swt.CTabRendering');
- unselected-tabs-color: #FFFFFF #FFFFFF #FFFFFF 100% 100%;
- outer-keyline-color: #FFFFFF;
- inner-keyline-color: #FFFFFF;
-}
-
-.MTrimBar {
- background-image: url(./winXPBlue.PNG);
-}
-
-.MPartStack.active {
- unselected-tabs-color: #CEDEF4 #D2E2F9 #FFFFFF 100% 100%;
- outer-keyline-color: #C3D0E9;
- inner-keyline-color: #FFFFFF;
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png b/bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png
deleted file mode 100644
index 3bc0bd32..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.png b/bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.png
deleted file mode 100644
index 99d532e8..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/disk.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png b/bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png
deleted file mode 100644
index 1ef6e114..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/icons/full/folder_page.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNG b/bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNG
deleted file mode 100644
index 57e94e5d..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/images/winXPBlue.PNG
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNG b/bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNG
deleted file mode 100644
index c745ee1b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/images/winXPOlive.PNG
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/plugin.xml b/bundles/org.eclipse.e4.tools.emf.editor/plugin.xml
deleted file mode 100644
index 1b67021c..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/plugin.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- id="product"
- point="org.eclipse.core.runtime.products">
- <product
- application="org.eclipse.e4.ui.workbench.swt.E4Application"
- name="ModelEditor">
- <property
- name="appName"
- value="ModelEditor">
- </property>
- <property
- name="applicationXMI"
- value="org.eclipse.e4.tools.emf.editor/Application.e4xmi">
- </property>
- <property
- name="applicationCSS"
- value="org.eclipse.e4.tools.emf.editor.theme">
- </property>
- <property
- name="applicationCSSResources"
- value="platform:/plugin/org.eclipse.e4.tools.emf.editor/images/">
- </property>
- </product>
- </extension>
- <extension
- point="org.eclipse.e4.ui.css.swt.theme">
- <theme
- basestylesheeturi="css/e4_default.css"
- id="org.eclipse.e4.tools.emf.editor.theme"
- label="Application Theme">
- </theme>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java
deleted file mode 100644
index 075f6797..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewApplicationModelHandler.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor;
-
-
-import java.io.IOException;
-
-import javax.inject.Named;
-
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.e4.ui.internal.workbench.E4XMIResource;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.e4.ui.model.application.ui.basic.MBasicFactory;
-import org.eclipse.e4.ui.model.application.ui.basic.MInputPart;
-import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
-import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.e4.ui.workbench.modeling.EModelService;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-
-@SuppressWarnings("restriction")
-public class NewApplicationModelHandler {
- @Execute
- public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MApplication application, EModelService modelService) {
- FileDialog dialog = new FileDialog(shell,SWT.SAVE);
- String file = dialog.open();
- if( file != null ) {
- String name = file.substring(file.lastIndexOf("/") + 1);
- String filePath = "file://" + file;
-
- try {
- E4XMIResource resource = new E4XMIResource();
- resource.getContents().add((EObject) MApplicationFactory.INSTANCE.createApplication());
- resource.setURI(URI.createFileURI(file));
- resource.save(null);
-
- MPartStack stack = (MPartStack) modelService.find("modeleditorstack", application);
-
- MInputPart part = MBasicFactory.INSTANCE.createInputPart();
- part.setLabel(name);
- part.setTooltip(file);
- part.setContributionURI("platform:/plugin/org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor");
- part.setIconURI("platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png");
- part.setInputURI(filePath);
-
- part.setCloseable(true);
- stack.getChildren().add(part);
- stack.setSelectedElement(part);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java
deleted file mode 100644
index a610f488..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/NewModelContributionHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package org.eclipse.e4.tools.emf.editor;
-
-import java.io.IOException;
-
-import javax.inject.Named;
-
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.e4.ui.internal.workbench.E4XMIResource;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.e4.ui.model.application.ui.basic.MBasicFactory;
-import org.eclipse.e4.ui.model.application.ui.basic.MInputPart;
-import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
-import org.eclipse.e4.ui.model.fragment.MFragmentFactory;
-import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.e4.ui.workbench.modeling.EModelService;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-
-public class NewModelContributionHandler {
- @Execute
- public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MApplication application, EModelService modelService) {
- FileDialog dialog = new FileDialog(shell,SWT.SAVE);
- String file = dialog.open();
- if( file != null ) {
- String name = file.substring(file.lastIndexOf("/") + 1);
- String filePath = "file://" + file;
-
- try {
- E4XMIResource resource = new E4XMIResource();
- resource.getContents().add((EObject) MFragmentFactory.INSTANCE.createModelFragments());
- resource.setURI(URI.createFileURI(file));
- resource.save(null);
-
- System.err.println("Saved to: " + file);
-
- MPartStack stack = (MPartStack) modelService.find("modeleditorstack", application);
-
- MInputPart part = MBasicFactory.INSTANCE.createInputPart();
- part.setLabel(name);
- part.setTooltip(file);
- part.setContributionURI("platform:/plugin/org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor");
- part.setIconURI("platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png");
- part.setInputURI(filePath);
-
- part.setCloseable(true);
- stack.getChildren().add(part);
- stack.setSelectedElement(part);
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java
deleted file mode 100644
index 0e8895ec..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/OpenModelFileHandler.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor;
-
-import java.util.Collection;
-
-import javax.inject.Named;
-
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.ui.basic.MBasicFactory;
-import org.eclipse.e4.ui.model.application.ui.basic.MInputPart;
-import org.eclipse.e4.ui.model.application.ui.basic.MPartStack;
-import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.e4.ui.workbench.modeling.EModelService;
-import org.eclipse.e4.ui.workbench.modeling.EPartService;
-import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Shell;
-
-public class OpenModelFileHandler {
- @Execute
- public void execute(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell, MApplication application, EModelService modelService, EPartService partService) {
- System.err.println("Execute!");
- FileDialog dialog = new FileDialog(shell);
- String file = dialog.open();
- if( file != null ) {
- String name = file.substring(file.lastIndexOf("/") + 1);
- String filePath = "file://" + file;
- Collection<MInputPart> parts = partService.getInputParts(filePath);
- if( parts.size() == 0 ) {
- MPartStack stack = (MPartStack) modelService.find("org.eclipse.e4.tools.emf.editor.mainwindow.editorstack", application);
-
- try {
- MInputPart part = MBasicFactory.INSTANCE.createInputPart();
- part.setLabel(name);
- part.setTooltip(file);
- part.setContributionURI("platform:/plugin/org.eclipse.e4.tools.emf.ui/org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor");
- part.setIconURI("platform:/plugin/org.eclipse.e4.tools.emf.editor/icons/full/application_view_tile.png");
- part.setInputURI(filePath);
-
- part.setCloseable(true);
- stack.getChildren().add(part);
- stack.setSelectedElement(part);
- System.err.println("Done");
- } catch (Exception e) {
- e.printStackTrace();
- }
- } else {
- partService.showPart(parts.iterator().next(), PartState.ACTIVATE);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java
deleted file mode 100644
index 7aacb884..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SaveModelFileHandler.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor;
-
-import javax.inject.Named;
-
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.e4.ui.model.application.ui.basic.MPart;
-import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.e4.ui.workbench.modeling.EPartService;
-
-public class SaveModelFileHandler {
- @Execute
- public void execute(@Named(IServiceConstants.ACTIVE_PART) MPart part, EPartService partService) {
- partService.savePart(part, false);
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java
deleted file mode 100644
index 8dc1fa26..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/SelectionProviderContextFunction.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.e4.tools.emf.editor;
-
-import org.eclipse.e4.core.contexts.ContextFunction;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.tools.emf.ui.common.ISelectionProviderService;
-import org.eclipse.e4.ui.services.IServiceConstants;
-
-public class SelectionProviderContextFunction extends ContextFunction {
-
- @Override
- public Object compute(final IEclipseContext context) {
- return new ISelectionProviderService() {
-
- public void setSelection(Object selection) {
- context.set(IServiceConstants.SELECTION, selection);
- }
- };
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java b/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java
deleted file mode 100644
index f3cc4b91..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor/src/org/eclipse/e4/tools/emf/editor/XMIResourceFunction.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package org.eclipse.e4.tools.emf.editor;
-
-import org.eclipse.e4.core.contexts.ContextFunction;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource.ModelListener;
-import org.eclipse.e4.tools.emf.ui.common.XMIModelResource;
-import org.eclipse.e4.ui.model.application.ui.basic.MInputPart;
-import org.eclipse.emf.common.util.URI;
-
-public class XMIResourceFunction extends ContextFunction {
-
- @Override
- public Object compute(IEclipseContext context) {
- final MInputPart part = context.get(MInputPart.class);
- if( part != null ) {
- final XMIModelResource resource = new XMIModelResource(URI.createURI(part.getInputURI()));
- resource.addModelListener(new ModelListener() {
-
- public void dirtyChanged() {
- part.setDirty(resource.isDirty());
- }
-
- public void commandStackChanged() {
-
- }
- });
- return resource;
- }
-
- return null;
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/.classpath b/bundles/org.eclipse.e4.tools.emf.editor3x/.classpath
deleted file mode 100644
index 64c5e31b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/.project b/bundles/org.eclipse.e4.tools.emf.editor3x/.project
deleted file mode 100644
index 6682b79a..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.e4.tools.emf.editor3x</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index df1b497b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Sun Mar 14 13:37:58 CET 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF
deleted file mode 100644
index e69d0595..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Editor3x
-Bundle-SymbolicName: org.eclipse.e4.tools.emf.editor3x;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.ui;bundle-version="3.6.0",
- org.eclipse.core.runtime;bundle-version="3.6.0",
- org.eclipse.emf.common;bundle-version="2.6.0",
- org.eclipse.core.databinding.observable;bundle-version="1.3.0",
- org.eclipse.e4.tools.emf.ui;bundle-version="0.9.0",
- org.eclipse.e4.ui.workbench;bundle-version="0.9.1",
- org.eclipse.e4.ui.css.core;bundle-version="0.9.0",
- org.eclipse.e4.ui.css.swt;bundle-version="0.9.1",
- org.w3c.css.sac;bundle-version="1.3.0",
- org.eclipse.pde.core;bundle-version="3.6.0",
- org.eclipse.core.resources;bundle-version="3.6.0",
- org.eclipse.jdt.core;bundle-version="3.6.0",
- org.eclipse.ui.ide;bundle-version="3.6.0",
- org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0",
- org.eclipse.e4.core.contexts;bundle-version="0.9.0",
- org.eclipse.e4.core.di;bundle-version="0.9.0",
- org.eclipse.e4.core.services;bundle-version="0.9.1",
- org.eclipse.emf.edit;bundle-version="2.6.0",
- org.eclipse.e4.ui.services;bundle-version="0.9.1",
- org.eclipse.e4.tools.compat;bundle-version="1.0.0",
- org.eclipse.e4.tools.services;bundle-version="1.0.0"
-Service-Component: OSGI-INF/pdecontributionprovider.xml, OSGI-INF/xmiresourcecontextfunction.xml, OSGI-INF/projectfunction.xml
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.e4.tools.emf.editor3x.wizard;x-internal:=true
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml
deleted file mode 100644
index ce78958e..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/pdecontributionprovider.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor3x.pdecontrib">
- <implementation class="org.eclipse.e4.tools.emf.editor3x.PDEClassContributionProvider"/>
- <service>
- <provide interface="org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml
deleted file mode 100644
index ed7571e8..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/projectfunction.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor3x.projectfunction">
- <implementation class="org.eclipse.e4.tools.emf.editor3x.EditorProjectFunction"/>
- <service>
- <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
- </service>
- <property name="service.context.key" type="String" value="org.eclipse.e4.tools.emf.ui.editorproject"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml
deleted file mode 100644
index 07c42709..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/OSGI-INF/xmiresourcecontextfunction.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.editor3x.contextfunction">
- <implementation class="org.eclipse.e4.tools.emf.editor3x.XMIResourceFunction"/>
- <service>
- <provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
- </service>
- <property name="service.context.key" type="String" value="org.eclipse.e4.tools.emf.ui.common.IModelResource"/>
-</scr:component> \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/about.html b/bundles/org.eclipse.e4.tools.emf.editor3x/about.html
deleted file mode 100644
index c1343aa3..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/about.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>December 3, 2009</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items from third parties as set out below. If you did not
-receive this Content directly from the Eclipse Foundation, the following is provided for informational
-purposes only, and you should look to the Redistributor&rsquo;s license for terms and conditions of use.</p>
-
-<h4>Silk icon set Version 1.3</h4>
-<p>
-This plugin contains icons from the Silk icon set created by Mark James. The original files can
-be found at:
-<ul>
-<a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a></ul>
-<p>The license can be found at:</p>
-<ul>
- <li><a href="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</a></li>
-</ul>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/build.properties b/bundles/org.eclipse.e4.tools.emf.editor3x/build.properties
deleted file mode 100644
index 4f0aef77..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- OSGI-INF/
-source.. = src/
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.png b/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.png
deleted file mode 100644
index 3bc0bd32..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/application_view_tile.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/plugin.png b/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/plugin.png
deleted file mode 100644
index 6187b15a..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/icons/full/obj16/plugin.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml b/bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml
deleted file mode 100644
index dc050c95..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/plugin.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.editors">
- <editor
- class="org.eclipse.e4.tools.emf.editor3x.E4WorkbenchModelEditor"
- default="true"
- extensions="e4xmi"
- icon="icons/full/obj16/application_view_tile.png"
- id="org.eclipse.e4.tools.emf.editor3x.e4wbm"
- name="e4 Workbenchmodel Editor">
- </editor>
- </extension>
- <extension
- point="org.eclipse.ui.newWizards">
- <wizard
- canFinishEarly="false"
- category="org.eclipse.e4"
- class="org.eclipse.e4.tools.emf.editor3x.wizard.NewApplicationModelWizard"
- hasPages="true"
- icon="icons/full/obj16/application_view_tile.png"
- id="org.eclipse.e4.tools.emf.editor3x.newappmodel"
- name="New Application Model">
- </wizard>
-
- <wizard
- canFinishEarly="false"
- category="org.eclipse.e4"
- class="org.eclipse.e4.tools.emf.editor3x.wizard.NewContributionModelWizard"
- hasPages="true"
- icon="icons/full/obj16/plugin.png"
- id="org.eclipse.e4.tools.emf.editor3x.newmodelcontribution"
- name="New Model Fragment">
- </wizard>
- <category
- id="org.eclipse.e4"
- name="e4">
- </category>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java
deleted file mode 100644
index 3484bed5..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/E4WorkbenchModelEditor.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x;
-
-import org.eclipse.e4.tools.compat.parts.DIEditorPart;
-import org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor;
-
-@SuppressWarnings("restriction")
-public class E4WorkbenchModelEditor extends DIEditorPart<ApplicationModelEditor> {
-
- public E4WorkbenchModelEditor() {
- super(ApplicationModelEditor.class);
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java
deleted file mode 100644
index c99606b5..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/EditorProjectFunction.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package org.eclipse.e4.tools.emf.editor3x;
-
-import org.eclipse.e4.core.contexts.ContextFunction;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
-
-public class EditorProjectFunction extends ContextFunction {
-
- @Override
- public Object compute(IEclipseContext context) {
- final IEditorInput input = context.get(IEditorInput.class);
- if( input != null ) {
- return ((IFileEditorInput)input).getFile().getProject();
- }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java
deleted file mode 100644
index cf55a477..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/PDEClassContributionProvider.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.TypeNameRequestor;
-import org.eclipse.pde.internal.core.util.PDEJavaHelper;
-
-public class PDEClassContributionProvider implements IClassContributionProvider {
- private SearchEngine searchEngine;
- public PDEClassContributionProvider() {
- searchEngine = new SearchEngine();
- }
-
- @SuppressWarnings("restriction")
- public void findContribution(final Filter filter, final ContributionResultHandler handler) {
- System.err.println("Searching for: " + filter.namePattern);
-
- IJavaSearchScope scope = PDEJavaHelper.getSearchScope(filter.project);
-
- char[] packageName = null;
- char[] typeName = null;
- String currentContent = filter.namePattern;
- int index = currentContent.lastIndexOf('.');
-
- if (index == -1) {
- // There is no package qualification
- // Perform the search only on the type name
- typeName = currentContent.toCharArray();
- } else if ((index + 1) == currentContent.length()) {
- // There is a package qualification and the last character is a
- // dot
- // Perform the search for all types under the given package
- // Pattern for all types
- typeName = "".toCharArray(); //$NON-NLS-1$
- // Package name without the trailing dot
- packageName = currentContent.substring(0, index).toCharArray();
- } else {
- // There is a package qualification, followed by a dot, and
- // a type fragment
- // Type name without the package qualification
- typeName = currentContent.substring(index + 1).toCharArray();
- // Package name without the trailing dot
- packageName = currentContent.substring(0, index).toCharArray();
- }
-
-// char[] packageName = "at.bestsolution.e4.handlers".toCharArray();
-// char[] typeName = "*".toCharArray();
-
- TypeNameRequestor req = new TypeNameRequestor() {
- public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) {
- // Accept search results from the JDT SearchEngine
- String cName = new String(simpleTypeName);
- String pName = new String(packageName);
-// String label = cName + " - " + pName; //$NON-NLS-1$
- String content = pName + "." + cName; //$NON-NLS-1$
-
-// System.err.println("Found: " + label + " => " + pName + " => " + path);
-
- IResource resource = filter.project.getWorkspace().getRoot().findMember(path);
-
- if( resource != null ) {
- IProject project = resource.getProject();
- IFile f = project.getFile("/META-INF/MANIFEST.MF");
-
- if( f != null && f.exists() ) {
- BufferedReader r = null;
- try {
- InputStream s = f.getContents();
- r = new BufferedReader(new InputStreamReader(s));
- String line;
- while( (line = r.readLine()) != null ) {
- if( line.startsWith("Bundle-SymbolicName:") ) {
- int start = line.indexOf(':');
- int end = line.indexOf(';');
- if( end == -1 ) {
- end = line.length();
- }
- ContributionData data = new ContributionData(line.substring(start+1,end).trim(), content, "Java", null);
- handler.result(data);
- break;
- }
- }
-
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- } finally {
- if( r != null ) {
- try {
- r.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- }
- }
-
-
- //Image image = (Flags.isInterface(modifiers)) ? PDEPluginImages.get(PDEPluginImages.OBJ_DESC_GENERATE_INTERFACE) : PDEPluginImages.get(PDEPluginImages.OBJ_DESC_GENERATE_CLASS);
- //addProposalToCollection(c, startOffset, length, label, content, image);
- }
- };
-
- try {
- searchEngine.searchAllTypeNames(
- packageName,
- SearchPattern.R_EXACT_MATCH,
- typeName,
- SearchPattern.R_PREFIX_MATCH,
- IJavaSearchConstants.CLASS,
- scope,
- req,
- IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
- } catch (JavaModelException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
-
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java
deleted file mode 100644
index 36c0b85a..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/RedoAction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x;
-
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.jface.action.Action;
-
-public class RedoAction extends Action {
- private final IModelResource resource;
- private final IModelResource.ModelListener listener;
-
- public RedoAction(IModelResource resource) {
- this.resource = resource;
- this.listener = new IModelResource.ModelListener() {
-
- public void commandStackChanged() {
- update();
- }
-
- public void dirtyChanged() {
-
- }
-
- };
- resource.addModelListener(listener);
- update();
- }
-
- @Override
- public void run() {
- if (resource.getEditingDomain().getCommandStack().canRedo()) {
- resource.getEditingDomain().getCommandStack().redo();
- }
- }
-
- private void update() {
- if (resource.getEditingDomain().getCommandStack().canRedo()) {
- setText("Redo "
- + resource.getEditingDomain().getCommandStack()
- .getRedoCommand().getLabel());
- setEnabled(true);
- } else {
- setText("Redo");
- setEnabled(false);
- }
- }
-
- /**
- * Clean up
- */
- public void dispose() {
- resource.removeModelListener(listener);
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java
deleted file mode 100644
index 6988d3d1..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/UndoAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x;
-
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.jface.action.Action;
-
-public class UndoAction extends Action {
- private final IModelResource resource;
- private final IModelResource.ModelListener listener;
-
- public UndoAction(IModelResource resource) {
- this.resource = resource;
- this.listener = new IModelResource.ModelListener() {
-
- public void commandStackChanged() {
- update();
- }
-
- public void dirtyChanged() {
- }
- };
- resource.addModelListener(listener);
- update();
- }
-
- @Override
- public void run() {
- if (resource.getEditingDomain().getCommandStack().canUndo()) {
- resource.getEditingDomain().getCommandStack().undo();
- }
- }
-
- private void update() {
- if (resource.getEditingDomain().getCommandStack().canUndo()) {
- setText("Undo "
- + resource.getEditingDomain().getCommandStack()
- .getUndoCommand().getLabel());
- setEnabled(true);
- } else {
- setText("Undo");
- setEnabled(false);
- }
- }
-
- /**
- * Clean up
- */
- public void dispose() {
- resource.removeModelListener(listener);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java
deleted file mode 100644
index a19ed76d..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIModelResource.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x;
-
-import java.util.ArrayList;
-import java.util.EventObject;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.e4.ui.internal.workbench.E4XMIResourceFactory;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-
-@SuppressWarnings("restriction")
-public class XMIModelResource implements IModelResource {
- private EditingDomain editingDomain;
- private Resource resource;
- private List<ModelListener> listeners = new ArrayList<IModelResource.ModelListener>();
- private boolean dirty;
-
-
- public XMIModelResource(URI uri) {
- ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(
- ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- ResourceSet resourceSet = new ResourceSetImpl();
- BasicCommandStack commandStack = new BasicCommandStack();
- commandStack.addCommandStackListener(new CommandStackListener() {
-
- public void commandStackChanged(EventObject event) {
- dirty = true;
- fireDirtyChanged();
- fireCommandStackChanged();
- }
- });
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory,
- commandStack, resourceSet);
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
- .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
- new E4XMIResourceFactory());
- resource = resourceSet.getResource(uri, true);
- }
-
- public IObservableList getRoot() {
- WritableList list = new WritableList();
- list.add(resource.getContents().get(0));
- return list;
- }
-
- public EditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- public boolean isSaveable() {
- return true;
- }
-
- public void addModelListener(ModelListener listener) {
- listeners.add(listener);
- }
-
- public void removeModelListener(ModelListener listener) {
- listeners.remove(listener);
- }
-
- public boolean isDirty() {
- return dirty && getEditingDomain().getCommandStack().canUndo();
- }
-
- private void fireDirtyChanged() {
- for( ModelListener listener : listeners ) {
- listener.dirtyChanged();
- }
- }
-
- private void fireCommandStackChanged() {
- for( ModelListener listener : listeners ) {
- listener.commandStackChanged();
- }
- }
-
- public IStatus save() {
- Map<String, String> map = new HashMap<String, String>();
- try {
- resource.save(map);
- editingDomain.getCommandStack().flush();
- dirty = false;
- fireDirtyChanged();
- fireCommandStackChanged();
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- }
-
- return Status.OK_STATUS;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java
deleted file mode 100644
index 2b64fcb8..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/XMIResourceFunction.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package org.eclipse.e4.tools.emf.editor3x;
-
-import org.eclipse.e4.core.contexts.ContextFunction;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.tools.emf.editor3x.emf.EditUIUtil;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource.ModelListener;
-import org.eclipse.e4.tools.emf.ui.common.XMIModelResource;
-import org.eclipse.e4.tools.services.IDirtyProviderService;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.ui.IEditorInput;
-
-public class XMIResourceFunction extends ContextFunction {
-
- @Override
- public Object compute(final IEclipseContext context) {
- final IEditorInput input = context.get(IEditorInput.class);
- final IDirtyProviderService dirtyProvider = context.get(IDirtyProviderService.class);
-
- if( input != null ) {
- URI resourceURI = EditUIUtil.getURI(input);
- final XMIModelResource resource = new XMIModelResource(resourceURI);
- resource.addModelListener(new ModelListener() {
-
- public void dirtyChanged() {
- dirtyProvider.setDirtyState(resource.isDirty());
- }
-
- public void commandStackChanged() {
-
- }
- });
- return resource;
- }
-
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java
deleted file mode 100644
index 39074b03..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/emf/EditUIUtil.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package org.eclipse.e4.tools.emf.editor3x.emf;
-
-import java.lang.reflect.Method;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IURIEditorInput;
-import org.osgi.framework.Bundle;
-
-public class EditUIUtil {
- static final Class<?> FILE_CLASS;
- static {
- Class<?> fileClass = null;
- try {
- fileClass = IFile.class;
- } catch (Throwable exception) {
- // Ignore any exceptions and assume the class isn't available.
- }
- FILE_CLASS = fileClass;
- }
-
- static final Class<?> FILE_REVISION_CLASS;
- static final Method FILE_REVISION_GET_URI_METHOD;
- static {
- Class<?> fileRevisionClass = null;
- Method fileRevisionGetURIMethod = null;
- Bundle bundle = Platform.getBundle("org.eclipse.team.core");
- if (bundle != null
- && (bundle.getState() & (Bundle.ACTIVE | Bundle.STARTING | Bundle.RESOLVED)) != 0) {
- try {
- fileRevisionClass = bundle
- .loadClass("org.eclipse.team.core.history.IFileRevision");
- fileRevisionGetURIMethod = fileRevisionClass
- .getMethod("getURI");
- } catch (Throwable exeption) {
- // Ignore any exceptions and assume the class isn't available.
- }
- }
- FILE_REVISION_CLASS = fileRevisionClass;
- FILE_REVISION_GET_URI_METHOD = fileRevisionGetURIMethod;
- }
-
- static final Class<?> URI_EDITOR_INPUT_CLASS;
- static {
- Class<?> uriEditorInputClass = null;
- try {
- uriEditorInputClass = IURIEditorInput.class;
- } catch (Throwable exception) {
- // The class is not available.
- }
- URI_EDITOR_INPUT_CLASS = uriEditorInputClass;
- }
-
- public static URI getURI(IEditorInput editorInput) {
-
- if (FILE_CLASS != null) {
- IFile file = (IFile) editorInput.getAdapter(FILE_CLASS);
- if (file != null) {
- return URI.createPlatformResourceURI(file.getFullPath()
- .toString(), true);
- }
- }
- if (FILE_REVISION_CLASS != null) {
- Object fileRevision = editorInput.getAdapter(FILE_REVISION_CLASS);
- if (fileRevision != null) {
- try {
- return URI
- .createURI(((java.net.URI) FILE_REVISION_GET_URI_METHOD
- .invoke(fileRevision)).toString());
- } catch (Throwable exception) {
- // TODO Log error
- }
- }
- }
- if (URI_EDITOR_INPUT_CLASS != null) {
- if (editorInput instanceof IURIEditorInput) {
- return URI.createURI(
- ((IURIEditorInput) editorInput).getURI().toString())
- .trimFragment();
- }
- }
-
- return null;
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/BaseApplicationModelWizard.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/BaseApplicationModelWizard.java
deleted file mode 100644
index 27d175bf..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/BaseApplicationModelWizard.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x.wizard;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWizard;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.part.FileEditorInput;
-import org.eclipse.ui.part.ISetSelectionTarget;
-
-public abstract class BaseApplicationModelWizard extends Wizard implements INewWizard {
- private NewModelFilePage page;
- private ISelection selection;
-
- protected IWorkbench workbench;
-
- /**
- * Constructor for NewApplicationModelWizard.
- */
- public BaseApplicationModelWizard() {
- super();
- setNeedsProgressMonitor(true);
- }
-
- /**
- * Adding the page to the wizard.
- */
-
- public void addPages() {
- page = new NewModelFilePage(selection,getDefaultFileName());
- addPage(page);
- }
-
- public abstract String getDefaultFileName();
-
- @Override
- public boolean performFinish() {
- try {
- // Remember the file.
- //
- final IFile modelFile = getModelFile();
-
- // Do the work within an operation.
- //
- WorkspaceModifyOperation operation =
- new WorkspaceModifyOperation() {
- @Override
- protected void execute(IProgressMonitor progressMonitor) {
- try {
- // Create a resource set
- //
- ResourceSet resourceSet = new ResourceSetImpl();
-
- // Get the URI of the model file.
- //
- URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
-
- // Create a resource for this file.
- //
- Resource resource = resourceSet.createResource(fileURI);
-
- // Add the initial model object to the contents.
- //
- EObject rootObject = createInitialModel();
- if (rootObject != null) {
- resource.getContents().add(rootObject);
- }
-
- // Save the contents of the resource to the file system.
- //
- Map<Object, Object> options = new HashMap<Object, Object>();
- resource.save(options);
- }
- catch (Exception exception) {
- throw new RuntimeException(exception);
- }
- finally {
- progressMonitor.done();
- }
- }
- };
-
- getContainer().run(false, false, operation);
-
- // Select the new file resource in the current view.
- //
- IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
- IWorkbenchPage page = workbenchWindow.getActivePage();
- final IWorkbenchPart activePart = page.getActivePart();
- if (activePart instanceof ISetSelectionTarget) {
- final ISelection targetSelection = new StructuredSelection(modelFile);
- getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
- }
- });
- }
-
- // Open an editor on the new file.
- //
- try {
- page.openEditor
- (new FileEditorInput(modelFile),
- workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
- }
- catch (PartInitException exception) {
- MessageDialog.openError(workbenchWindow.getShell(), "Could not init editor", exception.getMessage()); //$NON-NLS-1$
- return false;
- }
-
- return true;
- }
- catch (Exception exception) {
- MessageDialog.openError(getShell(), "Error", exception.getMessage());
- return false;
- }
- }
-
- protected abstract EObject createInitialModel();
-
- private IFile getModelFile() throws CoreException {
- String containerName = page.getContainerName();
- String fileName = page.getFileName();
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IResource resource = root.findMember(new Path(containerName));
- if (!resource.exists() || !(resource instanceof IContainer)) {
- throwCoreException("Container \"" + containerName
- + "\" does not exist.");
- }
- IContainer container = (IContainer) resource;
- return container.getFile(new Path(fileName));
- }
-
- private void throwCoreException(String message) throws CoreException {
- IStatus status = new Status(IStatus.ERROR,
- "org.eclipse.e4.tools.emf.editor3x", IStatus.OK, message, null);
- throw new CoreException(status);
- }
-
- /**
- * We will accept the selection in the workbench to see if we can initialize
- * from it.
- *
- * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
- */
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- this.workbench = workbench;
- this.selection = selection;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewApplicationModelWizard.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewApplicationModelWizard.java
deleted file mode 100644
index ed161a7e..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewApplicationModelWizard.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x.wizard;
-
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.emf.ecore.EObject;
-
-
-public class NewApplicationModelWizard extends BaseApplicationModelWizard {
-
- @Override
- public String getDefaultFileName() {
- return "Application.e4xmi";
- }
-
- protected EObject createInitialModel() {
- return (EObject) MApplicationFactory.INSTANCE.createApplication();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewContributionModelWizard.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewContributionModelWizard.java
deleted file mode 100644
index 20b95dd2..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewContributionModelWizard.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x.wizard;
-
-import org.eclipse.e4.ui.model.fragment.MFragmentFactory;
-import org.eclipse.emf.ecore.EObject;
-
-
-public class NewContributionModelWizard extends BaseApplicationModelWizard {
-
- @Override
- public String getDefaultFileName() {
- return "fragment.e4xmi";
- }
-
- protected EObject createInitialModel() {
- return (EObject) MFragmentFactory.INSTANCE.createModelFragments();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewModelFilePage.java b/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewModelFilePage.java
deleted file mode 100644
index 90154bad..00000000
--- a/bundles/org.eclipse.e4.tools.emf.editor3x/src/org/eclipse/e4/tools/emf/editor3x/wizard/NewModelFilePage.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.editor3x.wizard;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.IDialogPage;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.ContainerSelectionDialog;
-
-/**
- * The "New" wizard page allows setting the container for the new file as well
- * as the file name. The page will only accept file name without the extension
- * OR with the extension that matches the expected one (e4xmi).
- */
-
-public class NewModelFilePage extends WizardPage {
- private Text containerText;
-
- private Text fileText;
-
- private ISelection selection;
-
- private String defaultFilename;
-
- /**
- * Constructor for SampleNewWizardPage.
- *
- * @param pageName
- */
- public NewModelFilePage(ISelection selection, String defaultFilename) {
- super("wizardPage");
- setTitle("Multi-page Editor File");
- setDescription("This wizard creates a new file with *.e4xmi extension that can be opened by a multi-page editor.");
- this.selection = selection;
- this.defaultFilename = defaultFilename;
- }
-
- /**
- * @see IDialogPage#createControl(Composite)
- */
- public void createControl(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout();
- container.setLayout(layout);
- layout.numColumns = 3;
- layout.verticalSpacing = 9;
- Label label = new Label(container, SWT.NULL);
- label.setText("&Container:");
-
- containerText = new Text(container, SWT.BORDER | SWT.SINGLE);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- containerText.setLayoutData(gd);
- containerText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- dialogChanged();
- }
- });
-
- Button button = new Button(container, SWT.PUSH);
- button.setText("Browse...");
- button.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- handleBrowse();
- }
- });
- label = new Label(container, SWT.NULL);
- label.setText("&File name:");
-
- fileText = new Text(container, SWT.BORDER | SWT.SINGLE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- fileText.setLayoutData(gd);
- fileText.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- dialogChanged();
- }
- });
- initialize();
- dialogChanged();
- setControl(container);
- }
-
- /**
- * Tests if the current workbench selection is a suitable container to use.
- */
-
- private void initialize() {
- if (selection != null && selection.isEmpty() == false
- && selection instanceof IStructuredSelection) {
- IStructuredSelection ssel = (IStructuredSelection) selection;
- if (ssel.size() > 1)
- return;
- Object obj = ssel.getFirstElement();
- if (obj instanceof IResource) {
- IContainer container;
- if (obj instanceof IContainer)
- container = (IContainer) obj;
- else
- container = ((IResource) obj).getParent();
- containerText.setText(container.getFullPath().toString());
- }
- }
- fileText.setText(defaultFilename);
- }
-
- /**
- * Uses the standard container selection dialog to choose the new value for
- * the container field.
- */
-
- private void handleBrowse() {
- ContainerSelectionDialog dialog = new ContainerSelectionDialog(
- getShell(), ResourcesPlugin.getWorkspace().getRoot(), false,
- "Select new file container");
- if (dialog.open() == ContainerSelectionDialog.OK) {
- Object[] result = dialog.getResult();
- if (result.length == 1) {
- containerText.setText(((Path) result[0]).toString());
- }
- }
- }
-
- /**
- * Ensures that both text fields are set.
- */
-
- private void dialogChanged() {
- IResource container = ResourcesPlugin.getWorkspace().getRoot()
- .findMember(new Path(getContainerName()));
- String fileName = getFileName();
-
- if (getContainerName().length() == 0) {
- updateStatus("File container must be specified");
- return;
- }
- if (container == null
- || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
- updateStatus("File container must exist");
- return;
- }
- if (!container.isAccessible()) {
- updateStatus("Project must be writable");
- return;
- }
- if (fileName.length() == 0) {
- updateStatus("File name must be specified");
- return;
- }
- if (fileName.replace('\\', '/').indexOf('/', 1) > 0) {
- updateStatus("File name must be valid");
- return;
- }
- int dotLoc = fileName.lastIndexOf('.');
- if (dotLoc != -1) {
- String ext = fileName.substring(dotLoc + 1);
- if (ext.equalsIgnoreCase("e4xmi") == false) {
- updateStatus("File extension must be \"e4xmi\"");
- return;
- }
- }
- updateStatus(null);
- }
-
- private void updateStatus(String message) {
- setErrorMessage(message);
- setPageComplete(message == null);
- }
-
- public String getContainerName() {
- return containerText.getText();
- }
-
- public String getFileName() {
- return fileText.getText();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath b/bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath
deleted file mode 100644
index 64c5e31b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/.project b/bundles/org.eclipse.e4.tools.emf.liveeditor/.project
deleted file mode 100644
index e796110f..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.e4.tools.emf.liveeditor</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 5bf6d1cf..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Sun Mar 14 18:18:29 CET 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF
deleted file mode 100644
index 87b851a9..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Liveeditor
-Bundle-SymbolicName: org.eclipse.e4.tools.emf.liveeditor;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: javax.inject;bundle-version="1.0.0",
- org.eclipse.e4.ui.services;bundle-version="0.9.1",
- org.eclipse.swt;bundle-version="3.6.0",
- org.eclipse.e4.tools.emf.ui;bundle-version="0.9.0",
- org.eclipse.emf.edit;bundle-version="2.6.0",
- org.eclipse.core.databinding.observable;bundle-version="1.3.0",
- org.eclipse.equinox.common;bundle-version="3.6.0",
- org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1",
- org.eclipse.e4.ui.workbench;bundle-version="0.9.1",
- org.eclipse.core.resources;bundle-version="3.6.0",
- org.eclipse.e4.core.contexts;bundle-version="0.9.0",
- org.eclipse.e4.core.di;bundle-version="0.9.0"
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties b/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties
deleted file mode 100644
index e9863e28..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/build.properties
+++ /dev/null
@@ -1,5 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml b/bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml
deleted file mode 100644
index 5e6b541b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/plugin.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- id="id1"
- point="org.eclipse.e4.workbench.model">
- <processor
- beforefragment="true"
- class="org.eclipse.e4.tools.emf.liveeditor.ModelProcessor">
- </processor>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java
deleted file mode 100644
index d93e9fee..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/MemoryModelResource.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.liveeditor;
-
-
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-
-public class MemoryModelResource implements IModelResource {
- private WritableList list = new WritableList();
- private EditingDomain editingDomain;
-
- public MemoryModelResource(MApplication application) {
- list.add(application);
- BasicCommandStack commandStack = new BasicCommandStack();
- ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack);
- }
-
- public IObservableList getRoot() {
- return list;
- }
-
- public boolean isSaveable() {
- return false;
- }
-
- public IStatus save() {
- return Status.OK_STATUS;
- }
-
- public EditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- public boolean isDirty() {
- return false;
- }
-
- public void addModelListener(ModelListener listener) {
-
- }
-
- public void removeModelListener(ModelListener listener) {
-
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java
deleted file mode 100644
index a649726a..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/ModelProcessor.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.liveeditor;
-
-import javax.inject.Inject;
-
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.commands.MCommand;
-import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
-import org.eclipse.e4.ui.model.application.commands.MHandler;
-import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
-import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem;
-import org.eclipse.e4.ui.model.application.ui.menu.MHandledMenuItem;
-import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
-import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory;
-import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
-
-public class ModelProcessor {
-
- @Execute
- public void process(MApplication application) {
- MCommand command = MCommandsFactory.INSTANCE.createCommand();
- command.setElementId("e4.tooling.livemodel");
- command.setCommandName("Show running app model");
- command.setDescription("Show the running application model");
- application.getCommands().add(command);
-
- MHandler handler = MCommandsFactory.INSTANCE.createHandler();
- handler.setContributionURI("platform:/plugin/org.eclipse.e4.tools.emf.liveeditor/org.eclipse.e4.tools.emf.liveeditor.OpenLiveDialogHandler");
- handler.setCommand(command);
- application.getHandlers().add(handler);
-
- MKeyBinding binding = MCommandsFactory.INSTANCE.createKeyBinding();
- binding.setKeySequence("ALT+SHIFT+F9");
- binding.setCommand(command);
- if( application.getBindingTables().size() > 0 ) {
- application.getBindingTables().get(0).getBindings().add(binding);
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java b/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java
deleted file mode 100644
index 630ae811..00000000
--- a/bundles/org.eclipse.e4.tools.emf.liveeditor/src/org/eclipse/e4/tools/emf/liveeditor/OpenLiveDialogHandler.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.liveeditor;
-
-import javax.inject.Named;
-
-import org.eclipse.e4.core.contexts.ContextInjectionFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.core.di.annotations.Execute;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.e4.tools.emf.ui.internal.wbm.ApplicationModelEditor;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.services.IServiceConstants;
-import org.eclipse.e4.ui.services.IStylingEngine;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Shell;
-
-public class OpenLiveDialogHandler {
- private Shell shell;
-
- public OpenLiveDialogHandler() {
- System.err.println("Created Live Dialog Handler");
- }
-
- @Execute
- public void run(@Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
- IEclipseContext context, MApplication application, IStylingEngine engine) {
- if (this.shell == null || ! this.shell.isDisposed()) {
- try {
- shell = new Shell(shell.getDisplay(),SWT.ON_TOP|SWT.SHELL_TRIM);
- //FIXME Style
- shell.setBackground(shell.getDisplay().getSystemColor(SWT.COLOR_WHITE));
- FillLayout layout = new FillLayout();
- layout.marginHeight=10;
- layout.marginWidth=10;
- shell.setLayout(layout);
- final IEclipseContext childContext = context
- .createChild("EditorContext");
- MemoryModelResource resource = new MemoryModelResource(application);
- childContext.set(IModelResource.class, resource);
- childContext.set(Composite.class.getName(), shell);
- childContext.set(IModelResource.class, resource);
-
- ContextInjectionFactory.make(ApplicationModelEditor.class, childContext);
-
-// new ApplicationModelEditor(shell, childContext, resource, null);
- shell.open();
- shell.addDisposeListener(new DisposeListener() {
-
- public void widgetDisposed(DisposeEvent e) {
- childContext.dispose();
- }
- });
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.classpath b/bundles/org.eclipse.e4.tools.emf.ui/.classpath
deleted file mode 100644
index 64c5e31b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.project b/bundles/org.eclipse.e4.tools.emf.ui/.project
deleted file mode 100644
index b7697e08..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/.project
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.e4.tools.emf.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ds.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 118f2dfe..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,335 +0,0 @@
-#Mon Jun 21 15:26:11 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=warning
-org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
-org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=0
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 2e80c9eb..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,61 +0,0 @@
-#Sat Jun 26 16:51:30 CEST 2010
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_custom
-formatter_settings_version=11
-org.eclipse.jdt.ui.ignorelowercasenames=true
-org.eclipse.jdt.ui.importorder=;
-org.eclipse.jdt.ui.ondemandthreshold=99
-org.eclipse.jdt.ui.staticondemandthreshold=99
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=true
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=true
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=true
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=false
-sp_cleanup.organize_imports=true
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=true
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=false
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.core.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.core.prefs
deleted file mode 100644
index 497f55a6..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.core.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Sun Apr 18 16:26:38 CEST 2010
-eclipse.preferences.version=1
-pluginProject.extensions=true
-resolve.requirebundle=false
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index bd341a40..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,41 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.e4.tools.emf.ui;singleton:=true
-Bundle-Version: 0.9.0.qualifier
-Bundle-ClassPath: .
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Require-Bundle: org.eclipse.core.databinding;bundle-version="1.3.0",
- org.eclipse.core.databinding.property;bundle-version="1.2.100",
- org.eclipse.e4.ui.model.workbench;bundle-version="0.9.1",
- org.eclipse.emf.databinding;bundle-version="1.2.0",
- org.eclipse.jface.databinding;bundle-version="1.4.0",
- org.eclipse.jface;bundle-version="3.6.0",
- org.eclipse.emf.edit;bundle-version="2.6.0",
- org.eclipse.equinox.common;bundle-version="3.6.0",
- org.eclipse.emf.databinding.edit;bundle-version="1.2.0",
- org.eclipse.core.resources;bundle-version="3.6.0",
- org.eclipse.e4.core.services;bundle-version="0.9.1",
- org.eclipse.osgi;bundle-version="3.6.0",
- org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0",
- org.eclipse.e4.core.di;bundle-version="0.9.0",
- org.eclipse.e4.ui.workbench;bundle-version="0.9.1",
- org.eclipse.e4.ui.services;bundle-version="0.9.1",
- org.eclipse.equinox.registry;bundle-version="3.5.0",
- org.eclipse.e4.core.contexts;bundle-version="0.9.0",
- org.eclipse.e4.ui.di;bundle-version="0.9.0",
- javax.annotation;bundle-version="1.0.0"
-Bundle-ActivationPolicy: lazy
-Import-Package: javax.inject;version="1.0.0",
- org.eclipse.core.runtime.jobs,
- org.osgi.framework;version="1.5.0"
-Export-Package: org.eclipse.e4.tools.emf.ui.common,
- org.eclipse.e4.tools.emf.ui.common.component,
- org.eclipse.e4.tools.emf.ui.internal;x-internal:=true,
- org.eclipse.e4.tools.emf.ui.internal.common;x-internal:=true,
- org.eclipse.e4.tools.emf.ui.internal.common.component;x-internal:=true,
- org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs;x-internal:=true,
- org.eclipse.e4.tools.emf.ui.internal.wbm;x-friends:="org.eclipse.e4.tools.emf.editor"
-Service-Component: OSGI-INF/contributioncollector.xml
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/contributioncollector.xml b/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/contributioncollector.xml
deleted file mode 100644
index 42e124fe..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/contributioncollector.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.e4.tools.emf.ui">
- <implementation class="org.eclipse.e4.tools.emf.ui.internal.common.ClassContributionCollector"/>
- <reference bind="addContributor" cardinality="0..n" interface="org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider" name="IClassContributionProvider" policy="dynamic" unbind="removeContributor"/>
- <service>
- <provide interface="org.eclipse.e4.tools.emf.ui.internal.common.ClassContributionCollector"/>
- </service>
-</scr:component>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/about.html b/bundles/org.eclipse.e4.tools.emf.ui/about.html
deleted file mode 100644
index c1343aa3..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/about.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>December 3, 2009</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-<h3>Third Party Content</h3>
-
-<p>The Content includes items from third parties as set out below. If you did not
-receive this Content directly from the Eclipse Foundation, the following is provided for informational
-purposes only, and you should look to the Redistributor&rsquo;s license for terms and conditions of use.</p>
-
-<h4>Silk icon set Version 1.3</h4>
-<p>
-This plugin contains icons from the Silk icon set created by Mark James. The original files can
-be found at:
-<ul>
-<a href="http://www.famfamfam.com/lab/icons/silk/">http://www.famfamfam.com/lab/icons/silk/</a></ul>
-<p>The license can be found at:</p>
-<ul>
- <li><a href="http://creativecommons.org/licenses/by/2.5/">http://creativecommons.org/licenses/by/2.5/</a></li>
-</ul>
-
-</body>
-</html> \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/build.properties b/bundles/org.eclipse.e4.tools.emf.ui/build.properties
deleted file mode 100644
index 0ab8a444..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-bin.includes = .,\
- META-INF/,\
- plugin.properties,\
- icons/,\
- about.html,\
- OSGI-INF/contributioncollector.xml,\
- plugin.xml,\
- css/
-output.. = bin/
-jars.compile.order = .
-source.. = src/
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/css/default.css b/bundles/org.eclipse.e4.tools.emf.ui/css/default.css
deleted file mode 100644
index 2117aec7..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/css/default.css
+++ /dev/null
@@ -1,27 +0,0 @@
-.headerSectionContainer {
- background-color: gradient #575757 #101010 100%;
-}
-
-.sectionHeader {
- font-weight: bold;
- font-size: 15pt;
- color: white;
-}
-
-.subSectionHeader {
- background-color: gradient #575757 #101010 100%;
-}
-
-
-.contentContainer {
- background-color: #fff #fff #cccccc 20% 80%;
-}
-
-.formContainer {
- background-color: #fff;
-}
-
-/* SingleSourcing Container */
-.E4WorkbenchModelEditor {
- background-color: #fff;
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Addons.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Addons.png
deleted file mode 100644
index 3262767c..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Addons.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Application.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Application.png
deleted file mode 100644
index 3bc0bd32..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Application.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/BindingTable.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/BindingTable.png
deleted file mode 100644
index decac8a6..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/BindingTable.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Command.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Command.gif
deleted file mode 100644
index c3193fd9..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Command.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectMenuItem.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectMenuItem.gif
deleted file mode 100644
index 30dbf6b0..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectMenuItem.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectToolItem.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectToolItem.gif
deleted file mode 100644
index b225cd5e..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectToolItem.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledMenuItem.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledMenuItem.gif
deleted file mode 100644
index 710188a9..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledMenuItem.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledToolItem.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledToolItem.gif
deleted file mode 100644
index ac4ff211..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledToolItem.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Handler.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Handler.gif
deleted file mode 100644
index 57f41022..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Handler.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/KeyBinding.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/KeyBinding.gif
deleted file mode 100644
index d289b194..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/KeyBinding.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Menu.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Menu.gif
deleted file mode 100644
index 64173281..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Menu.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuContribution.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuContribution.gif
deleted file mode 100644
index 2b692560..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuContribution.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuItem.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuItem.gif
deleted file mode 100644
index b7c3c562..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuItem.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuSeparator.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuSeparator.gif
deleted file mode 100644
index 16d63ff2..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuSeparator.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ModelFragments.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ModelFragments.png
deleted file mode 100644
index 6187b15a..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ModelFragments.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Part.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Part.gif
deleted file mode 100644
index 610f5844..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Part.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartDescriptor.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartDescriptor.gif
deleted file mode 100644
index 7a31c506..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartDescriptor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer.gif
deleted file mode 100644
index bbbdd559..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer_vertical.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer_vertical.gif
deleted file mode 100644
index 013e818e..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartSashContainer_vertical.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartStack.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartStack.gif
deleted file mode 100644
index edd6060d..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PartStack.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Perspective.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Perspective.gif
deleted file mode 100644
index ba1a1998..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Perspective.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PerspectiveStack.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PerspectiveStack.gif
deleted file mode 100644
index 0624021b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/PerspectiveStack.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Placeholder.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Placeholder.gif
deleted file mode 100644
index 25c66a18..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Placeholder.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/StringModelFragment.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/StringModelFragment.png
deleted file mode 100644
index b6cb0ecf..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/StringModelFragment.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBar.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBar.gif
deleted file mode 100644
index 64173281..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBar.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarContribution.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarContribution.gif
deleted file mode 100644
index 59155918..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarContribution.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarSeparator.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarSeparator.gif
deleted file mode 100644
index 81d54f31..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolBarSeparator.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolControl.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolControl.gif
deleted file mode 100644
index 3e53cbdc..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ToolControl.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/TrimContribution.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/TrimContribution.gif
deleted file mode 100644
index 59155918..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/TrimContribution.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Window.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Window.gif
deleted file mode 100644
index 37aad784..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Window.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WindowTrim.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WindowTrim.gif
deleted file mode 100644
index 37aad784..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WindowTrim.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/EPackage.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/EPackage.gif
deleted file mode 100644
index 30c5c10c..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/EPackage.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_down.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_down.png
deleted file mode 100644
index 2c4e2793..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_down.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_up.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_up.png
deleted file mode 100644
index 1ebb1932..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/arrow_up.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/class_obj.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/class_obj.gif
deleted file mode 100644
index e4c2a836..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/class_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/field_public_obj.gif b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/field_public_obj.gif
deleted file mode 100644
index d4cb4254..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/field_public_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/headermenu.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/headermenu.png
deleted file mode 100644
index 45c29000..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/headermenu.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_add.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_add.png
deleted file mode 100644
index 2a3e5c4d..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_add.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_delete.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_delete.png
deleted file mode 100644
index b85916d9..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/table_delete.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/zoom.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/zoom.png
deleted file mode 100644
index 908612e3..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/obj16/zoom.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/fieldrefact_wiz.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/fieldrefact_wiz.png
deleted file mode 100644
index ff2dae47..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/fieldrefact_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/import_wiz.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/import_wiz.png
deleted file mode 100644
index 732631c0..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/import_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newclass_wiz.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newclass_wiz.png
deleted file mode 100644
index cc123864..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newclass_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newexp_wiz.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newexp_wiz.png
deleted file mode 100644
index a473ea86..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/newexp_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/typerefact_wiz.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/typerefact_wiz.png
deleted file mode 100644
index 6cd52a58..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/wizban/typerefact_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/plugin.properties b/bundles/org.eclipse.e4.tools.emf.ui/plugin.properties
deleted file mode 100644
index 14a799fb..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/plugin.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-
-# <copyright>
-# </copyright>
-#
-# $Id$
-
-pluginName = EMFUI Model
-providerName = www.example.org
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/plugin.xml b/bundles/org.eclipse.e4.tools.emf.ui/plugin.xml
deleted file mode 100644
index b3cd9703..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/plugin.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="org.eclipse.e4.tools.emf.ui.editors" name="Editors" schema="schema/org.eclipse.e4.tools.emf.ui.editors.exsd"/>
- <extension
- point="org.eclipse.e4.ui.css.swt.theme">
- <stylesheet
- uri="css/default.css">
- </stylesheet>
- </extension>
-
-</plugin>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/schema/org.eclipse.e4.tools.emf.ui.editors.exsd b/bundles/org.eclipse.e4.tools.emf.ui/schema/org.eclipse.e4.tools.emf.ui.editors.exsd
deleted file mode 100644
index 57b8c96b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/schema/org.eclipse.e4.tools.emf.ui.editors.exsd
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.e4.tools.emf.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.e4.tools.emf.ui" id="org.eclipse.e4.tools.emf.ui.editors" name="Editors"/>
- </appinfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="editor" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="virtualeditor" minOccurs="0" maxOccurs="unbounded"/>
- <element ref="editorfeature" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="editor">
- <complexType>
- <attribute name="descriptorClass" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.e4.tools.emf.ui.common.IEditorDescriptor"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="virtualeditor">
- <complexType>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn="org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor:"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="editorfeature">
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java" basedOn=":org.eclipse.e4.tools.emf.ui.common.IEditorFeature"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/EStackLayout.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/EStackLayout.java
deleted file mode 100644
index 2b3b836c..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/EStackLayout.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.common;
-
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.widgets.Composite;
-
-import org.eclipse.swt.custom.StackLayout;
-
-public class EStackLayout extends StackLayout {
- private boolean onlyVisible;
-
- public EStackLayout() {
- this(true);
- }
-
- public EStackLayout(boolean onlyVisible) {
- this.onlyVisible = onlyVisible;
- }
-
- @Override
- protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
- if( topControl != null && onlyVisible ) {
- int maxWidth = 0;
- int maxHeight = 0;
- Point size = topControl.computeSize(wHint, hHint, flushCache);
- maxWidth = Math.max(size.x, maxWidth);
- maxHeight = Math.max(size.y, maxHeight);
- int width = maxWidth + 2 * marginWidth;
- int height = maxHeight + 2 * marginHeight;
- if (wHint != SWT.DEFAULT) width = wHint;
- if (hHint != SWT.DEFAULT) height = hHint;
- return new Point(width, height);
- }
- return super.computeSize(composite, wHint, hHint, flushCache);
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java
deleted file mode 100644
index 53383e00..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.common;
-
-import org.eclipse.core.resources.IProject;
-
-public interface IClassContributionProvider {
- public class ContributionData {
- public final String bundleName;
- public final String className;
- public final String sourceType;
- public final String iconPath;
-
- public ContributionData(String bundleName, String className, String sourceType, String iconPath) {
- this.bundleName = bundleName;
- this.className = className;
- this.sourceType = sourceType;
- this.iconPath = iconPath;
- }
- }
-
- public class Filter {
- public final IProject project;
- public final String namePattern;
-
- public Filter(IProject project, String namePattern) {
- this.project = project;
- this.namePattern = namePattern;
- }
- }
-
- public interface ContributionResultHandler {
- public void result(ContributionData data);
- }
-
- public void findContribution(Filter filter, ContributionResultHandler handler);
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorDescriptor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorDescriptor.java
deleted file mode 100644
index de57bc4a..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorDescriptor.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.eclipse.e4.tools.emf.ui.common;
-
-import org.eclipse.emf.ecore.EClass;
-
-public interface IEditorDescriptor {
- public EClass getEClass();
- public Class<?> getEditorClass();
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorFeature.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorFeature.java
deleted file mode 100644
index cf0411f9..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IEditorFeature.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.eclipse.e4.tools.emf.ui.common;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-
-public interface IEditorFeature {
- public class FeatureClass {
- public final String label;
- public final EClass eClass;
-
- public FeatureClass(String label, EClass eClass) {
- this.label = label;
- this.eClass = eClass;
- }
- }
- public List<FeatureClass> getFeatureClasses(EClass eClass, EStructuralFeature feature);
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IModelResource.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IModelResource.java
deleted file mode 100644
index 4c5d0aca..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IModelResource.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.common;
-
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.emf.edit.domain.EditingDomain;
-
-public interface IModelResource {
- public IObservableList getRoot();
- public boolean isSaveable();
- public IStatus save();
- public EditingDomain getEditingDomain();
- public boolean isDirty();
-
- public void addModelListener(ModelListener listener);
- public void removeModelListener(ModelListener listener);
-
- public interface ModelListener {
- public void dirtyChanged();
- public void commandStackChanged();
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ISelectionProviderService.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ISelectionProviderService.java
deleted file mode 100644
index 3c1d3d5f..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ISelectionProviderService.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.eclipse.e4.tools.emf.ui.common;
-
-public interface ISelectionProviderService {
- public void setSelection(Object selection);
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ImageTooltip.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ImageTooltip.java
deleted file mode 100644
index 87251ca5..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/ImageTooltip.java
+++ /dev/null
@@ -1,192 +0,0 @@
-package org.eclipse.e4.tools.emf.ui.common;
-
-import java.io.FileNotFoundException;
-
-import java.text.DecimalFormat;
-
-import java.text.NumberFormat;
-
-import java.io.ByteArrayInputStream;
-
-import org.eclipse.swt.graphics.ImageData;
-
-import java.io.ByteArrayOutputStream;
-
-import org.eclipse.swt.layout.GridLayout;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.jface.resource.JFaceResources;
-
-import org.eclipse.swt.graphics.Image;
-
-import org.eclipse.swt.graphics.Font;
-
-import org.eclipse.swt.widgets.Label;
-
-import org.eclipse.swt.SWT;
-
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-
-import org.eclipse.swt.widgets.Control;
-
-import org.eclipse.jface.window.ToolTip;
-
-public abstract class ImageTooltip extends ToolTip {
- private Image image;
-
- public ImageTooltip(Control control) {
- super(control);
-
- }
-
- @Override
- protected boolean shouldCreateToolTip(Event event) {
- if( getImageURI() != null ) {
- return super.shouldCreateToolTip(event);
- }
- return false;
- }
-
- @Override
- protected Composite createToolTipContentArea(Event event, Composite parent) {
- clearResources();
- parent = new Composite(parent, SWT.NONE);
- parent.setBackground(event.widget.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
- parent.setBackgroundMode(SWT.INHERIT_DEFAULT);
- parent.setLayout(new GridLayout(2, false));
-
- URI uri = getImageURI();
-
- if( uri != null ) {
- int fileSize = -1;
- ByteArrayOutputStream out = null;
- InputStream stream = null;
- InputStream bStream = null;
- String errorMessage = "<Unknow Error>";
- try {
- URL url = new URL(uri.toString());
- stream = url.openStream();
-
- if( stream != null ) {
- out = new ByteArrayOutputStream();
- byte[] buf = new byte[1024];
- int length;
- while( ( length = stream.read(buf)) != -1 ) {
- out.write(buf,0,length);
- }
- fileSize = out.size();
- bStream = new ByteArrayInputStream(out.toByteArray());
- image = new Image(parent.getDisplay(),bStream);
- }
- } catch (MalformedURLException e) {
- errorMessage = e.getMessage();
- } catch (FileNotFoundException e) {
- if( uri.isPlatform() ) {
- errorMessage = "File '" + e.getMessage() + "' not found in bundle '"+uri.segment(1)+"'";
- } else {
- errorMessage = e.getMessage();
- }
- } catch (IOException e) {
- errorMessage = e.getMessage();
- } catch(Exception e) {
- errorMessage = e.getMessage();
- }finally {
- if(out != null) {
- try {
- out.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- if( bStream != null ) {
- try {
- bStream.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- if( stream != null ) {
- try {
- stream.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
- // ---------------------------------
- Label l = new Label(parent, SWT.NONE);
- l.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
- l.setText("Icon:");
-
- l = new Label(parent,SWT.NONE);
- if( image == null ) {
- System.err.println(errorMessage);
- l.setText(errorMessage);
- } else {
- l.setImage(image);
- }
-
- // ---------------------------------
-
- l = new Label(parent, SWT.NONE);
- l.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
- l.setText("Name:");
-
- l = new Label(parent,SWT.NONE);
- l.setText(uri.lastSegment());
-
- // ---------------------------------
-
- l = new Label(parent, SWT.NONE);
- l.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
- l.setText("Dimensions:");
-
- l = new Label(parent,SWT.NONE);
- if( image != null ) {
- l.setText(image.getBounds().width + "x" + image.getBounds().height+" px");
- } else {
- l.setText("0x0 px");
- }
-
-
- // ---------------------------------
-
- l = new Label(parent, SWT.NONE);
- l.setFont(JFaceResources.getFontRegistry().getBold(JFaceResources.DIALOG_FONT));
- l.setText("File-Size:");
-
- l = new Label(parent,SWT.NONE);
- l.setText( new DecimalFormat("#,##0.00").format((fileSize / 1024.0)) + "KB" );
- }
-
- return parent;
- }
-
- @Override
- protected void afterHideToolTip(Event event) {
- super.afterHideToolTip(event);
- clearResources();
- }
-
- protected abstract URI getImageURI();
-
- private void clearResources() {
- if( image != null ) {
- image.dispose();
- image = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java
deleted file mode 100644
index 19d535ce..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.e4.tools.emf.ui.common;
-
-import org.eclipse.e4.ui.model.fragment.impl.FragmentPackageImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-public class Util {
- public static final boolean isNullOrEmpty(String element) {
- return element == null || element.trim().length() == 0;
- }
-
- public static final boolean isImport(EObject object) {
- return object.eContainingFeature() == FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS;
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java
deleted file mode 100644
index aa8bae4b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.common;
-
-import java.util.ArrayList;
-import java.util.EventObject;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.e4.ui.internal.workbench.E4XMIResourceFactory;
-import org.eclipse.emf.common.command.BasicCommandStack;
-import org.eclipse.emf.common.command.CommandStackListener;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-
-@SuppressWarnings("restriction")
-public class XMIModelResource implements IModelResource {
- private EditingDomain editingDomain;
- private Resource resource;
- private List<ModelListener> listeners = new ArrayList<IModelResource.ModelListener>();
- private boolean dirty;
-
-
- public XMIModelResource(URI uri) {
- ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(
- ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- ResourceSet resourceSet = new ResourceSetImpl();
- BasicCommandStack commandStack = new BasicCommandStack();
- commandStack.addCommandStackListener(new CommandStackListener() {
-
- public void commandStackChanged(EventObject event) {
- dirty = true;
- fireDirtyChanged();
- fireCommandStackChanged();
- }
- });
- editingDomain = new AdapterFactoryEditingDomain(adapterFactory,
- commandStack, resourceSet);
- resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()
- .put(Resource.Factory.Registry.DEFAULT_EXTENSION,
- new E4XMIResourceFactory());
- resource = resourceSet.getResource(uri, true);
- }
-
- public IObservableList getRoot() {
- WritableList list = new WritableList();
- list.add(resource.getContents().get(0));
- return list;
- }
-
- public EditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- public boolean isSaveable() {
- return true;
- }
-
- public void addModelListener(ModelListener listener) {
- listeners.add(listener);
- }
-
- public void removeModelListener(ModelListener listener) {
- listeners.remove(listener);
- }
-
- public boolean isDirty() {
- return dirty && getEditingDomain().getCommandStack().canUndo();
- }
-
- private void fireDirtyChanged() {
- for( ModelListener listener : listeners ) {
- listener.dirtyChanged();
- }
- }
-
- private void fireCommandStackChanged() {
- for( ModelListener listener : listeners ) {
- listener.commandStackChanged();
- }
- }
-
- public IStatus save() {
- Map<String, String> map = new HashMap<String, String>();
- try {
- resource.save(map);
- editingDomain.getCommandStack().flush();
- dirty = false;
- fireDirtyChanged();
- fireCommandStackChanged();
- } catch (Exception e) {
- // TODO: handle exception
- e.printStackTrace();
- }
-
- return Status.OK_STATUS;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java
deleted file mode 100644
index 5ca17b80..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/AbstractComponentEditor.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.common.component;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-
-public abstract class AbstractComponentEditor {
- private EditingDomain editingDomain;
-
- private static Map<Integer, Image> IMAGE_MAP = new HashMap<Integer, Image>();
- private static final String[] IMAGES = { "/icons/full/obj16/zoom.png", //$NON-NLS-1$
- "/icons/full/obj16/table_add.png", //$NON-NLS-1$
- "/icons/full/obj16/table_delete.png", //$NON-NLS-1$
- "/icons/full/obj16/arrow_up.png", //$NON-NLS-1$
- "/icons/full/obj16/arrow_down.png" //$NON-NLS-1$
- };
-
- private WritableValue master = new WritableValue();
-
- public static final int SEARCH_IMAGE = 0;
- public static final int TABLE_ADD_IMAGE = 1;
- public static final int TABLE_DELETE_IMAGE = 2;
- public static final int ARROW_UP = 3;
- public static final int ARROW_DOWN = 4;
-
- protected static final int VERTICAL_LIST_WIDGET_INDENT = 10;
-
- private ModelEditor editor;
-
- public AbstractComponentEditor(EditingDomain editingDomain, ModelEditor editor) {
- this.editingDomain = editingDomain;
- this.editor = editor;
- }
-
- public EditingDomain getEditingDomain() {
- return editingDomain;
- }
-
- public ModelEditor getEditor() {
- return editor;
- }
-
- public WritableValue getMaster() {
- return master;
- }
-
- public Image getImage(Display d, int id) {
- Image img = IMAGE_MAP.get(id);
- if (img == null) {
- try {
- InputStream in = AbstractComponentEditor.class.getClassLoader().getResourceAsStream(IMAGES[id]);
- img = new Image(d, in);
- IMAGE_MAP.put(id, img);
- in.close();
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return img;
- }
-
- public abstract Image getImage(Object element, Display display);
-
- public abstract String getLabel(Object element);
-
- public abstract String getDetailLabel(Object element);
-
- public abstract String getDescription(Object element);
-
- public abstract Composite getEditor(Composite parent, Object object);
-
- public abstract IObservableList getChildList(Object element);
-
- protected Image loadSharedImage(Display d, URL path) {
- try {
- URL url = FileLocator.resolve(path);
- if (url != null) {
- InputStream in = url.openStream();
- Image image = new Image(d, in);
- in.close();
- return image;
- }
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- return null;
- }
-
- public FeaturePath[] getLabelProperties() {
- return new FeaturePath[] {};
- }
-
- public List<Action> getActions(Object element) {
- return Collections.emptyList();
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java
deleted file mode 100644
index 1460779f..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java
+++ /dev/null
@@ -1,359 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages {
- public static String AbstractCommandSelectionDialog_Label_CommandId;
-
- public static String ApplicationEditor_Label;
- public static String ApplicationEditor_Description;
- public static String ApplicationEditor_Id;
- public static String ApplicationEditor_Handlers;
- public static String ApplicationEditor_PartDescriptors;
- public static String ApplicationEditor_BindingTables;
- public static String ApplicationEditor_Commands;
- public static String ApplicationEditor_Windows;
- public static String ApplicationEditor_Addons;
- public static String ApplicationEditor_MenuContributions;
- public static String ApplicationEditor_ToolBarContributions;
- public static String ApplicationEditor_TrimContributions;
-
- public static String BindingTableEditor_Label;
- public static String BindingTableEditor_Description;
- public static String BindingTableEditor_Id;
- public static String BindingTableEditor_ContextId;
- public static String BindingTableEditor_Find;
- public static String BindingTableEditor_Keybindings;
- public static String BindingTableEditor_KeySequence;
- public static String BindingTableEditor_Command;
- public static String BindingTableEditor_Up;
- public static String BindingTableEditor_Down;
- public static String BindingTableEditor_Add;
- public static String BindingTableEditor_Remove;
-
- public static String CommandEditor_Label;
- public static String CommandEditor_Description;
- public static String CommandEditor_Id;
- public static String CommandEditor_Name;
- public static String CommandEditor_LabelDescription;
- public static String CommandEditor_Parameters;
- public static String CommandEditor_ParameterName;
- public static String CommandEditor_ParameterTypeId;
- public static String CommandEditor_ParameterOptional;
- public static String CommandEditor_ParameterOptional_No;
- public static String CommandEditor_ParameterOptional_Yes;
- public static String CommandEditor_Up;
- public static String CommandEditor_Down;
- public static String CommandEditor_Add;
- public static String CommandEditor_Remove;
- public static String CommandEditor_ParameterId;
-
- public static String DirectMenuItemEditor_Label;
- public static String DirectMenuItemEditor_Description;
- public static String DirectMenuItemEditor_ClassURI;
- public static String DirectMenuItemEditor_Find;
-
- public static String ControlFactory_BindingContexts;
- public static String ControlFactory_Add;
- public static String ControlFactory_Up;
- public static String ControlFactory_Down;
- public static String ControlFactory_Remove;
- public static String ControlFactory_Tags;
- public static String ControlFactory_Key;
- public static String ControlFactory_Value;
- public static String ControlFactory_ContextVariables;
- public static String ControlFactory_AddNoEllipse;
-
- public static String DirectToolItemEditor_ClassURI;
- public static String DirectToolItemEditor_Find;
- public static String DirectToolItemEditor_Label;
- public static String DirectToolItemEditor_Description;
-
- public static String HandledMenuItemEditor_Label;
- public static String HandledMenuItemEditor_Description;
- public static String HandledMenuItemEditor_Command;
- public static String HandledMenuItemEditor_Find;
- public static String HandledMenuItemEditor_Parameters;
- public static String HandledMenuItemEditor_Tag;
- public static String HandledMenuItemEditor_Value;
- public static String HandledMenuItemEditor_Up;
- public static String HandledMenuItemEditor_Down;
- public static String HandledMenuItemEditor_Add;
- public static String HandledMenuItemEditor_Remove;
-
- public static String HandledToolItemEditor_Command;
- public static String HandledToolItemEditor_Find;
- public static String HandledToolItemEditor_Parameters;
- public static String HandledToolItemEditor_ParametersName;
- public static String HandledToolItemEditor_ParametersValue;
- public static String HandledToolItemEditor_Up;
- public static String HandledToolItemEditor_Down;
- public static String HandledToolItemEditor_Add;
- public static String HandledToolItemEditor_Remove;
- public static String HandledToolItemEditor_Label;
- public static String HandledToolItemEditor_Description;
-
- public static String HandlerEditor_Label;
- public static String HandlerEditor_Description;
- public static String HandlerEditor_Id;
- public static String HandlerEditor_Command;
- public static String HandlerEditor_Find;
- public static String HandlerEditor_ClassURI;
-
- public static String InputPartEditor_Label;
- public static String InputPartEditor_InputURI;
-
- public static String KeyBindingEditor_Label;
- public static String KeyBindingEditor_Description;
- public static String KeyBindingEditor_Id;
- public static String KeyBindingEditor_Sequence;
- public static String KeyBindingEditor_Command;
- public static String KeyBindingEditor_Find;
- public static String KeyBindingEditor_Parameters;
- public static String KeyBindingEditor_ParametersKey;
- public static String KeyBindingEditor_ParametersValue;
- public static String KeyBindingEditor_Up;
- public static String KeyBindingEditor_Down;
- public static String KeyBindingEditor_Add;
- public static String KeyBindingEditor_Remove;
-
- public static String MenuEditor_Label;
- public static String MenuEditor_Description;
- public static String MenuEditor_Id;
- public static String MenuEditor_MenuItems;
- public static String MenuEditor_MenuItemType;
- public static String MenuEditor_MenuItemItemType;
- public static String MenuEditor_Up;
- public static String MenuEditor_Down;
- public static String MenuEditor_HandledMenuItem;
- public static String MenuEditor_Separator;
- public static String MenuEditor_Menu;
- public static String MenuEditor_DirectMenuItem;
- public static String MenuEditor_Remove;
- public static String MenuEditor_LabelLabel;
- public static String MenuEditor_Tooltip;
- public static String MenuEditor_IconURI;
-
- public static String MenuItemEditor_Id;
- public static String MenuItemEditor_Type;
- public static String MenuItemEditor_Label;
- public static String MenuItemEditor_Tooltip;
- public static String MenuItemEditor_IconURI;
- public static String MenuItemEditor_Find;
- public static String MenuEditor_MainMenu;
-
- public static String MenuSeparatorEditor_Label;
- public static String MenuSeparatorEditor_Id;
-
- public static String ModelComponentEditor_Id;
- public static String ModelComponentEditor_ParentId;
- public static String ModelComponentEditor_Find;
- public static String ModelComponentEditor_PositionInParent;
- public static String ModelComponentEditor_Processor;
- public static String ModelComponentEditor_Tags;
- public static String ModelComponentEditor_Label;
- public static String ModelComponentEditor_Description;
- public static String ModelComponentEditor_Handlers;
- public static String ModelComponentEditor_BindingTables;
- public static String ModelComponentEditor_KeyBindings;
- public static String ModelComponentEditor_Commands;
- public static String ModelComponentEditor_Menus;
- public static String ModelComponentEditor_UiChildren;
- public static String ModelComponentEditor_PartDescriptors;
- public static String ModelComponentEditor_DetailParentId;
- public static String ModelComponentEditor_MenuContributions;
-
- public static String ModelComponentsEditor_Label;
- public static String ModelComponentsEditor_Description;
- public static String ModelComponentsEditor_ModelContributions;
- public static String ModelComponentsEditor_Up;
- public static String ModelComponentsEditor_Down;
- public static String ModelComponentsEditor_Add;
- public static String ModelComponentsEditor_Remove;
-
- public static String PartDescriptorEditor_Label;
- public static String PartDescriptorEditor_Descriptor;
- public static String PartDescriptorEditor_Id;
- public static String PartDescriptorEditor_LabelLabel;
- public static String PartDescriptorEditor_Tooltip;
- public static String PartDescriptorEditor_IconURI;
- public static String PartDescriptorEditor_Find;
- public static String PartDescriptorEditor_ClassURI;
- public static String PartDescriptorEditor_Dirtyable;
- public static String PartDescriptorEditor_Closeable;
- public static String PartDescriptorEditor_Multiple;
- public static String PartDescriptorEditor_Category;
- public static String PartDescriptorEditor_PersitedState;
- public static String PartDescriptorEditor_PersitedStateKey;
- public static String PartDescriptorEditor_PersitedStateValue;
- public static String PartDescriptorEditor_Add;
- public static String PartDescriptorEditor_Remove;
- public static String PartDescriptorEditor_Variables;
- public static String PartDescriptorEditor_Properties;
- public static String PartDescriptorEditor_PropertiesKey;
- public static String PartDescriptorEditor_PropertiesValue;
- public static String PartDescriptorEditor_Menus;
- public static String PartDescriptorEditor_Handlers;
- public static String PartDescriptorEditor_ContainerData;
-
- public static String PartEditor_Label;
- public static String PartEditor_Description;
- public static String PartEditor_Id;
- public static String PartEditor_LabelLabel;
- public static String PartEditor_Tooltip;
- public static String PartEditor_IconURI;
- public static String PartEditor_Find;
- public static String PartEditor_ClassURI;
- public static String PartEditor_Closeable;
- public static String PartEditor_PersitedState;
- public static String PartEditor_PersitedStateKey;
- public static String PartEditor_PersitedStateValue;
- public static String PartEditor_Add;
- public static String PartEditor_Remove;
- public static String PartEditor_Menus;
- public static String PartEditor_Handlers;
- public static String PartEditor_ContainerData;
- public static String PartEditor_ToolBar;
-
- public static String PartSashContainerEditor_Label;
- public static String PartSashContainerEditor_Description;
- public static String PartSashContainerEditor_Id;
- public static String PartSashContainerEditor_Orientation;
- public static String PartSashContainerEditor_Vertical;
- public static String PartSashContainerEditor_Horizontal;
- public static String PartSashContainerEditor_SelectedElement;
- public static String PartSashContainerEditor_Controls;
- public static String PartSashContainerEditor_Up;
- public static String PartSashContainerEditor_Down;
- public static String PartSashContainerEditor_Remove;
- public static String PartSashContainerEditor_ContainerData;
-
- public static String PartStackEditor_Label;
- public static String PartStackEditor_Description;
- public static String PartStackEditor_Id;
- public static String PartStackEditor_SelectedElement;
- public static String PartStackEditor_Parts;
- public static String PartStackEditor_Up;
- public static String PartStackEditor_Down;
- public static String PartStackEditor_Remove;
- public static String PartStackEditor_ContainerData;
- public static String PerspectiveStackEditor_Add;
-
- public static String PerspectiveEditor_Label;
- public static String PerspectiveEditor_Description;
- public static String PerspectiveEditor_Id;
- public static String PerspectiveEditor_LabelLabel;
- public static String PerspectiveEditor_SelectedElement;
- public static String PerspectiveEditor_Tooltip;
- public static String PerspectiveEditor_IconURI;
- public static String PerspectiveEditor_Find;
- public static String PerspectiveEditor_Controls;
- public static String PerspectiveEditor_Up;
- public static String PerspectiveEditor_Down;
- public static String PerspectiveEditor_Remove;
-
- public static String PerspectiveStackEditor_Perspectives;
- public static String PerspectiveStackEditor_Label;
- public static String PerspectiveStackEditor_Description;
- public static String PerspectiveStackEditor_Id;
- public static String PerspectiveStackEditor_SelectedElement;
-
- public static String PlaceholderEditor_Label;
- public static String PlaceholderEditor_Descriptor;
- public static String PlaceholderEditor_Id;
- public static String PlaceholderEditor_FindReference;
-
- public static String ToolBarEditor_Label;
- public static String ToolBarEditor_Description;
- public static String ToolBarEditor_Id;
- public static String ToolBarEditor_ToolbarItems;
- public static String ToolBarEditor_ToolbarItemsType;
- public static String ToolBarEditor_ToolbarItemsItemType;
- public static String ToolBarEditor_Up;
- public static String ToolBarEditor_Down;
- public static String ToolBarEditor_HandledToolItem;
- public static String ToolBarEditor_DirectToolItem;
- public static String ToolBarEditor_ToolControl;
- public static String ToolBarEditor_Separator;
- public static String ToolBarEditor_Remove;
-
- public static String ToolBarSeparatorEditor_Label;
- public static String ToolBarSeparatorEditor_Id;
-
- public static String ToolControlEditor_Label;
- public static String ToolControlEditor_Description;
- public static String ToolControlEditor_Id;
- public static String ToolControlEditor_ClassURI;
-
- public static String VBindingTableEditor_Label;
- public static String VBindingTableEditor_Description;
- public static String VBindingTableEditor_Contexts;
- public static String VBindingTableEditor_Name;
- public static String VBindingTableEditor_LabelDescription;
- public static String VBindingTableEditor_Id;
- public static String VBindingTableEditor_Up;
- public static String VBindingTableEditor_Down;
- public static String VBindingTableEditor_Add;
- public static String VBindingTableEditor_Remove;
-
- public static String AddonsEditor_Id;
- public static String AddonsEditor_ClassURI;
- public static String AddonsEditor_Find;
-
- public static String ContributionClassDialog_DialogMessage;
- public static String ContributionClassDialog_DialogTitle;
- public static String ContributionClassDialog_Label_Classname;
- public static String ContributionClassDialog_ShellTitle;
-
- public static String MenuContributionEditor_Id;
- public static String MenuContributionEditor_MenuItems;
- public static String MenuContributionEditor_MenuItemType;
- public static String MenuContributionEditor_MenuItemItemType;
- public static String MenuContributionEditor_Up;
- public static String MenuContributionEditor_Down;
- public static String MenuContributionEditor_HandledMenuItem;
- public static String MenuContributionEditor_Separator;
- public static String MenuContributionEditor_Menu;
- public static String MenuContributionEditor_DirectMenuItem;
- public static String MenuContributionEditor_Remove;
- public static String MenuContributionEditor_ParentId;
- public static String MenuContributionEditor_Position;
-
- public static String ModelFragmentsEditor_ModelFragments;
- public static String ModelFragmentsEditor_Up;
- public static String ModelFragmentsEditor_Down;
- public static String ModelFragmentsEditor_Add;
- public static String ModelFragmentsEditor_Remove;
- public static String ModelFragmentsEditor_Label;
- public static String ModelFragmentsEditor_Description;
-
- public static String StringModelFragment_Label;
- public static String StringModelFragment_Description;
- public static String StringModelFragment_Featurename;
- public static String StringModelFragment_ParentId;
- public static String StringModelFragment_PositionInList;
- public static String StringModelFragment_Up;
- public static String StringModelFragment_Down;
- public static String StringModelFragment_Remove;
- public static String StringModelFragment_Elements;
- public static String StringModelFragment_Find;
-
- public static String FeatureSelectionDialog_Filter;
- public static String FeatureSelectionDialog_ShellTitle;
- public static String FeatureSelectionDialog_DialogTitle;
- public static String FeatureSelectionDialog_DialogMessage;
-
- static {
- NLS.initializeMessages(Messages.class.getName(), Messages.class);
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties
deleted file mode 100644
index efb9a055..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties
+++ /dev/null
@@ -1,351 +0,0 @@
-# ******************************************************************************
-# * Copyright (c) 2010 BestSolution.at 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:
-# * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
-# ******************************************************************************
-AbstractCommandSelectionDialog_Label_CommandId=Command-Id
-
-ApplicationEditor_Label=Application
-ApplicationEditor_Description=Application bla, bla, bla
-ApplicationEditor_Id=Id
-ApplicationEditor_Handlers=Handlers
-ApplicationEditor_PartDescriptors=Part Descriptors
-ApplicationEditor_BindingTables=BindingTables
-ApplicationEditor_Commands=Commands
-ApplicationEditor_Windows=Windows
-ApplicationEditor_Addons=Addons
-ApplicationEditor_MenuContributions=Menu Contributions
-ApplicationEditor_ToolBarContributions=Toolbar Contributions
-ApplicationEditor_TrimContributions=Trim Contributions
-
-BindingTableEditor_Label=BindingTable
-BindingTableEditor_Description=BindingTable bla bla bla
-BindingTableEditor_Id=Id
-BindingTableEditor_ContextId=Context Id
-BindingTableEditor_Find=Find ...
-BindingTableEditor_Keybindings=Keybindings
-BindingTableEditor_KeySequence=KeySequence
-BindingTableEditor_Command=Command
-BindingTableEditor_Up=Up
-BindingTableEditor_Down=Down
-BindingTableEditor_Add=Add ...
-BindingTableEditor_Remove=Remove
-
-CommandEditor_Label=Command
-CommandEditor_Description=Command bla bla bla
-CommandEditor_Id=Id
-CommandEditor_Name=Name
-CommandEditor_LabelDescription=Description
-CommandEditor_Parameters=Parameters
-CommandEditor_ParameterName=Name
-CommandEditor_ParameterTypeId=Type-Id
-CommandEditor_ParameterOptional=Optional
-CommandEditor_ParameterOptional_Yes=yes
-CommandEditor_ParameterOptional_No=no
-CommandEditor_Up=Up
-CommandEditor_Down=Down
-CommandEditor_Add=Add ...
-CommandEditor_Remove=Remove
-CommandEditor_ParameterId=Id
-
-DirectMenuItemEditor_Label=DirectMenuItem
-DirectMenuItemEditor_Description=DirectMenuItem bla bla bla
-DirectMenuItemEditor_ClassURI=Class URI
-DirectMenuItemEditor_Find=Find ...
-
-ControlFactory_BindingContexts=Binding Contexts
-ControlFactory_Add=Add ...
-ControlFactory_Up=Up
-ControlFactory_Down=Down
-ControlFactory_Remove=Remove
-ControlFactory_Tags=Tags
-ControlFactory_Key=Key
-ControlFactory_Value=Value
-ControlFactory_ContextVariables=Context Variables
-ControlFactory_AddNoEllipse=Add
-
-DirectToolItemEditor_ClassURI=Class URI
-DirectToolItemEditor_Find=Find ...
-DirectToolItemEditor_Label=Direct Tool Item
-DirectToolItemEditor_Description=Direct Tool Item bla bla bla
-
-HandledMenuItemEditor_Label=HandledMenuItem
-HandledMenuItemEditor_Description=HandledMenuItem bla bla bla
-HandledMenuItemEditor_Command=Command
-HandledMenuItemEditor_Find=Find ...
-HandledMenuItemEditor_Parameters=Parameters
-HandledMenuItemEditor_Tag=Name
-HandledMenuItemEditor_Value=Value
-HandledMenuItemEditor_Up=Up
-HandledMenuItemEditor_Down=Down
-HandledMenuItemEditor_Add=Add ...
-HandledMenuItemEditor_Remove=Remove
-
-HandledToolItemEditor_Command=Command
-HandledToolItemEditor_Find=Find ...
-HandledToolItemEditor_Parameters=Parameters
-HandledToolItemEditor_ParametersName=Name
-HandledToolItemEditor_ParametersValue=Value
-HandledToolItemEditor_Up=Up
-HandledToolItemEditor_Down=Down
-HandledToolItemEditor_Add=Add ...
-HandledToolItemEditor_Remove=Remove
-HandledToolItemEditor_Label=Handled Tool Item
-HandledToolItemEditor_Description=Handled Tool Item bla bla bla
-
-HandlerEditor_Label=Handler
-HandlerEditor_Description=Handler bla bla bla
-HandlerEditor_Id=Id
-HandlerEditor_Command=Command
-HandlerEditor_Find=Find ...
-HandlerEditor_ClassURI=Class URI
-
-InputPartEditor_Label=InputPart
-InputPartEditor_InputURI=Input URI
-
-KeyBindingEditor_Label=Binding
-KeyBindingEditor_Description=Binding bla bla bla
-KeyBindingEditor_Id=Id
-KeyBindingEditor_Sequence=Sequence
-KeyBindingEditor_Command=Command
-KeyBindingEditor_Find=Find ...
-KeyBindingEditor_Parameters=Parameters
-KeyBindingEditor_ParametersKey=Key
-KeyBindingEditor_ParametersValue=Value
-KeyBindingEditor_Up=Up
-KeyBindingEditor_Down=Down
-KeyBindingEditor_Add=Add ...
-KeyBindingEditor_Remove=Remove
-
-MenuEditor_Label=Menu
-MenuEditor_Description=Menu bla bla bla
-MenuEditor_Id=Id
-MenuEditor_MenuItems=MenuItems
-MenuEditor_MenuItemType=Type
-MenuEditor_MenuItemItemType=Item Type
-MenuEditor_Up=Up
-MenuEditor_Down=Down
-MenuEditor_HandledMenuItem=Handled MenuItem
-MenuEditor_Separator=Separator
-MenuEditor_Menu=Menu
-MenuEditor_Remove=Remove
-MenuEditor_DirectMenuItem=Direct MenuItem
-MenuEditor_LabelLabel=Label
-MenuEditor_Tooltip=Tooltip
-MenuEditor_IconURI=Icon URI
-MenuEditor_MainMenu=Main Menu
-
-MenuItemEditor_Id=Id
-MenuItemEditor_Type=Type
-MenuItemEditor_Label=Label
-MenuItemEditor_Tooltip=Tooltip
-MenuItemEditor_IconURI=Icon URI
-MenuItemEditor_Find=Find ...
-
-
-MenuSeparatorEditor_Label=Separator
-MenuSeparatorEditor_Id=Id
-
-ModelComponentEditor_Id=Id
-ModelComponentEditor_ParentId=Parent-Id
-ModelComponentEditor_Find=Find ...
-ModelComponentEditor_PositionInParent=Position in Parent
-ModelComponentEditor_Processor=Processor
-ModelComponentEditor_Tags=Tags
-ModelComponentEditor_Label=Model Component
-ModelComponentEditor_Description=The model component ... bla bla bla
-ModelComponentEditor_Handlers=Handlers
-ModelComponentEditor_BindingTables=BindingTables
-ModelComponentEditor_KeyBindings=KeyBindings
-ModelComponentEditor_Commands=Commands
-ModelComponentEditor_Menus=Menus
-ModelComponentEditor_UiChildren=UI-Children
-ModelComponentEditor_PartDescriptors=PartDescriptors
-ModelComponentEditor_DetailParentId=parentId
-ModelComponentEditor_MenuContributions=MenuContributions
-
-ModelComponentsEditor_Label=Model Components
-ModelComponentsEditor_Description=Some bla bla bla bla
-ModelComponentsEditor_ModelContributions=Model Contributions
-ModelComponentsEditor_Up=Up
-ModelComponentsEditor_Down=Down
-ModelComponentsEditor_Add=Add
-ModelComponentsEditor_Remove=Remove
-
-PartDescriptorEditor_Label=PartDescriptor
-PartDescriptorEditor_Descriptor=PartDescriptor Bla Bla Bla Bla
-PartDescriptorEditor_Id=Id
-PartDescriptorEditor_LabelLabel=Label
-PartDescriptorEditor_Tooltip=Tooltip
-PartDescriptorEditor_IconURI=Icon URI
-PartDescriptorEditor_Find=Find ...
-PartDescriptorEditor_ClassURI=Class URI
-PartDescriptorEditor_Dirtyable=Dirtyable
-PartDescriptorEditor_Closeable=Closeable
-PartDescriptorEditor_Multiple=Multiple
-PartDescriptorEditor_Category=Category
-PartDescriptorEditor_PersitedState=Persited State
-PartDescriptorEditor_PersitedStateKey=Key
-PartDescriptorEditor_PersitedStateValue=Value
-PartDescriptorEditor_Add=Add ...
-PartDescriptorEditor_Remove=Remove
-PartDescriptorEditor_Variables=Variables
-PartDescriptorEditor_Properties=Properties
-PartDescriptorEditor_PropertiesKey=Key
-PartDescriptorEditor_PropertiesValue=Value
-PartDescriptorEditor_Menus=Menus
-PartDescriptorEditor_Handlers=Handlers
-PartDescriptorEditor_ContainerData=Container Data
-
-PartEditor_Label=Part
-PartEditor_Description=Part Bla Bla Bla Bla
-PartEditor_Id=Id
-PartEditor_LabelLabel=Label
-PartEditor_Tooltip=Tooltip
-PartEditor_IconURI=Icon URI
-PartEditor_Find=Find ...
-PartEditor_ClassURI=Class URI
-PartEditor_Closeable=Closeable
-PartEditor_PersitedState=Persisted State
-PartEditor_PersitedStateKey=Key
-PartEditor_PersitedStateValue=Value
-PartEditor_Add=Add ...
-PartEditor_Remove=Remove
-PartEditor_Menus=Menus
-PartEditor_Handlers=Handlers
-PartEditor_ToolBar=ToolBar
-
-PartSashContainerEditor_Label=Sash
-PartSashContainerEditor_Description=Sash bla bla bla
-PartSashContainerEditor_Id=Id
-PartSashContainerEditor_Orientation=Orientation
-PartSashContainerEditor_Vertical=Vertical
-PartSashContainerEditor_Horizontal=Horizontal
-PartSashContainerEditor_SelectedElement=Selected Element
-PartSashContainerEditor_Controls=Controls
-PartSashContainerEditor_Up=Up
-PartSashContainerEditor_Down=Down
-PartSashContainerEditor_Remove=Remove
-PartSashContainerEditor_ContainerData=Container Data
-
-PartStackEditor_Label=Part Stack
-PartStackEditor_Description=Stack bla bla bla
-PartStackEditor_Id=Id
-PartStackEditor_SelectedElement=Selected Element
-PartStackEditor_Parts=Parts
-PartStackEditor_Up=Up
-PartStackEditor_Down=Down
-PartStackEditor_Remove=Remove
-PartStackEditor_ContainerData=Container Data
-
-PerspectiveEditor_Label=Perspective
-PerspectiveEditor_Description=Perspective Bla Bla Bla
-PerspectiveEditor_Id=Id
-PerspectiveEditor_LabelLabel=Label
-PerspectiveEditor_SelectedElement=Selected Element
-PerspectiveEditor_Label=Label
-PerspectiveEditor_Tooltip=Tooltip
-PerspectiveEditor_IconURI=Icon URI
-PerspectiveEditor_Find=Find ...
-PerspectiveEditor_Controls=Controls
-PerspectiveEditor_Up=Up
-PerspectiveEditor_Down=Down
-PerspectiveEditor_Remove=Remove
-PartEditor_ContainerData=Container Data
-
-PerspectiveStackEditor_Label=Perspective Stack
-PerspectiveStackEditor_Description=Perspective Stack Bla Bla Bla
-PerspectiveStackEditor_Id=Id
-PerspectiveStackEditor_SelectedElement=Selected Element
-PerspectiveStackEditor_Perspectives=Perspectives
-PerspectiveStackEditor_Add=Add ...
-
-PlaceholderEditor_Label=Placeholder
-PlaceholderEditor_Descriptor=Placeholder Bla Bla Bla Bla
-PlaceholderEditor_Id=Id
-PlaceholderEditor_FindReference=Find ...
-
-ToolBarEditor_Label=Toolbar
-ToolBarEditor_Description=Toolbar bla bla bla
-ToolBarEditor_Id=Id
-ToolBarEditor_ToolbarItems=Toolbar Items
-ToolBarEditor_ToolbarItemsType=Type
-ToolBarEditor_ToolbarItemsItemType=Item-Type
-ToolBarEditor_Up=Up
-ToolBarEditor_Down=Down
-ToolBarEditor_HandledToolItem=Handled ToolItem
-ToolBarEditor_DirectToolItem=Direct ToolItem
-ToolBarEditor_ToolControl=Tool Control
-ToolBarEditor_Separator=Separator
-ToolBarEditor_Remove=Remove
-
-ToolBarSeparatorEditor_Label=Separator
-ToolBarSeparatorEditor_Id=Id
-
-ToolControlEditor_Label=ToolControl
-ToolControlEditor_Description=ToolControl bla bla bla
-ToolControlEditor_Id=Id
-ToolControlEditor_ClassURI=Class URI
-
-VBindingTableEditor_Label=Binding Configuration
-VBindingTableEditor_Description=Binding Configuration Bla Bla Bla Bla
-VBindingTableEditor_Contexts=Contexts
-VBindingTableEditor_Name=Name
-VBindingTableEditor_LabelDescription=Description
-VBindingTableEditor_Id=Id
-VBindingTableEditor_Up=Up
-VBindingTableEditor_Down=Down
-VBindingTableEditor_Add=Add ...
-VBindingTableEditor_Remove=Remove
-
-AddonsEditor_Id=Id
-AddonsEditor_ClassURI=Class URI
-AddonsEditor_Find=Find ...
-
-ContributionClassDialog_DialogMessage=Enter the name of the contributing class
-ContributionClassDialog_DialogTitle=Find Contribution Class
-ContributionClassDialog_Label_Classname=Classname
-ContributionClassDialog_ShellTitle=Find Contribution Class
-
-MenuContributionEditor_Id=Id
-MenuContributionEditor_MenuItems=Menu Items
-MenuContributionEditor_MenuItemType=Type
-MenuContributionEditor_MenuItemItemType=Item Type
-MenuContributionEditor_Up=Up
-MenuContributionEditor_Down=Down
-MenuContributionEditor_HandledMenuItem=Handled MenuItem
-MenuContributionEditor_Separator=Separator
-MenuContributionEditor_Menu=Menu
-MenuContributionEditor_DirectMenuItem=Direct MenuItem
-MenuContributionEditor_Remove=Remove
-MenuContributionEditor_ParentId=Parent-Id
-MenuContributionEditor_Position=Position
-
-ModelFragmentsEditor_ModelFragments=Model Fragements
-ModelFragmentsEditor_Up=Up
-ModelFragmentsEditor_Down=Down
-ModelFragmentsEditor_Add=Add
-ModelFragmentsEditor_Remove=Remove
-ModelFragmentsEditor_Label=Model Fragments
-ModelFragmentsEditor_Description=Description
-
-StringModelFragment_Label=String Model Fragment
-StringModelFragment_Description=String Model Fragment Bla Bla Bla
-StringModelFragment_Featurename=Featurename
-StringModelFragment_ParentId=Element Id
-StringModelFragment_PositionInList=Position in list
-StringModelFragment_Up=Up
-StringModelFragment_Down=Down
-StringModelFragment_Remove=Remove
-StringModelFragment_Elements=Elements
-StringModelFragment_Find=Find ...
-
-FeatureSelectionDialog_Filter=Filter
-FeatureSelectionDialog_ShellTitle=Find Featurename
-FeatureSelectionDialog_DialogTitle=Featurename
-FeatureSelectionDialog_DialogMessage=Find the name of the feature you want to contribute to \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ObservableColumnLabelProvider.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ObservableColumnLabelProvider.java
deleted file mode 100644
index f5bdd1fe..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ObservableColumnLabelProvider.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal;
-
-import java.util.Set;
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.map.MapChangeEvent;
-import org.eclipse.jface.viewers.CellLabelProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.graphics.Image;
-
-public class ObservableColumnLabelProvider<M> extends CellLabelProvider {
- private IObservableMap[] attributeMaps;
-
- private IMapChangeListener mapChangeListener = new IMapChangeListener() {
- public void handleMapChange(MapChangeEvent event) {
- Set<?> affectedElements = event.diff.getChangedKeys();
- LabelProviderChangedEvent newEvent = new LabelProviderChangedEvent(
- ObservableColumnLabelProvider.this, affectedElements
- .toArray());
- fireLabelProviderChanged(newEvent);
- }
- };
-
- /**
- * Creates a new label provider that tracks changes to one attribute.
- *
- * @param attributeMap
- */
- public ObservableColumnLabelProvider(IObservableMap attributeMap) {
- this(new IObservableMap[] { attributeMap });
- }
-
- /**
- * Creates a new label provider that tracks changes to more than one
- * attribute. This constructor should be used by subclasses that override
- * {@link #update(ViewerCell)} and make use of more than one attribute.
- *
- * @param attributeMaps
- */
- protected ObservableColumnLabelProvider(IObservableMap[] attributeMaps) {
- System.arraycopy(attributeMaps, 0,
- this.attributeMaps = new IObservableMap[attributeMaps.length],
- 0, attributeMaps.length);
- for (int i = 0; i < attributeMaps.length; i++) {
- attributeMaps[i].addMapChangeListener(mapChangeListener);
- }
- }
-
- public void dispose() {
- for (int i = 0; i < attributeMaps.length; i++) {
- attributeMaps[i].removeMapChangeListener(mapChangeListener);
- }
- super.dispose();
- this.attributeMaps = null;
- this.mapChangeListener = null;
- }
-
- @SuppressWarnings("unchecked")
- public void update(ViewerCell cell) {
- M element = (M) cell.getElement();
- cell.setText(getText(element));
- cell.setImage(getImage(element));
- cell.setBackground(getBackground(element));
- cell.setForeground(getForeground(element));
- cell.setFont(getFont(element));
- }
-
- public String getText(M element) {
- Object value = attributeMaps[0].get(element);
- return value == null ? "" : value.toString(); //$NON-NLS-1$
- }
-
- public Font getFont(M element) {
- return null;
- }
-
- public Color getBackground(M element) {
- return null;
- }
-
- public Color getForeground(M element) {
- return null;
- }
-
-
- public Image getImage(M element) {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java
deleted file mode 100644
index fbba0c09..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.tools.emf.ui.internal;
-
-import java.text.BreakIterator;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-
-/**
- * A filter used in conjunction with <code>FilteredTree</code>. In order to
- * determine if a node should be filtered it uses the content and label provider
- * of the tree to do pattern matching on its children. This causes the entire
- * tree structure to be realized. Note that the label provider must implement
- * ILabelProvider.
- *
- * @see org.eclipse.ui.dialogs.FilteredTree
- * @since 3.2
- */
-public class PatternFilter extends ViewerFilter {
- /*
- * Cache of filtered elements in the tree
- */
- private Map<Object,Object[]> cache = new HashMap<Object,Object[]>();
-
- /*
- * Maps parent elements to TRUE or FALSE
- */
- private Map<Object,Boolean> foundAnyCache = new HashMap<Object,Boolean>();
-
- private boolean useCache = false;
-
- /**
- * Whether to include a leading wildcard for all provided patterns. A
- * trailing wildcard is always included.
- */
- private boolean includeLeadingWildcard = false;
-
- /**
- * The string pattern matcher used for this pattern filter.
- */
- private StringMatcher matcher;
-
- private boolean useEarlyReturnIfMatcherIsNull = true;
-
- private static Object[] EMPTY = new Object[0];
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#filter(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object[])
- */
- public final Object[] filter(Viewer viewer, Object parent, Object[] elements) {
- // we don't want to optimize if we've extended the filter ... this
- // needs to be addressed in 3.4
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=186404
- if (matcher == null && useEarlyReturnIfMatcherIsNull) {
- return elements;
- }
-
- if (!useCache) {
- return super.filter(viewer, parent, elements);
- }
-
- Object[] filtered = (Object[]) cache.get(parent);
- if (filtered == null) {
- Boolean foundAny = (Boolean) foundAnyCache.get(parent);
- if (foundAny != null && !foundAny.booleanValue()) {
- filtered = EMPTY;
- } else {
- filtered = super.filter(viewer, parent, elements);
- }
- cache.put(parent, filtered);
- }
- return filtered;
- }
-
- /**
- * Returns true if any of the elements makes it through the filter.
- * This method uses caching if enabled; the computation is done in
- * computeAnyVisible.
- *
- * @param viewer
- * @param parent
- * @param elements the elements (must not be an empty array)
- * @return true if any of the elements makes it through the filter.
- */
- private boolean isAnyVisible(Viewer viewer, Object parent, Object[] elements) {
- if (matcher == null) {
- return true;
- }
-
- if (!useCache) {
- return computeAnyVisible(viewer, elements);
- }
-
- Object[] filtered = (Object[]) cache.get(parent);
- if (filtered != null) {
- return filtered.length > 0;
- }
- Boolean foundAny = (Boolean) foundAnyCache.get(parent);
- if (foundAny == null) {
- foundAny = computeAnyVisible(viewer, elements) ? Boolean.TRUE : Boolean.FALSE;
- foundAnyCache.put(parent, foundAny);
- }
- return foundAny.booleanValue();
- }
-
- /**
- * Returns true if any of the elements makes it through the filter.
- *
- * @param viewer the viewer
- * @param elements the elements to test
- * @return <code>true</code> if any of the elements makes it through the filter
- */
- private boolean computeAnyVisible(Viewer viewer, Object[] elements) {
- boolean elementFound = false;
- for (int i = 0; i < elements.length && !elementFound; i++) {
- Object element = elements[i];
- elementFound = isElementVisible(viewer, element);
- }
- return elementFound;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
- public final boolean select(Viewer viewer, Object parentElement,
- Object element) {
- return isElementVisible(viewer, element);
- }
-
- /**
- * Sets whether a leading wildcard should be attached to each pattern
- * string.
- *
- * @param includeLeadingWildcard
- * Whether a leading wildcard should be added.
- */
- public final void setIncludeLeadingWildcard(
- final boolean includeLeadingWildcard) {
- this.includeLeadingWildcard = includeLeadingWildcard;
- }
-
- /**
- * The pattern string for which this filter should select
- * elements in the viewer.
- *
- * @param patternString
- */
- public void setPattern(String patternString) {
- // these 2 strings allow the PatternFilter to be extended in
- // 3.3 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=186404
- if ("org.eclipse.ui.keys.optimization.true".equals(patternString)) { //$NON-NLS-1$
- useEarlyReturnIfMatcherIsNull = true;
- return;
- } else if ("org.eclipse.ui.keys.optimization.false".equals(patternString)) { //$NON-NLS-1$
- useEarlyReturnIfMatcherIsNull = false;
- return;
- }
- clearCaches();
- if (patternString == null || patternString.equals("")) { //$NON-NLS-1$
- matcher = null;
- } else {
- String pattern = patternString + "*"; //$NON-NLS-1$
- if (includeLeadingWildcard) {
- pattern = "*" + pattern; //$NON-NLS-1$
- }
- matcher = new StringMatcher(pattern, true, false);
- }
- }
-
- /**
- * Clears the caches used for optimizing this filter. Needs to be called whenever
- * the tree content changes.
- */
- /* package */ void clearCaches() {
- cache.clear();
- foundAnyCache.clear();
- }
-
- /**
- * Answers whether the given String matches the pattern.
- *
- * @param string the String to test
- *
- * @return whether the string matches the pattern
- */
- private boolean match(String string) {
- if (matcher == null) {
- return true;
- }
- return matcher.match(string);
- }
-
- /**
- * Answers whether the given element is a valid selection in
- * the filtered tree. For example, if a tree has items that
- * are categorized, the category itself may not be a valid
- * selection since it is used merely to organize the elements.
- *
- * @param element
- * @return true if this element is eligible for automatic selection
- */
- public boolean isElementSelectable(Object element){
- return element != null;
- }
-
- /**
- * Answers whether the given element in the given viewer matches
- * the filter pattern. This is a default implementation that will
- * show a leaf element in the tree based on whether the provided
- * filter text matches the text of the given element's text, or that
- * of it's children (if the element has any).
- *
- * Subclasses may override this method.
- *
- * @param viewer the tree viewer in which the element resides
- * @param element the element in the tree to check for a match
- *
- * @return true if the element matches the filter pattern
- */
- public boolean isElementVisible(Viewer viewer, Object element){
- return isParentMatch(viewer, element) || isLeafMatch(viewer, element);
- }
-
- /**
- * Check if the parent (category) is a match to the filter text. The default
- * behavior returns true if the element has at least one child element that is
- * a match with the filter text.
- *
- * Subclasses may override this method.
- *
- * @param viewer the viewer that contains the element
- * @param element the tree element to check
- * @return true if the given element has children that matches the filter text
- */
- protected boolean isParentMatch(Viewer viewer, Object element){
- Object[] children = ((ITreeContentProvider) ((AbstractTreeViewer) viewer)
- .getContentProvider()).getChildren(element);
-
- if ((children != null) && (children.length > 0)) {
- return isAnyVisible(viewer, element, children);
- }
- return false;
- }
-
- /**
- * Check if the current (leaf) element is a match with the filter text.
- * The default behavior checks that the label of the element is a match.
- *
- * Subclasses should override this method.
- *
- * @param viewer the viewer that contains the element
- * @param element the tree element to check
- * @return true if the given element's label matches the filter text
- */
- protected boolean isLeafMatch(Viewer viewer, Object element){
- String labelText = ((ILabelProvider) ((StructuredViewer) viewer)
- .getLabelProvider()).getText(element);
-
- if(labelText == null) {
- return false;
- }
- return wordMatches(labelText);
- }
-
- /**
- * Take the given filter text and break it down into words using a
- * BreakIterator.
- *
- * @param text
- * @return an array of words
- */
- private String[] getWords(String text){
- List<String> words = new ArrayList<String>();
- // Break the text up into words, separating based on whitespace and
- // common punctuation.
- // Previously used String.split(..., "\\W"), where "\W" is a regular
- // expression (see the Javadoc for class Pattern).
- // Need to avoid both String.split and regular expressions, in order to
- // compile against JCL Foundation (bug 80053).
- // Also need to do this in an NL-sensitive way. The use of BreakIterator
- // was suggested in bug 90579.
- BreakIterator iter = BreakIterator.getWordInstance();
- iter.setText(text);
- int i = iter.first();
- while (i != java.text.BreakIterator.DONE && i < text.length()) {
- int j = iter.following(i);
- if (j == java.text.BreakIterator.DONE) {
- j = text.length();
- }
- // match the word
- if (Character.isLetterOrDigit(text.charAt(i))) {
- String word = text.substring(i, j);
- words.add(word);
- }
- i = j;
- }
- return (String[]) words.toArray(new String[words.size()]);
- }
-
- /**
- * Return whether or not if any of the words in text satisfy the
- * match critera.
- *
- * @param text the text to match
- * @return boolean <code>true</code> if one of the words in text
- * satisifes the match criteria.
- */
- protected boolean wordMatches(String text) {
- if (text == null) {
- return false;
- }
-
- //If the whole text matches we are all set
- if(match(text)) {
- return true;
- }
-
- // Otherwise check if any of the words of the text matches
- String[] words = getWords(text);
- for (int i = 0; i < words.length; i++) {
- String word = words[i];
- if (match(word)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Can be called by the filtered tree to turn on caching.
- *
- * @param useCache The useCache to set.
- */
- void setUseCache(boolean useCache) {
- this.useCache = useCache;
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ShadowComposite.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ShadowComposite.java
deleted file mode 100644
index 8391c7a5..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ShadowComposite.java
+++ /dev/null
@@ -1,659 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 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
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import org.eclipse.e4.core.di.annotations.Optional;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CTabFolderRenderer;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.ImageData;
-import org.eclipse.swt.graphics.PaletteData;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.graphics.Region;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
-
-public class ShadowComposite extends Composite {
-
- // ================================
- // Dummy to not modify code
- // ================================
- public int marginWidth = 0;
- public int marginHeight = 0;
-
- ShadowComposite parent;
-
- private int getTabHeight() {
- return 0;
- }
-
- private boolean getMinimized() {
- return false;
- }
-
- public static final int PART_BODY = -1;
- public static final int PART_HEADER = -2;
- public static final int PART_BORDER = -3;
- public static final int PART_BACKGROUND = -4;
-
- // Constants for circle drawing
- final static int LEFT_TOP = 0;
- final static int LEFT_BOTTOM = 1;
- final static int RIGHT_TOP = 2;
- final static int RIGHT_BOTTOM = 3;
-
- // drop shadow constants
- final static int SIDE_DROP_WIDTH = 3;
- final static int BOTTOM_DROP_WIDTH = 4;
-
- // keylines
- final static int OUTER_KEYLINE = 1;
- final static int INNER_KEYLINE = 0;
- final static int TOP_KEYLINE = 0;
-
- // Item Constants
- static final int ITEM_TOP_MARGIN = 2;
- static final int ITEM_BOTTOM_MARGIN = 6;
- static final int ITEM_LEFT_MARGIN = 4;
- static final int ITEM_RIGHT_MARGIN = 4;
- static final int INTERNAL_SPACING = 4;
-
- static final String E4_SHADOW_IMAGE = "org.eclipse.e4.renderer.shadowcomposite_image"; //$NON-NLS-1$
-
- static int[] shape;
-
- Image shadowImage;
-
- int cornerSize = 20;
-
- boolean shadowEnabled = true;
- Color outerKeyline, innerKeyline;
- Color[] activeToolbar;
- int[] activePercents;
- Color[] inactiveToolbar;
- int[] inactivePercents;
- boolean active;
-
- private boolean drawPolyline = true;
-
- public ShadowComposite(Composite parent, int style) {
- super(parent, style);
- this.parent = this;
- this.outerKeyline = new Color(getDisplay(), new RGB(240, 240, 240));
- addListener(SWT.Paint, new Listener() {
-
- public void handleEvent(Event event) {
- onPaint(event);
- }
- });
- addListener(SWT.Dispose, new Listener() {
-
- public void handleEvent(Event event) {
- outerKeyline.dispose();
- }
- });
- // addPaintListener(new PaintListener() {
- //
- // public void paintControl(PaintEvent e) {
- // Point size = getSize();
- // Rectangle bodyRect = new Rectangle(0, 0, size.x, size.y);
- // drawTabBody(e.gc, bodyRect, 0);
- // drawTabHeader(e.gc, bodyRect, 0);
- // }
- // });
- }
-
- public Rectangle getClientArea() {
- Rectangle trim = computeTrim(CTabFolderRenderer.PART_BODY, SWT.NONE, 0, 0, 0, 0);
- // if (minimized)
- // return new Rectangle(-trim.x, -trim.y, 0, 0);
- Point size = getSize();
- int width = size.x - trim.width;
- int height = size.y - trim.height;
- return new Rectangle(-trim.x, -trim.y, width, height);
- }
-
- private void onPaint(Event event) {
- GC gc = event.gc;
- gc.setAdvanced(true);
-
- Color gcBackground = gc.getBackground();
- Color gcForeground = gc.getForeground();
-
- Point size = getSize();
- Rectangle bodyRect = new Rectangle(0, 0, size.x, size.y);
- draw(CTabFolderRenderer.PART_BODY, SWT.BACKGROUND | SWT.FOREGROUND, bodyRect, gc);
-
- gc.setForeground(gcForeground);
- gc.setBackground(gcBackground);
-
- draw(CTabFolderRenderer.PART_HEADER, SWT.BACKGROUND | SWT.FOREGROUND, bodyRect, gc);
-
- }
-
- @Override
- public Rectangle computeTrim(int x, int y, int width, int height) {
- return computeTrim(PART_BODY, SWT.NONE, x, y, width, height);
- }
-
- protected Rectangle computeTrim(int part, int state, int x, int y, int width, int height) {
- GC gc = new GC(parent);
- gc.dispose();
- int borderTop = TOP_KEYLINE + OUTER_KEYLINE;
- int borderBottom = INNER_KEYLINE + OUTER_KEYLINE;
- int marginWidth = parent.marginWidth;
- int marginHeight = parent.marginHeight;
- int sideDropWidth = shadowEnabled ? SIDE_DROP_WIDTH : 0;
- switch (part) {
- case PART_BODY:
- x = x - marginWidth - OUTER_KEYLINE - INNER_KEYLINE - sideDropWidth - (cornerSize / 2);
- width = width + 2 * OUTER_KEYLINE + 2 * INNER_KEYLINE + 2 * marginWidth + 2 * sideDropWidth + cornerSize;
- int tabHeight = parent.getTabHeight() + 1; // TODO: Figure out what
- // to do about the +1
- // TODO: Fix
- if (parent.getMinimized()) {
- y = /* parent.onBottom ? y - borderTop : */y - tabHeight - borderTop - 5;
- height = borderTop + borderBottom + tabHeight;
- } else {
- // y = tabFolder.onBottom ? y - marginHeight - highlight_margin
- // - borderTop: y - marginHeight - highlight_header - tabHeight
- // - borderTop;
-
- y = y - marginHeight - tabHeight - borderTop - (cornerSize / 4);
- height = height + borderBottom + borderTop + 2 * marginHeight + tabHeight + cornerSize / 2 + cornerSize / 4 + (shadowEnabled ? BOTTOM_DROP_WIDTH : 0);
- }
- break;
- case PART_HEADER:
- x = x - (INNER_KEYLINE + OUTER_KEYLINE) - sideDropWidth;
- width = width + 2 * (INNER_KEYLINE + OUTER_KEYLINE + sideDropWidth);
- break;
- case PART_BORDER:
- x = x - INNER_KEYLINE - OUTER_KEYLINE - sideDropWidth - (cornerSize / 4);
- width = width + 2 * (INNER_KEYLINE + OUTER_KEYLINE + sideDropWidth) + cornerSize / 2;
- y = y - borderTop;
- height = height + borderTop + borderBottom;
- break;
- }
- return new Rectangle(x, y, width, height);
- }
-
- protected void draw(int part, int state, Rectangle bounds, GC gc) {
- switch (part) {
- case PART_BODY:
- this.drawTabBody(gc, bounds, state);
- return;
- case PART_HEADER:
- this.drawTabHeader(gc, bounds, state);
- return;
- }
- }
-
- void drawTabHeader(GC gc, Rectangle bounds, int state) {
- // gc.setClipping(bounds.x, bounds.y, bounds.width,
- // parent.getTabHeight() + 1);
-
- int[] points = new int[1024];
- int index = 0;
- int radius = cornerSize / 2;
- int marginWidth = parent.marginWidth;
- int marginHeight = parent.marginHeight;
- int delta = INNER_KEYLINE + OUTER_KEYLINE + 2 * (shadowEnabled ? SIDE_DROP_WIDTH : 0) + 2 * marginWidth;
- int width = bounds.width - delta;
- int height = bounds.height - INNER_KEYLINE - OUTER_KEYLINE - 2 * marginHeight - (shadowEnabled ? BOTTOM_DROP_WIDTH : 0);
- int circX = bounds.x + delta / 2 + radius;
- int circY = bounds.y + radius;
-
- // Fill in background
- Region clipping = new Region();
- gc.getClipping(clipping);
- Region region = new Region();
- region.add(shape);
- region.intersect(clipping);
- gc.setClipping(region);
-
- int header = 3; // TODO: this needs to be added to computeTrim for
- // HEADER
- Rectangle trim = computeTrim(PART_HEADER, state, 0, 0, 0, 0);
- trim.width = bounds.width - trim.width;
- trim.height = (parent.getTabHeight() + 1 + header) - trim.height;
- trim.x = -trim.x;
- trim.y = -trim.y;
-
- draw(PART_BACKGROUND, SWT.NONE, trim, gc);
-
- gc.setClipping(clipping);
- clipping.dispose();
- region.dispose();
-
- int[] ltt = drawCircle(circX + 1, circY + 1, radius, LEFT_TOP);
- System.arraycopy(ltt, 0, points, index, ltt.length);
- index += ltt.length;
-
- int[] lbb = drawCircle(circX + 1, circY + height - (radius * 2) - 2, radius, LEFT_BOTTOM);
- System.arraycopy(lbb, 0, points, index, lbb.length);
- index += lbb.length;
-
- int[] rb = drawCircle(circX + width - (radius * 2) - 2, circY + height - (radius * 2) - 2, radius, RIGHT_BOTTOM);
- System.arraycopy(rb, 0, points, index, rb.length);
- index += rb.length;
-
- int[] rt = drawCircle(circX + width - (radius * 2) - 2, circY + 1, radius, RIGHT_TOP);
- System.arraycopy(rt, 0, points, index, rt.length);
- index += rt.length;
- points[index++] = points[0];
- points[index++] = points[1];
-
- int[] tempPoints = new int[index];
- System.arraycopy(points, 0, tempPoints, 0, index);
-
- if (outerKeyline == null)
- outerKeyline = gc.getDevice().getSystemColor(SWT.COLOR_BLACK);
-
- gc.setForeground(outerKeyline);
-
- if (drawPolyline) {
- gc.drawPolyline(shape);
- }
- }
-
- void drawTabBody(GC gc, Rectangle bounds, int state) {
- int[] points = new int[1024];
- int index = 0;
- int radius = cornerSize / 2;
- int marginWidth = parent.marginWidth;
- int marginHeight = parent.marginHeight;
- int delta = INNER_KEYLINE + OUTER_KEYLINE + 2 * (shadowEnabled ? SIDE_DROP_WIDTH : 0) + 2 * marginWidth;
- int width = bounds.width - delta;
- int height = Math.max(parent.getTabHeight() + INNER_KEYLINE + OUTER_KEYLINE + (shadowEnabled ? BOTTOM_DROP_WIDTH : 0), bounds.height - INNER_KEYLINE - OUTER_KEYLINE - 2 * marginHeight - (shadowEnabled ? BOTTOM_DROP_WIDTH : 0));
-
- int circX = bounds.x + delta / 2 + radius;
- int circY = bounds.y + radius;
-
- // Body
- index = 0;
- int[] ltt = drawCircle(circX, circY, radius, LEFT_TOP);
- System.arraycopy(ltt, 0, points, index, ltt.length);
- index += ltt.length;
-
- int[] lbb = drawCircle(circX, circY + height - (radius * 2), radius, LEFT_BOTTOM);
- System.arraycopy(lbb, 0, points, index, lbb.length);
- index += lbb.length;
-
- int[] rb = drawCircle(circX + width - (radius * 2), circY + height - (radius * 2), radius, RIGHT_BOTTOM);
- System.arraycopy(rb, 0, points, index, rb.length);
- index += rb.length;
-
- int[] rt = drawCircle(circX + width - (radius * 2), circY, radius, RIGHT_TOP);
- System.arraycopy(rt, 0, points, index, rt.length);
- index += rt.length;
- points[index++] = circX;
- points[index++] = circY - radius;
-
- int[] tempPoints = new int[index];
- System.arraycopy(points, 0, tempPoints, 0, index);
- gc.fillPolygon(tempPoints);
-
- // Fill in parent background for non-rectangular shape
- Region r = new Region();
- r.add(bounds);
- r.subtract(tempPoints);
- gc.setBackground(parent.getParent().getBackground());
- Display display = parent.getDisplay();
- Region clipping = new Region();
- gc.getClipping(clipping);
- r.intersect(clipping);
- gc.setClipping(r);
- Rectangle mappedBounds = display.map(parent, parent.getParent(), bounds);
- parent.getParent().drawBackground(gc, bounds.x, bounds.y, bounds.width, bounds.height, mappedBounds.x, mappedBounds.y);
-
- // Shadow
- if (shadowEnabled)
- drawShadow(display, bounds, gc);
-
- gc.setClipping(clipping);
- clipping.dispose();
- r.dispose();
-
- shape = tempPoints;
- }
-
- static int[] drawCircle(int xC, int yC, int r, int circlePart) {
- int x = 0, y = r, u = 1, v = 2 * r - 1, e = 0;
- int[] points = new int[1024];
- int[] pointsMirror = new int[1024];
- int loop = 0;
- int loopMirror = 0;
- while (x < y) {
- if (circlePart == RIGHT_BOTTOM) {
- points[loop++] = xC + x;
- points[loop++] = yC + y;
- }
- if (circlePart == RIGHT_TOP) {
- points[loop++] = xC + y;
- points[loop++] = yC - x;
- }
- if (circlePart == LEFT_TOP) {
- points[loop++] = xC - x;
- points[loop++] = yC - y;
- }
- if (circlePart == LEFT_BOTTOM) {
- points[loop++] = xC - y;
- points[loop++] = yC + x;
- }
- x++;
- e += u;
- u += 2;
- if (v < 2 * e) {
- y--;
- e -= v;
- v -= 2;
- }
- if (x > y)
- break;
- if (circlePart == RIGHT_BOTTOM) {
- pointsMirror[loopMirror++] = xC + y;
- pointsMirror[loopMirror++] = yC + x;
- }
- if (circlePart == RIGHT_TOP) {
- pointsMirror[loopMirror++] = xC + x;
- pointsMirror[loopMirror++] = yC - y;
- }
- if (circlePart == LEFT_TOP) {
- pointsMirror[loopMirror++] = xC - y;
- pointsMirror[loopMirror++] = yC - x;
- }
- if (circlePart == LEFT_BOTTOM) {
- pointsMirror[loopMirror++] = xC - x;
- pointsMirror[loopMirror++] = yC + y;
- }
- // grow?
- if ((loop + 1) > points.length) {
- int length = points.length * 2;
- int[] newPointTable = new int[length];
- int[] newPointTableMirror = new int[length];
- System.arraycopy(points, 0, newPointTable, 0, points.length);
- points = newPointTable;
- System.arraycopy(pointsMirror, 0, newPointTableMirror, 0, pointsMirror.length);
- pointsMirror = newPointTableMirror;
- }
- }
- int[] finalArray = new int[loop + loopMirror];
- System.arraycopy(points, 0, finalArray, 0, loop);
- for (int i = loopMirror - 1, j = loop; i > 0; i = i - 2, j = j + 2) {
- int tempY = pointsMirror[i];
- int tempX = pointsMirror[i - 1];
- finalArray[j] = tempX;
- finalArray[j + 1] = tempY;
- }
- return finalArray;
- }
-
- void drawShadow(final Display display, Rectangle bounds, GC gc) {
- if (shadowImage == null)
- createShadow(display);
-
- int x = bounds.x;
- int y = bounds.y;
- int SIZE = shadowImage.getBounds().width / 3;
-
- int height = Math.max(bounds.height, SIZE * 2);
- int width = Math.max(bounds.width, SIZE * 2);
- // top left
- gc.drawImage(shadowImage, 0, 0, SIZE, SIZE, 2, 10, SIZE, 20);
- int fillHeight = height - SIZE * 2;
- int fillWidth = width + 5 - SIZE * 2;
-
- int xFill = 0;
- for (int i = SIZE; i < fillHeight; i += SIZE) {
- xFill = i;
- gc.drawImage(shadowImage, 0, SIZE, SIZE, SIZE, 2, i, SIZE, SIZE);
- }
-
- // Pad the rest of the shadow
- gc.drawImage(shadowImage, 0, SIZE, SIZE, fillHeight - xFill, 2, xFill + SIZE, SIZE, fillHeight - xFill);
-
- // bl
- gc.drawImage(shadowImage, 0, 40, 20, 20, 2, y + height - SIZE, 20, 20);
-
- int yFill = 0;
- for (int i = SIZE; i <= fillWidth; i += SIZE) {
- yFill = i;
- gc.drawImage(shadowImage, SIZE, SIZE * 2, SIZE, SIZE, i, y + height - SIZE, SIZE, SIZE);
- }
- // Pad the rest of the shadow
- gc.drawImage(shadowImage, SIZE, SIZE * 2, fillWidth - yFill, SIZE, yFill + SIZE, y + height - SIZE, fillWidth - yFill, SIZE);
-
- // br
- gc.drawImage(shadowImage, SIZE * 2, SIZE * 2, SIZE, SIZE, x + width - SIZE - 1, y + height - SIZE, SIZE, SIZE);
-
- // tr
- gc.drawImage(shadowImage, (SIZE * 2), 0, SIZE, SIZE, x + width - SIZE - 1, 10, SIZE, SIZE);
-
- xFill = 0;
- for (int i = SIZE; i < fillHeight; i += SIZE) {
- xFill = i;
- gc.drawImage(shadowImage, SIZE * 2, SIZE, SIZE, SIZE, x + width - SIZE - 1, i, SIZE, SIZE);
- }
-
- // Pad the rest of the shadow
- gc.drawImage(shadowImage, SIZE * 2, SIZE, SIZE, fillHeight - xFill, x + width - SIZE - 1, xFill + SIZE, SIZE, fillHeight - xFill);
- }
-
- void createShadow(final Display display) {
- Object obj = display.getData(E4_SHADOW_IMAGE);
- if (obj != null) {
- shadowImage = (Image) obj;
- } else {
- ImageData data = new ImageData(60, 60, 32, new PaletteData(0xFF0000, 0xFF00, 0xFF));
- Image tmpImage = shadowImage = new Image(display, data);
- GC gc = new GC(tmpImage);
- Color shadowColor = new Color(display, new RGB(128, 128, 128));
- gc.setBackground(shadowColor);
- drawTabBody(gc, new Rectangle(0, 0, 60, 60), SWT.None);
- ImageData blured = blur(tmpImage, 5, 25);
- shadowImage = new Image(display, blured);
- display.setData(E4_SHADOW_IMAGE, shadowImage);
- tmpImage.dispose();
- shadowColor.dispose();
- display.disposeExec(new Runnable() {
- public void run() {
- Object obj = display.getData(E4_SHADOW_IMAGE);
- if (obj != null) {
- Image tmp = (Image) obj;
- tmp.dispose();
- display.setData(E4_SHADOW_IMAGE, null);
- }
- }
- });
- }
- }
-
- public ImageData blur(Image src, int radius, int sigma) {
- float[] kernel = create1DKernel(radius, sigma);
-
- ImageData imgPixels = src.getImageData();
- int width = imgPixels.width;
- int height = imgPixels.height;
-
- int[] inPixels = new int[width * height];
- int[] outPixels = new int[width * height];
- int offset = 0;
- for (int y = 0; y < height; y++) {
- for (int x = 0; x < width; x++) {
- RGB rgb = imgPixels.palette.getRGB(imgPixels.getPixel(x, y));
- if (rgb.red == 255 && rgb.green == 255 && rgb.blue == 255) {
- inPixels[offset] = (rgb.red << 16) | (rgb.green << 8) | rgb.blue;
- } else {
- inPixels[offset] = (imgPixels.getAlpha(x, y) << 24) | (rgb.red << 16) | (rgb.green << 8) | rgb.blue;
- }
- offset++;
- }
- }
-
- convolve(kernel, inPixels, outPixels, width, height, true);
- convolve(kernel, outPixels, inPixels, height, width, true);
-
- ImageData dst = new ImageData(imgPixels.width, imgPixels.height, 24, new PaletteData(0xff0000, 0xff00, 0xff));
-
- dst.setPixels(0, 0, inPixels.length, inPixels, 0);
- offset = 0;
- for (int y = 0; y < height; y++) {
- for (int x = 0; x < width; x++) {
- if (inPixels[offset] == -1) {
- dst.setAlpha(x, y, 0);
- } else {
- int a = (inPixels[offset] >> 24) & 0xff;
- // if (a < 150) a = 0;
- dst.setAlpha(x, y, a);
- }
- offset++;
- }
- }
- return dst;
- }
-
- private void convolve(float[] kernel, int[] inPixels, int[] outPixels, int width, int height, boolean alpha) {
- int kernelWidth = kernel.length;
- int kernelMid = kernelWidth / 2;
- for (int y = 0; y < height; y++) {
- int index = y;
- int currentLine = y * width;
- for (int x = 0; x < width; x++) {
- // do point
- float a = 0, r = 0, g = 0, b = 0;
- for (int k = -kernelMid; k <= kernelMid; k++) {
- float val = kernel[k + kernelMid];
- int xcoord = x + k;
- if (xcoord < 0)
- xcoord = 0;
- if (xcoord >= width)
- xcoord = width - 1;
- int pixel = inPixels[currentLine + xcoord];
- // float alp = ((pixel >> 24) & 0xff);
- a += val * ((pixel >> 24) & 0xff);
- r += val * (((pixel >> 16) & 0xff));
- g += val * (((pixel >> 8) & 0xff));
- b += val * (((pixel) & 0xff));
- }
- int ia = alpha ? clamp((int) (a + 0.5)) : 0xff;
- int ir = clamp((int) (r + 0.5));
- int ig = clamp((int) (g + 0.5));
- int ib = clamp((int) (b + 0.5));
- outPixels[index] = (ia << 24) | (ir << 16) | (ig << 8) | ib;
- index += height;
- }
- }
-
- }
-
- private int clamp(int value) {
- if (value > 255)
- return 255;
- if (value < 0)
- return 0;
- return value;
- }
-
- private float[] create1DKernel(int radius, int sigma) {
- // guideline: 3*sigma should be the radius
- int size = radius * 2 + 1;
- float[] kernel = new float[size];
- int radiusSquare = radius * radius;
- float sigmaSquare = 2 * sigma * sigma;
- float piSigma = 2 * (float) Math.PI * sigma;
- float sqrtSigmaPi2 = (float) Math.sqrt(piSigma);
- int start = size / 2;
- int index = 0;
- float total = 0;
- for (int i = -start; i <= start; i++) {
- float d = i * i;
- if (d > radiusSquare) {
- kernel[index] = 0;
- } else {
- kernel[index] = (float) Math.exp(-(d) / sigmaSquare) / sqrtSigmaPi2;
- }
- total += kernel[index];
- index++;
- }
- for (int i = 0; i < size; i++) {
- kernel[i] /= total;
- }
- return kernel;
- }
-
- @Inject
- @Optional
- public void setCornerRadius(@Named("radius") Integer radius) {
- cornerSize = radius.intValue();
- parent.redraw();
- }
-
- @Inject
- @Optional
- public void setShadowVisible(@Named("shadowVisible") Boolean visible) {
- this.shadowEnabled = visible.booleanValue();
- parent.redraw();
- }
-
- @Inject
- @Optional
- public void setOuterKeyline(@Named("outerKeyline") Color color) {
- this.outerKeyline = color;
- // TODO: HACK! Should be set based on pseudo-state.
- // setActive(!(color.getRed() == 255 && color.getGreen() == 255 &&
- // color.getBlue() == 255));
- parent.redraw();
- }
-
- @Inject
- @Optional
- public void setInnerKeyline(@Named("innerKeyline") Color color) {
- this.innerKeyline = color;
- parent.redraw();
- }
-
- @Inject
- @Optional
- public void setActiveToolbarGradient(@Named("activeToolbarColors") Color[] color, @Named("activeToolbarPercents") int[] percents) {
- activeToolbar = color;
- activePercents = percents;
- }
-
- @Inject
- @Optional
- public void setInactiveToolbarGradient(@Named("inactiveToolbarColors") Color[] color, @Named("inactiveToolbarPercents") int[] percents) {
- inactiveToolbar = color;
- inactivePercents = percents;
- }
-
- // public void setActive(boolean active) {
- // this.active = active;
- // Control topRight = parent.getTopRight();
- // if (topRight != null) {
- // if (active && toolbarActiveImage == null)
- // createActiveToolbarImages(Display.getCurrent());
- // if (!active && toolbarInactiveImage == null)
- // createInactiveToolbarImages(Display.getCurrent());
- // topRight.setBackgroundImage(active ? toolbarActiveImage :
- // toolbarInactiveImage);
- // parent.redraw();
- // }
- // }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java
deleted file mode 100644
index cfd87687..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2000, 2006 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.tools.emf.ui.internal;
-
-import java.util.Vector;
-
-/**
- * A string pattern matcher, suppporting "*" and "?" wildcards.
- */
-public class StringMatcher {
- protected String fPattern;
-
- protected int fLength; // pattern length
-
- protected boolean fIgnoreWildCards;
-
- protected boolean fIgnoreCase;
-
- protected boolean fHasLeadingStar;
-
- protected boolean fHasTrailingStar;
-
- protected String fSegments[]; //the given pattern is split into * separated segments
-
- /* boundary value beyond which we don't need to search in the text */
- protected int fBound = 0;
-
- protected static final char fSingleWildCard = '\u0000';
-
- public static class Position {
- int start; //inclusive
-
- int end; //exclusive
-
- public Position(int start, int end) {
- this.start = start;
- this.end = end;
- }
-
- public int getStart() {
- return start;
- }
-
- public int getEnd() {
- return end;
- }
- }
-
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain '*' for 0 and many characters and
- * '?' for exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern
- * e.g., "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character itself),
- * just results in that character in the pattern.
- * e.g., "\a" means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't forget
- * escape characters are represented by "\\".
- *
- * @param pattern the pattern to match text against
- * @param ignoreCase if true, case is ignored
- * @param ignoreWildCards if true, wild cards and their escape sequences are ignored
- * (everything is taken literally).
- */
- public StringMatcher(String pattern, boolean ignoreCase,
- boolean ignoreWildCards) {
- if (pattern == null) {
- throw new IllegalArgumentException();
- }
- fIgnoreCase = ignoreCase;
- fIgnoreWildCards = ignoreWildCards;
- fPattern = pattern;
- fLength = pattern.length();
-
- if (fIgnoreWildCards) {
- parseNoWildCards();
- } else {
- parseWildCards();
- }
- }
-
- /**
- * Find the first occurrence of the pattern between <code>start</code)(inclusive)
- * and <code>end</code>(exclusive).
- * @param text the String object to search in
- * @param start the starting index of the search range, inclusive
- * @param end the ending index of the search range, exclusive
- * @return an <code>StringMatcher.Position</code> object that keeps the starting
- * (inclusive) and ending positions (exclusive) of the first occurrence of the
- * pattern in the specified range of the text; return null if not found or subtext
- * is empty (start==end). A pair of zeros is returned if pattern is empty string
- * Note that for pattern like "*abc*" with leading and trailing stars, position of "abc"
- * is returned. For a pattern like"*??*" in text "abcdf", (1,3) is returned
- */
- public StringMatcher.Position find(String text, int start, int end) {
- if (text == null) {
- throw new IllegalArgumentException();
- }
-
- int tlen = text.length();
- if (start < 0) {
- start = 0;
- }
- if (end > tlen) {
- end = tlen;
- }
- if (end < 0 || start >= end) {
- return null;
- }
- if (fLength == 0) {
- return new Position(start, start);
- }
- if (fIgnoreWildCards) {
- int x = posIn(text, start, end);
- if (x < 0) {
- return null;
- }
- return new Position(x, x + fLength);
- }
-
- int segCount = fSegments.length;
- if (segCount == 0) {
- return new Position(start, end);
- }
-
- int curPos = start;
- int matchStart = -1;
- int i;
- for (i = 0; i < segCount && curPos < end; ++i) {
- String current = fSegments[i];
- int nextMatch = regExpPosIn(text, curPos, end, current);
- if (nextMatch < 0) {
- return null;
- }
- if (i == 0) {
- matchStart = nextMatch;
- }
- curPos = nextMatch + current.length();
- }
- if (i < segCount) {
- return null;
- }
- return new Position(matchStart, curPos);
- }
-
- /**
- * match the given <code>text</code> with the pattern
- * @return true if matched otherwise false
- * @param text a String object
- */
- public boolean match(String text) {
- if(text == null) {
- return false;
- }
- return match(text, 0, text.length());
- }
-
- /**
- * Given the starting (inclusive) and the ending (exclusive) positions in the
- * <code>text</code>, determine if the given substring matches with aPattern
- * @return true if the specified portion of the text matches the pattern
- * @param text a String object that contains the substring to match
- * @param start marks the starting position (inclusive) of the substring
- * @param end marks the ending index (exclusive) of the substring
- */
- public boolean match(String text, int start, int end) {
- if (null == text) {
- throw new IllegalArgumentException();
- }
-
- if (start > end) {
- return false;
- }
-
- if (fIgnoreWildCards) {
- return (end - start == fLength)
- && fPattern.regionMatches(fIgnoreCase, 0, text, start,
- fLength);
- }
- int segCount = fSegments.length;
- if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) {
- return true;
- }
- if (start == end) {
- return fLength == 0;
- }
- if (fLength == 0) {
- return start == end;
- }
-
- int tlen = text.length();
- if (start < 0) {
- start = 0;
- }
- if (end > tlen) {
- end = tlen;
- }
-
- int tCurPos = start;
- int bound = end - fBound;
- if (bound < 0) {
- return false;
- }
- int i = 0;
- String current = fSegments[i];
- int segLength = current.length();
-
- /* process first segment */
- if (!fHasLeadingStar) {
- if (!regExpRegionMatches(text, start, current, 0, segLength)) {
- return false;
- } else {
- ++i;
- tCurPos = tCurPos + segLength;
- }
- }
- if ((fSegments.length == 1) && (!fHasLeadingStar)
- && (!fHasTrailingStar)) {
- // only one segment to match, no wildcards specified
- return tCurPos == end;
- }
- /* process middle segments */
- while (i < segCount) {
- current = fSegments[i];
- int currentMatch;
- int k = current.indexOf(fSingleWildCard);
- if (k < 0) {
- currentMatch = textPosIn(text, tCurPos, end, current);
- if (currentMatch < 0) {
- return false;
- }
- } else {
- currentMatch = regExpPosIn(text, tCurPos, end, current);
- if (currentMatch < 0) {
- return false;
- }
- }
- tCurPos = currentMatch + current.length();
- i++;
- }
-
- /* process final segment */
- if (!fHasTrailingStar && tCurPos != end) {
- int clen = current.length();
- return regExpRegionMatches(text, end - clen, current, 0, clen);
- }
- return i == segCount;
- }
-
- /**
- * This method parses the given pattern into segments seperated by wildcard '*' characters.
- * Since wildcards are not being used in this case, the pattern consists of a single segment.
- */
- private void parseNoWildCards() {
- fSegments = new String[1];
- fSegments[0] = fPattern;
- fBound = fLength;
- }
-
- /**
- * Parses the given pattern into segments seperated by wildcard '*' characters.
- * @param p, a String object that is a simple regular expression with '*' and/or '?'
- */
- private void parseWildCards() {
- if (fPattern.startsWith("*")) { //$NON-NLS-1$
- fHasLeadingStar = true;
- }
- if (fPattern.endsWith("*")) {//$NON-NLS-1$
- /* make sure it's not an escaped wildcard */
- if (fLength > 1 && fPattern.charAt(fLength - 2) != '\\') {
- fHasTrailingStar = true;
- }
- }
-
- Vector<String> temp = new Vector<String>();
-
- int pos = 0;
- StringBuffer buf = new StringBuffer();
- while (pos < fLength) {
- char c = fPattern.charAt(pos++);
- switch (c) {
- case '\\':
- if (pos >= fLength) {
- buf.append(c);
- } else {
- char next = fPattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- } else {
- /* not an escape sequence, just insert literally */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*':
- if (buf.length() > 0) {
- /* new segment */
- temp.addElement(buf.toString());
- fBound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?':
- /* append special character representing single match wildcard */
- buf.append(fSingleWildCard);
- break;
- default:
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.addElement(buf.toString());
- fBound += buf.length();
- }
-
- fSegments = new String[temp.size()];
- temp.copyInto(fSegments);
- }
-
- /**
- * @param text a string which contains no wildcard
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int posIn(String text, int start, int end) {//no wild card in pattern
- int max = end - fLength;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(fPattern, start);
- if (i == -1 || i > max) {
- return -1;
- }
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, fPattern, 0, fLength)) {
- return i;
- }
- }
-
- return -1;
- }
-
- /**
- * @param text a simple regular expression that may only contain '?'(s)
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a simple regular expression that may contains '?'
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int regExpPosIn(String text, int start, int end, String p) {
- int plen = p.length();
-
- int max = end - plen;
- for (int i = start; i <= max; ++i) {
- if (regExpRegionMatches(text, i, p, 0, plen)) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- *
- * @return boolean
- * @param text a String to match
- * @param start int that indicates the starting index of match, inclusive
- * @param end</code> int that indicates the ending index of match, exclusive
- * @param p String, String, a simple regular expression that may contain '?'
- * @param ignoreCase boolean indicating wether code>p</code> is case sensitive
- */
- protected boolean regExpRegionMatches(String text, int tStart, String p,
- int pStart, int plen) {
- while (plen-- > 0) {
- char tchar = text.charAt(tStart++);
- char pchar = p.charAt(pStart++);
-
- /* process wild cards */
- if (!fIgnoreWildCards) {
- /* skip single wild cards */
- if (pchar == fSingleWildCard) {
- continue;
- }
- }
- if (pchar == tchar) {
- continue;
- }
- if (fIgnoreCase) {
- if (Character.toUpperCase(tchar) == Character
- .toUpperCase(pchar)) {
- continue;
- }
- // comparing after converting to upper case doesn't handle all cases;
- // also compare after converting to lower case
- if (Character.toLowerCase(tchar) == Character
- .toLowerCase(pchar)) {
- continue;
- }
- }
- return false;
- }
- return true;
- }
-
- /**
- * @param text the string to match
- * @param start the starting index in the text for search, inclusive
- * @param end the stopping point of search, exclusive
- * @param p a pattern string that has no wildcard
- * @return the starting index in the text of the pattern , or -1 if not found
- */
- protected int textPosIn(String text, int start, int end, String p) {
-
- int plen = p.length();
- int max = end - plen;
-
- if (!fIgnoreCase) {
- int i = text.indexOf(p, start);
- if (i == -1 || i > max) {
- return -1;
- }
- return i;
- }
-
- for (int i = start; i <= max; ++i) {
- if (text.regionMatches(true, i, p, 0, plen)) {
- return i;
- }
- }
-
- return -1;
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ClassContributionCollector.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ClassContributionCollector.java
deleted file mode 100644
index b642e955..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ClassContributionCollector.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common;
-
-
-import java.util.concurrent.CopyOnWriteArrayList;
-import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider;
-import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider.ContributionResultHandler;
-import org.eclipse.e4.tools.emf.ui.common.IClassContributionProvider.Filter;
-
-public class ClassContributionCollector {
- private CopyOnWriteArrayList<IClassContributionProvider> providers = new CopyOnWriteArrayList<IClassContributionProvider>();
-
- public void addContributor(IClassContributionProvider contributor) {
- providers.add(contributor);
- }
-
- public void removeContributor(IClassContributionProvider contributor) {
- providers.remove(contributor);
- }
-
- public void findContributions(Filter filter, ContributionResultHandler resultHandler) {
-
- for( IClassContributionProvider contributor: providers ) {
- contributor.findContribution(filter, resultHandler);
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java
deleted file mode 100644
index 1ee61633..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ComponentLabelProvider.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common;
-
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.viewers.StyledCellLabelProvider;
-import org.eclipse.jface.viewers.StyledString;
-import org.eclipse.jface.viewers.ViewerCell;
-import org.eclipse.swt.graphics.Image;
-
-public class ComponentLabelProvider extends StyledCellLabelProvider {
- private Image modelComponentsImage;
- private Image modelComonentImage;
- private Image partsImage;
- private Image menusImage;
- private Image partImage;
- private Image partDescriptorImage;
-
- private ModelEditor editor;
-
- public ComponentLabelProvider(ModelEditor editor) {
- this.editor = editor;
- }
-
- @Override
- public void update(final ViewerCell cell) {
- if( cell.getElement() instanceof EObject ) {
-
- EObject o = (EObject) cell.getElement();
- AbstractComponentEditor elementEditor = editor.getEditor(o.eClass());
- if( elementEditor != null ) {
- String label = elementEditor.getLabel(o);
- String detailText = elementEditor.getDetailLabel(o);
- if( detailText == null ) {
- cell.setText(label);
- } else {
- StyledString styledString = new StyledString(label, null);
- styledString.append(" - " + detailText, StyledString.DECORATIONS_STYLER); //$NON-NLS-1$
- cell.setText(styledString.getString());
- cell.setStyleRanges(styledString.getStyleRanges());
- }
- cell.setImage(elementEditor.getImage(o, cell.getControl().getDisplay()));
- } else {
- cell.setText(cell.getElement().toString());
- }
- } else if( cell.getElement() instanceof VirtualEntry<?> ) {
- String s = cell.getElement().toString();
- cell.setText(s);
- } else {
- cell.setText(cell.getElement().toString());
- }
- }
-
- @Override
- public void dispose() {
- if( modelComponentsImage != null ) {
- modelComponentsImage.dispose();
- modelComponentsImage = null;
- }
-
- if( modelComonentImage != null ) {
- modelComonentImage.dispose();
- modelComonentImage = null;
- }
-
- if( partsImage != null ) {
- partsImage.dispose();
- partsImage = null;
- }
-
- if( menusImage != null ) {
- menusImage.dispose();
- menusImage = null;
- }
-
- if( partImage != null ) {
- partImage.dispose();
- partImage = null;
- }
-
- if( partDescriptorImage != null ) {
- partDescriptorImage.dispose();
- partDescriptorImage = null;
- }
- super.dispose();
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
deleted file mode 100644
index 23b38b7d..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java
+++ /dev/null
@@ -1,610 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common;
-
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-
-import org.eclipse.swt.widgets.TreeItem;
-
-import javax.annotation.PostConstruct;
-
-import org.eclipse.e4.ui.internal.workbench.E4XMIResource;
-
-import org.eclipse.e4.ui.model.application.ui.basic.MPart;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.PreDestroy;
-import javax.inject.Inject;
-import org.eclipse.core.databinding.observable.IObservable;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.map.IMapChangeListener;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.map.MapChangeEvent;
-import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory;
-import org.eclipse.core.databinding.observable.set.ISetChangeListener;
-import org.eclipse.core.databinding.observable.set.SetChangeEvent;
-import org.eclipse.core.databinding.observable.set.WritableSet;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.e4.core.contexts.IEclipseContext;
-import org.eclipse.e4.core.di.annotations.Optional;
-import org.eclipse.e4.core.services.contributions.IContributionFactory;
-import org.eclipse.e4.tools.emf.ui.common.IEditorDescriptor;
-import org.eclipse.e4.tools.emf.ui.common.IEditorFeature;
-import org.eclipse.e4.tools.emf.ui.common.IEditorFeature.FeatureClass;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.e4.tools.emf.ui.common.ISelectionProviderService;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.ShadowComposite;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.AddonsEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.ApplicationEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.BindingTableEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.CommandEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.DirectMenuItemEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.DirectToolItemEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.HandledMenuItemEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.HandledToolItemEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.HandlerEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.InputPartEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.KeyBindingEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.MenuContributionEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.MenuEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.MenuSeparatorEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.ModelFragmentsEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.PartDescriptorEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.PartEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.PartSashContainerEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.PartStackEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.PerspectiveEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.PerspectiveStackEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.PlaceholderEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.StringModelFragment;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.ToolBarContributionEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.ToolBarEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.ToolBarSeparatorEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.ToolControlEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.TrimBarEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.TrimContributionEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.TrimmedWindowEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.WindowEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VApplicationAddons;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VBindingTableEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VCommandEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VHandlerEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VMenuContributionsEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VMenuEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VModelFragmentsEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VModelImportsEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VPartDescriptor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VToolBarContributionsEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VTrimContributionsEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VWindowControlEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VWindowEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VWindowSharedElementsEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VWindowTrimEditor;
-import org.eclipse.e4.ui.di.Focus;
-import org.eclipse.e4.ui.di.Persist;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.advanced.impl.AdvancedPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl;
-import org.eclipse.e4.ui.model.fragment.MModelFragments;
-import org.eclipse.e4.ui.model.fragment.impl.FragmentPackageImpl;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.databinding.viewers.ObservableListTreeContentProvider;
-import org.eclipse.jface.databinding.viewers.TreeStructureAdvisor;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.custom.ScrolledComposite;
-import org.eclipse.swt.custom.StackLayout;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-public class ModelEditor {
- private static final String CSS_CLASS_KEY = "org.eclipse.e4.ui.css.CssClassName"; //$NON-NLS-1$
-
- public static final String VIRTUAL_PART_MENU = ModelEditor.class.getName() + ".VIRTUAL_PART_MENU"; //$NON-NLS-1$
- public static final String VIRTUAL_HANDLER = ModelEditor.class.getName() + ".VIRTUAL_HANDLER"; //$NON-NLS-1$
- public static final String VIRTUAL_BINDING_TABLE = ModelEditor.class.getName() + ".VIRTUAL_BINDING_TABLE"; //$NON-NLS-1$
- public static final String VIRTUAL_COMMAND = ModelEditor.class.getName() + ".VIRTUAL_COMMAND"; //$NON-NLS-1$
- public static final String VIRTUAL_WINDOWS = ModelEditor.class.getName() + ".VIRTUAL_WINDOWS"; //$NON-NLS-1$
- public static final String VIRTUAL_WINDOW_CONTROLS = ModelEditor.class.getName() + ".VIRTUAL_WINDOW_CONTROLS"; //$NON-NLS-1$
- public static final String VIRTUAL_PART_DESCRIPTORS = ModelEditor.class.getName() + ".VIRTUAL_PART_DESCRIPTORS"; //$NON-NLS-1$
- public static final String VIRTUAL_PARTDESCRIPTOR_MENU = ModelEditor.class.getName() + ".VIRTUAL_PARTDESCRIPTOR_MENU"; //$NON-NLS-1$
- public static final String VIRTUAL_TRIMMED_WINDOW_TRIMS = ModelEditor.class.getName() + ".VIRTUAL_TRIMMED_WINDOW_TRIMS"; //$NON-NLS-1$
- public static final String VIRTUAL_ADDONS = ModelEditor.class.getName() + ".VIRTUAL_ADDONS"; //$NON-NLS-1$
- public static final String VIRTUAL_MENU_CONTRIBUTIONS = ModelEditor.class.getName() + ".VIRTUAL_MENU_CONTRIBUTIONS"; //$NON-NLS-1$
- public static final String VIRTUAL_TOOLBAR_CONTRIBUTIONS = ModelEditor.class.getName() + ".VIRTUAL_TOOLBAR_CONTRIBUTIONS"; //$NON-NLS-1$
- public static final String VIRTUAL_TRIM_CONTRIBUTIONS = ModelEditor.class.getName() + ".VIRTUAL_TRIM_CONTRIBUTIONS"; //$NON-NLS-1$
- public static final String VIRTUAL_WINDOW_SHARED_ELEMENTS = ModelEditor.class.getName() + ".VIRTUAL_WINDOW_SHARED_ELEMENTS"; //$NON-NLS-1$
- public static final String VIRTUAL_MODEL_FRAGEMENTS = ModelEditor.class.getName() + ".VIRTUAL_MODEL_FRAGEMENTS"; //$NON-NLS-1$
- public static final String VIRTUAL_MODEL_IMPORTS = ModelEditor.class.getName() + ".VIRTUAL_MODEL_IMPORTS"; //$NON-NLS-1$
-
- private Map<EClass, AbstractComponentEditor> editorMap = new HashMap<EClass, AbstractComponentEditor>();
- private Map<String, AbstractComponentEditor> virtualEditors = new HashMap<String, AbstractComponentEditor>();
- private List<FeaturePath> labelFeaturePaths = new ArrayList<FeaturePath>();
- private List<IEditorFeature> editorFeatures = new ArrayList<IEditorFeature>();
-
- // private List<AbstractComponentEditor> editors = new
- // ArrayList<AbstractComponentEditor>();
-
- private TreeViewer viewer;
- private IModelResource modelProvider;
- private IProject project;
- private ISelectionProviderService selectionService;
- private IEclipseContext context;
- private boolean fragment;
-
- @Inject
- @Optional
- private MPart editorPart;
-
- public ModelEditor(Composite composite, IEclipseContext context, IModelResource modelProvider, IProject project) {
- this.modelProvider = modelProvider;
- this.project = project;
- this.context = context;
- this.context.set(ModelEditor.class, this);
-
- registerDefaultEditors();
- registerVirtualEditors();
-
- registerContributedEditors();
- registerContributedVirtualEditors();
- loadEditorFeatures();
-
- fragment = modelProvider.getRoot().get(0) instanceof MModelFragments;
-
- SashForm form = new SashForm(composite, SWT.HORIZONTAL);
- form.setBackground(form.getDisplay().getSystemColor(SWT.COLOR_WHITE));
-
- viewer = createTreeViewerArea(form);
-
- Composite parent = new Composite(form, SWT.NONE);
- parent.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));
- parent.setBackgroundMode(SWT.INHERIT_DEFAULT);
- // parent.setData("org.eclipse.e4.ui.css.CssClassName","contentContainer");
- FillLayout l = new FillLayout();
- l.marginWidth = 5;
- parent.setLayout(l);
-
- ShadowComposite editingArea = new ShadowComposite(parent, SWT.NONE);
- GridLayout gl = new GridLayout();
- gl.marginTop = 0;
- gl.marginHeight = 0;
- editingArea.setLayout(gl);
- editingArea.setBackgroundMode(SWT.INHERIT_DEFAULT);
- // editingArea.setData("org.eclipse.e4.ui.css.CssClassName","contentContainer");
-
- Composite headerContainer = new Composite(editingArea, SWT.NONE);
- headerContainer.setBackgroundMode(SWT.INHERIT_DEFAULT);
- headerContainer.setData(CSS_CLASS_KEY, "headerSectionContainer"); //$NON-NLS-1$
- headerContainer.setLayout(new GridLayout(3, false));
- headerContainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final Label iconLabel = new Label(headerContainer, SWT.NONE);
- iconLabel.setLayoutData(new GridData(20, 20));
-
- final Label textLabel = new Label(headerContainer, SWT.NONE);
- textLabel.setData(CSS_CLASS_KEY, "sectionHeader"); //$NON-NLS-1$
- textLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- final ScrolledComposite scrolling = new ScrolledComposite(editingArea, SWT.H_SCROLL | SWT.V_SCROLL);
- scrolling.setBackgroundMode(SWT.INHERIT_DEFAULT);
- scrolling.setData(CSS_CLASS_KEY, "formContainer"); //$NON-NLS-1$
-
- final EStackLayout layout = new EStackLayout();
- final Composite contentContainer = new Composite(scrolling, SWT.NONE);
- contentContainer.setData(CSS_CLASS_KEY, "formContainer"); //$NON-NLS-1$
- scrolling.setExpandHorizontal(true);
- scrolling.setExpandVertical(true);
- scrolling.setContent(contentContainer);
-
- scrolling.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- Rectangle r = scrolling.getClientArea();
- scrolling.setMinSize(contentContainer.computeSize(r.width, SWT.DEFAULT));
- }
- });
-
- scrolling.setLayoutData(new GridData(GridData.FILL_BOTH));
- contentContainer.setLayout(layout);
-
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- if (!event.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
- if (s.getFirstElement() instanceof EObject) {
- EObject obj = (EObject) s.getFirstElement();
- AbstractComponentEditor editor = getEditor(obj.eClass());
- if (editor != null) {
- textLabel.setText(editor.getLabel(obj));
- iconLabel.setImage(editor.getImage(obj, iconLabel.getDisplay()));
- Composite comp = editor.getEditor(contentContainer, s.getFirstElement());
- comp.setBackgroundMode(SWT.INHERIT_DEFAULT);
- layout.topControl = comp;
- contentContainer.layout(true);
- }
- } else {
- VirtualEntry<?> entry = (VirtualEntry<?>) s.getFirstElement();
- AbstractComponentEditor editor = virtualEditors.get(entry.getId());
- if (editor != null) {
- textLabel.setText(editor.getLabel(entry));
- iconLabel.setImage(editor.getImage(entry, iconLabel.getDisplay()));
- Composite comp = editor.getEditor(contentContainer, s.getFirstElement());
- comp.setBackgroundMode(SWT.INHERIT_DEFAULT);
- layout.topControl = comp;
- contentContainer.layout(true);
- }
- }
-
- Rectangle r = scrolling.getClientArea();
- scrolling.setMinSize(contentContainer.computeSize(r.width, SWT.DEFAULT));
- scrolling.setOrigin(0, 0);
- scrolling.layout(true,true);
-
- if (selectionService != null) {
- selectionService.setSelection(s.getFirstElement());
- }
-
- }
- }
- });
-
- form.setWeights(new int[] { 1, 2 });
- viewer.setSelection(new StructuredSelection(modelProvider.getRoot()));
-
- MenuManager mgr = new MenuManager();
- mgr.setRemoveAllWhenShown(true);
- mgr.addMenuListener(new IMenuListener() {
-
- public void menuAboutToShow(IMenuManager manager) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (!s.isEmpty()) {
- List<Action> actions;
- if (s.getFirstElement() instanceof VirtualEntry<?>) {
- actions = virtualEditors.get(((VirtualEntry<?>) s.getFirstElement()).getId()).getActions(s.getFirstElement());
- } else {
- EObject o = (EObject) s.getFirstElement();
- AbstractComponentEditor editor = getEditor(o.eClass());
- if (editor != null) {
- actions = editor.getActions(s.getFirstElement());
- } else {
- actions = Collections.emptyList();
- }
- }
-
- for (Action a : actions) {
- manager.add(a);
- }
- }
- }
- });
- viewer.getControl().setMenu(mgr.createContextMenu(viewer.getControl()));
- }
-
- private void loadEditorFeatures() {
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- IExtensionPoint extPoint = registry.getExtensionPoint("org.eclipse.e4.tools.emf.ui.editors"); //$NON-NLS-1$
-
- for (IConfigurationElement el : extPoint.getConfigurationElements()) {
- if (!"editorfeature".equals(el.getName())) { //$NON-NLS-1$
- continue;
- }
-
- try {
- editorFeatures.add((IEditorFeature) el.createExecutableExtension("class")); //$NON-NLS-1$
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
- public boolean isModelFragment() {
- return fragment;
- }
-
- public boolean isLiveModel() {
- return ! modelProvider.isSaveable();
- }
-
- public List<FeatureClass> getFeatureClasses(EClass eClass, EStructuralFeature feature) {
- List<FeatureClass> list = new ArrayList<IEditorFeature.FeatureClass>();
-
- for( IEditorFeature f : editorFeatures ) {
- list.addAll(f.getFeatureClasses(eClass, feature));
- }
-
- return list;
- }
-
- @Inject
- public void setSelectionService(@Optional ISelectionProviderService selectionService) {
- this.selectionService = selectionService;
- if (viewer != null && !viewer.getControl().isDisposed()) {
- if (!viewer.getSelection().isEmpty() && selectionService != null) {
- selectionService.setSelection(((IStructuredSelection) viewer.getSelection()).getFirstElement());
- }
- }
- }
-
- // @Inject
- // public void updateSelection(@Optional @Named(IServiceConstants.SELECTION)
- // Object selection ) {
- // System.err.println("The selection: " + selection);
- // }
-
- private TreeViewer createTreeViewerArea(Composite parent) {
- parent = new Composite(parent, SWT.NONE);
- parent.setData(CSS_CLASS_KEY, "formContainer"); //$NON-NLS-1$
- parent.setBackgroundMode(SWT.INHERIT_DEFAULT);
-
- FillLayout l = new FillLayout();
- l.marginWidth = 5;
- parent.setLayout(l);
- ShadowComposite editingArea = new ShadowComposite(parent, SWT.NONE);
- editingArea.setLayout(new FillLayout());
- final TreeViewer viewer = new TreeViewer(editingArea, SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
- viewer.setLabelProvider(new ComponentLabelProvider(this));
- ObservableListTreeContentProvider contentProvider = new ObservableListTreeContentProvider(new ObservableFactoryImpl(), new TreeStructureAdvisorImpl());
- viewer.setContentProvider(contentProvider);
-
- final WritableSet clearedSet = new WritableSet();
-
- contentProvider.getKnownElements().addSetChangeListener(new ISetChangeListener() {
-
- public void handleSetChange(SetChangeEvent event) {
- for (Object o : event.diff.getAdditions()) {
- if (o instanceof EObject) {
- clearedSet.add(o);
- }
- }
-
- for (Object o : event.diff.getRemovals()) {
- if (o instanceof EObject) {
- clearedSet.remove(o);
- }
- }
- }
- });
-
- for (FeaturePath p : labelFeaturePaths) {
- IObservableMap map = EMFProperties.value(p).observeDetail(clearedSet);
- map.addMapChangeListener(new IMapChangeListener() {
-
- public void handleMapChange(MapChangeEvent event) {
- viewer.update(event.diff.getChangedKeys().toArray(), null);
- }
- });
- }
-
- viewer.setInput(modelProvider.getRoot());
- viewer.expandToLevel(2);
-
- return viewer;
- }
-
- private void registerContributedVirtualEditors() {
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- IExtensionPoint extPoint = registry.getExtensionPoint("org.eclipse.e4.tools.emf.ui.editors"); //$NON-NLS-1$
-
- for (IConfigurationElement el : extPoint.getConfigurationElements()) {
- if (!"virtualeditor".equals(el.getName())) { //$NON-NLS-1$
- continue;
- }
-
- IContributionFactory fact = context.get(IContributionFactory.class);
- AbstractComponentEditor editor = (AbstractComponentEditor) fact.create("platform:/plugin/" + el.getContributor().getName() + "/" + el.getAttribute("class"), context); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- registerVirtualEditor(el.getAttribute("id"), editor); //$NON-NLS-1$
- }
- }
-
- private void registerVirtualEditors() {
- registerVirtualEditor(VIRTUAL_PART_MENU, new VMenuEditor(modelProvider.getEditingDomain(), this, BasicPackageImpl.Literals.PART__MENUS));
- registerVirtualEditor(VIRTUAL_HANDLER, new VHandlerEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_BINDING_TABLE, new VBindingTableEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_COMMAND, new VCommandEditor(modelProvider.getEditingDomain(), this, ApplicationPackageImpl.Literals.APPLICATION__COMMANDS));
- registerVirtualEditor(VIRTUAL_WINDOWS, new VWindowEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_WINDOW_CONTROLS, new VWindowControlEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_PART_DESCRIPTORS, new VPartDescriptor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_PARTDESCRIPTOR_MENU, new VMenuEditor(modelProvider.getEditingDomain(), this, org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.Literals.PART_DESCRIPTOR__MENUS));
- registerVirtualEditor(VIRTUAL_TRIMMED_WINDOW_TRIMS, new VWindowTrimEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_ADDONS, new VApplicationAddons(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_MENU_CONTRIBUTIONS, new VMenuContributionsEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_TOOLBAR_CONTRIBUTIONS, new VToolBarContributionsEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_TRIM_CONTRIBUTIONS, new VTrimContributionsEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_WINDOW_SHARED_ELEMENTS, new VWindowSharedElementsEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_MODEL_FRAGEMENTS, new VModelFragmentsEditor(modelProvider.getEditingDomain(), this));
- registerVirtualEditor(VIRTUAL_MODEL_IMPORTS, new VModelImportsEditor(modelProvider.getEditingDomain(), this));
-
- }
-
- private void registerVirtualEditor(String id, AbstractComponentEditor editor) {
- virtualEditors.put(id, editor);
- }
-
- public void setSelection(Object element) {
- viewer.setSelection(new StructuredSelection(element));
- }
-
- private void registerContributedEditors() {
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- IExtensionPoint extPoint = registry.getExtensionPoint("org.eclipse.e4.tools.emf.ui.editors"); //$NON-NLS-1$
-
- for (IConfigurationElement el : extPoint.getConfigurationElements()) {
- if (!"editor".equals(el.getName())) { //$NON-NLS-1$
- continue;
- }
-
- try {
- IEditorDescriptor desc = (IEditorDescriptor) el.createExecutableExtension("descriptorClass"); //$NON-NLS-1$
- EClass eClass = desc.getEClass();
- IContributionFactory fact = context.get(IContributionFactory.class);
- AbstractComponentEditor editor = (AbstractComponentEditor) fact.create("platform:/plugin/" + el.getContributor().getName() + "/" + desc.getEditorClass().getName(), context); //$NON-NLS-1$ //$NON-NLS-2$
- registerEditor(eClass, editor);
- } catch (CoreException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
-
- private void registerDefaultEditors() {
- registerEditor(ApplicationPackageImpl.Literals.APPLICATION, new ApplicationEditor(modelProvider.getEditingDomain(),this));
- registerEditor(ApplicationPackageImpl.Literals.ADDON, new AddonsEditor(modelProvider.getEditingDomain(),this, project));
-
- registerEditor(CommandsPackageImpl.Literals.KEY_BINDING, new KeyBindingEditor(modelProvider.getEditingDomain(),this, modelProvider));
- registerEditor(CommandsPackageImpl.Literals.HANDLER, new HandlerEditor(modelProvider.getEditingDomain(),this, modelProvider, project));
- registerEditor(CommandsPackageImpl.Literals.COMMAND, new CommandEditor(modelProvider.getEditingDomain(),this));
- registerEditor(CommandsPackageImpl.Literals.BINDING_TABLE, new BindingTableEditor(modelProvider.getEditingDomain(), this));
-
- registerEditor(MenuPackageImpl.Literals.TOOL_BAR, new ToolBarEditor(modelProvider.getEditingDomain(), this));
- registerEditor(MenuPackageImpl.Literals.DIRECT_TOOL_ITEM, new DirectToolItemEditor(modelProvider.getEditingDomain(), this, project));
- registerEditor(MenuPackageImpl.Literals.HANDLED_TOOL_ITEM, new HandledToolItemEditor(modelProvider.getEditingDomain(), this, project, modelProvider));
- registerEditor(MenuPackageImpl.Literals.TOOL_BAR_SEPARATOR, new ToolBarSeparatorEditor(modelProvider.getEditingDomain(), this));
- registerEditor(MenuPackageImpl.Literals.TOOL_CONTROL, new ToolControlEditor(modelProvider.getEditingDomain(), this, project));
-
- registerEditor(MenuPackageImpl.Literals.MENU, new MenuEditor(modelProvider.getEditingDomain(), project, this));
- registerEditor(MenuPackageImpl.Literals.MENU_SEPARATOR, new MenuSeparatorEditor(modelProvider.getEditingDomain(), this));
- registerEditor(MenuPackageImpl.Literals.HANDLED_MENU_ITEM, new HandledMenuItemEditor(modelProvider.getEditingDomain(), this, project, modelProvider));
- registerEditor(MenuPackageImpl.Literals.DIRECT_MENU_ITEM, new DirectMenuItemEditor(modelProvider.getEditingDomain(), this, project));
- registerEditor(MenuPackageImpl.Literals.MENU_CONTRIBUTION, new MenuContributionEditor(modelProvider.getEditingDomain(),project, this));
- registerEditor(MenuPackageImpl.Literals.TOOL_BAR_CONTRIBUTION, new ToolBarContributionEditor(modelProvider.getEditingDomain(),project, this));
- registerEditor(MenuPackageImpl.Literals.TRIM_CONTRIBUTION, new TrimContributionEditor(modelProvider.getEditingDomain(),project, this));
-
-
- registerEditor(BasicPackageImpl.Literals.PART, new PartEditor(modelProvider.getEditingDomain(), this, project));
- registerEditor(BasicPackageImpl.Literals.WINDOW, new WindowEditor(modelProvider.getEditingDomain(), this, project));
- registerEditor(BasicPackageImpl.Literals.TRIMMED_WINDOW, new TrimmedWindowEditor(modelProvider.getEditingDomain(), this, project));
- registerEditor(BasicPackageImpl.Literals.PART_SASH_CONTAINER, new PartSashContainerEditor(modelProvider.getEditingDomain(), this));
- registerEditor(BasicPackageImpl.Literals.PART_STACK, new PartStackEditor(modelProvider.getEditingDomain(), this));
- registerEditor(BasicPackageImpl.Literals.INPUT_PART, new InputPartEditor(modelProvider.getEditingDomain(), this, project));
- registerEditor(BasicPackageImpl.Literals.TRIM_BAR, new TrimBarEditor(modelProvider.getEditingDomain(), this));
-
- registerEditor(org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.Literals.PART_DESCRIPTOR, new PartDescriptorEditor(modelProvider.getEditingDomain(), this, project));
-
- registerEditor(AdvancedPackageImpl.Literals.PERSPECTIVE_STACK, new PerspectiveStackEditor(modelProvider.getEditingDomain(), this));
- registerEditor(AdvancedPackageImpl.Literals.PERSPECTIVE, new PerspectiveEditor(modelProvider.getEditingDomain(), project, this));
- registerEditor(AdvancedPackageImpl.Literals.PLACEHOLDER, new PlaceholderEditor(modelProvider.getEditingDomain(),this,modelProvider));
-
- registerEditor(FragmentPackageImpl.Literals.MODEL_FRAGMENTS, new ModelFragmentsEditor(modelProvider.getEditingDomain(), this));
- registerEditor(FragmentPackageImpl.Literals.STRING_MODEL_FRAGMENT, new StringModelFragment(modelProvider.getEditingDomain(),this));
- }
-
- public void registerEditor(EClass eClass, AbstractComponentEditor editor) {
- editorMap.put(eClass, editor);
-
- for (FeaturePath p : editor.getLabelProperties()) {
- boolean found = false;
- for (FeaturePath tmp : labelFeaturePaths) {
- if (equalsPaths(p, tmp)) {
- found = true;
- break;
- }
- }
-
- if (!found) {
- labelFeaturePaths.add(p);
- }
- }
- }
-
- private boolean equalsPaths(FeaturePath p1, FeaturePath p2) {
- if (p1.getFeaturePath().length == p2.getFeaturePath().length) {
- for (int i = 0; i < p1.getFeaturePath().length; i++) {
- if (!p1.getFeaturePath()[i].equals(p2.getFeaturePath()[i])) {
- return false;
- }
- }
-
- return true;
- }
-
- return false;
- }
-
- public AbstractComponentEditor getEditor(EClass eClass) {
- AbstractComponentEditor editor = editorMap.get(eClass);
- if( editor == null ) {
- for( EClass cl : eClass.getESuperTypes() ) {
- editor = getEditor(cl);
- if( editor != null ) {
- return editor;
- }
- }
- }
- return editor;
- }
-
- @Persist
- public void doSave(@Optional IProgressMonitor monitor) {
- if (modelProvider.isSaveable()) {
- modelProvider.save();
- }
- }
-
- @Focus
- public void setFocus() {
- viewer.getControl().setFocus();
- }
-
- private static class TreeStructureAdvisorImpl extends TreeStructureAdvisor {
-
- }
-
- private class ObservableFactoryImpl implements IObservableFactory {
-
- public IObservable createObservable(Object target) {
- if (target instanceof IObservableList) {
- return (IObservable) target;
- } else if (target instanceof VirtualEntry<?>) {
- return ((VirtualEntry<?>) target).getList();
- } else {
- AbstractComponentEditor editor = getEditor(((EObject) target).eClass());
- if (editor != null) {
- return editor.getChildList(target);
- }
- }
-
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/VirtualEntry.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/VirtualEntry.java
deleted file mode 100644
index 84d6af1a..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/VirtualEntry.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common;
-
-import org.eclipse.core.databinding.observable.DisposeEvent;
-import org.eclipse.core.databinding.observable.IDisposeListener;
-
-import org.eclipse.core.databinding.observable.DisposeEvent;
-import org.eclipse.core.databinding.observable.IDisposeListener;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.core.databinding.observable.Diffs;
-import org.eclipse.core.databinding.observable.list.IListChangeListener;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.ListChangeEvent;
-import org.eclipse.core.databinding.observable.list.ListDiff;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.property.list.IListProperty;
-
-public abstract class VirtualEntry<M> {
- private String id;
- private Object originalParent;
- private String label;
- private IObservableList list;
-
- public VirtualEntry(String id, IListProperty property, Object originalParent, String label) {
- this.id = id;
- this.originalParent = originalParent;
- this.label = label;
- this.list = new WritableList();
- final IObservableList origList = property.observe(originalParent);
- list.addAll(cleanedList(origList));
-
- final IListChangeListener listener = new IListChangeListener() {
-
- public void handleListChange(ListChangeEvent event) {
- if( ! VirtualEntry.this.list.isDisposed() ) {
- List<Object> clean = cleanedList(event.getObservableList());
- ListDiff diff = Diffs.computeListDiff(VirtualEntry.this.list, clean);
- diff.applyTo(VirtualEntry.this.list);
- }
- }
- };
-
- origList.addListChangeListener(listener);
- }
-
- @SuppressWarnings("unchecked")
- private List<Object> cleanedList(IObservableList list) {
- List<Object> l = new ArrayList<Object>(list.size());
-
- for( Object o : list ) {
- if( accepted((M) o) ) {
- l.add(o);
- }
- }
-
- return l;
- }
-
- protected abstract boolean accepted(M o);
-
- public IObservableList getList() {
- return list;
- }
-
- public Object getOriginalParent() {
- return originalParent;
- }
-
- public String getId() {
- return id;
- }
-
- @Override
- public String toString() {
- return label;
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/AddAddonCommand.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/AddAddonCommand.java
deleted file mode 100644
index 27cf0d51..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/AddAddonCommand.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.commands;
-
-import org.eclipse.e4.ui.model.application.MAddon;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MApplicationFactory;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-
-public class AddAddonCommand {
- public void execute(EditingDomain editingDomain, MApplication parent) {
- MAddon command = MApplicationFactory.INSTANCE.createAddon();
- Command cmd = AddCommand.create(editingDomain, parent, ApplicationPackageImpl.Literals.APPLICATION__ADDONS, command);
-
- if( cmd.canExecute() ) {
- editingDomain.getCommandStack().execute(cmd);
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/MoveAddonCommand.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/MoveAddonCommand.java
deleted file mode 100644
index 6c3f9889..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/MoveAddonCommand.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.commands;
-
-import org.eclipse.e4.ui.model.application.MAddon;
-import org.eclipse.emf.edit.domain.EditingDomain;
-
-public class MoveAddonCommand {
- public void execute(EditingDomain editingDomain, MAddon addon, boolean up) {
-
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/RemoveAddonCommand.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/RemoveAddonCommand.java
deleted file mode 100644
index fed166ce..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/commands/RemoveAddonCommand.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.commands;
-
-import java.util.List;
-import org.eclipse.e4.ui.model.application.MAddon;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-
-public class RemoveAddonCommand {
- public void execute(EditingDomain editingDomain, List<MAddon> addons) {
- EObject parent = ((EObject)addons.get(0)).eContainer();
- for( MAddon a : addons ) {
- if( parent != ((EObject)a).eContainer() ) {
- throw new IllegalArgumentException("The addons all have to belong to the same parent container");
- }
- }
- Command cmd = RemoveCommand.create(editingDomain, parent, ApplicationPackageImpl.Literals.APPLICATION__ADDONS, addons);
- if( cmd.canExecute() ) {
- editingDomain.getCommandStack().execute(cmd);
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/AddonsEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/AddonsEditor.java
deleted file mode 100644
index 9b75c4e5..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/AddonsEditor.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.ContributionClassDialog;
-import org.eclipse.e4.ui.model.application.MContribution;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class AddonsEditor extends AbstractComponentEditor {
- private Composite composite;
- private EMFDataBindingContext context;
- private IProject project;
- private Image image;
- private EStackLayout stackLayout;
-
- public AddonsEditor(EditingDomain editingDomain, ModelEditor editor, IProject project) {
- super(editingDomain,editor);
- this.project = project;
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if( image == null ) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Addons.png")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return "Addon";
- }
-
- @Override
- public String getDetailLabel(Object element) {
- MContribution contrib = (MContribution) element;
- if( contrib.getContributionURI() != null && contrib.getContributionURI().trim().length() > 0 ) {
- return contrib.getContributionURI().substring(contrib.getContributionURI().lastIndexOf('/')+1);
- }
- return null;
- }
-
- @Override
- public String getDescription(Object element) {
- return "Addon Bla Bla Bla";
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- if (getEditor().isModelFragment()) {
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
- createForm(composite, context, getMaster(), false);
- createForm(composite, context, getMaster(), true);
- } else {
- composite = createForm(parent, context, getMaster(), false);
- }
- }
-
- if( getEditor().isModelFragment() ) {
- Control topControl;
- if( Util.isImport((EObject) object) ) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if( stackLayout.topControl != topControl ) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- protected Composite createForm(Composite parent, EMFDataBindingContext context, IObservableValue master, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
-
- if( getEditor().isModelFragment() && isImport ) {
- ControlFactory.createFindImport(parent, this, context);
- return parent;
- }
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.AddonsEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200,t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.AddonsEditor_ClassURI);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- context.bindValue(textProp.observeDelayed(200,t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI).observeDetail(getMaster()));
-
- final Button b = new Button(parent, SWT.PUSH|SWT.FLAT);
- b.setImage(getImage(t.getDisplay(), SEARCH_IMAGE));
- b.setText(Messages.AddonsEditor_Find);
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- ContributionClassDialog dialog = new ContributionClassDialog(b.getShell(),project,getEditingDomain(),(MContribution) getMaster().getValue(), ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI);
- dialog.open();
- }
- });
- }
-
-// ControlFactory.createBindingsWidget(parent, this);
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ApplicationEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ApplicationEditor.java
deleted file mode 100644
index c2bed1d2..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ApplicationEditor.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.property.list.IListProperty;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.VirtualEntry;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class ApplicationEditor extends AbstractComponentEditor {
-
- private Composite composite;
- private Image image;
- private EMFDataBindingContext context;
-
- private IListProperty HANDLER_CONTAINER__HANDLERS = EMFProperties.list(CommandsPackageImpl.Literals.HANDLER_CONTAINER__HANDLERS);
- private IListProperty BINDING_CONTAINER__BINDINGS = EMFProperties.list(CommandsPackageImpl.Literals.BINDING_TABLE_CONTAINER__BINDING_TABLES);
- private IListProperty APPLICATION__COMMANDS = EMFProperties.list(ApplicationPackageImpl.Literals.APPLICATION__COMMANDS);
- private IListProperty PART_DESCRIPTOR_CONTAINER__DESCRIPTORS = EMFProperties.list(BasicPackageImpl.Literals.PART_DESCRIPTOR_CONTAINER__DESCRIPTORS);
- private IListProperty ELEMENT_CONTAINER__CHILDREN = EMFProperties.list(UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN);
- private IListProperty APPLICATION__ADDONS = EMFProperties.list(ApplicationPackageImpl.Literals.APPLICATION__ADDONS);
- private IListProperty MENU_CONTRIBUTIONS = EMFProperties.list(MenuPackageImpl.Literals.MENU_CONTRIBUTIONS__MENU_CONTRIBUTIONS);
- private IListProperty TOOLBAR_CONTRIBUTIONS = EMFProperties.list(MenuPackageImpl.Literals.TOOL_BAR_CONTRIBUTIONS__TOOL_BAR_CONTRIBUTIONS);
- private IListProperty TRIM_CONTRIBUTIONS = EMFProperties.list(MenuPackageImpl.Literals.TRIM_CONTRIBUTIONS__TRIM_CONTRIBUTIONS);
-
- public ApplicationEditor(EditingDomain editingDomain, ModelEditor editor) {
- super(editingDomain, editor);
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Application.png")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.ApplicationEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.ApplicationEditor_Description;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- composite = createForm(parent, context);
- }
- getMaster().setValue(object);
- return composite;
- }
-
- protected Composite createForm(Composite parent, EMFDataBindingContext context) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.ApplicationEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- ControlFactory.createStringListWidget(parent, this, "Variables", UiPackageImpl.Literals.CONTEXT__VARIABLES, VERTICAL_LIST_WIDGET_INDENT);
- ControlFactory.createStringListWidget(parent, this, "Binding Contexts", CommandsPackageImpl.Literals.BINDINGS__BINDING_CONTEXTS, VERTICAL_LIST_WIDGET_INDENT);
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- WritableList list = new WritableList();
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_ADDONS, APPLICATION__ADDONS, element, Messages.ApplicationEditor_Addons) {
-
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
-
- });
-
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_HANDLER, HANDLER_CONTAINER__HANDLERS, element, Messages.ApplicationEditor_Handlers) {
-
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
-
- });
-
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_PART_DESCRIPTORS, PART_DESCRIPTOR_CONTAINER__DESCRIPTORS, element, Messages.ApplicationEditor_PartDescriptors) {
-
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
-
- });
-
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_BINDING_TABLE, BINDING_CONTAINER__BINDINGS, element, Messages.ApplicationEditor_BindingTables) {
-
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
-
- });
-
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_COMMAND, APPLICATION__COMMANDS, element, Messages.ApplicationEditor_Commands) {
-
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
-
- });
-
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_WINDOWS, ELEMENT_CONTAINER__CHILDREN, element, Messages.ApplicationEditor_Windows) {
-
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
-
- });
-
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_MENU_CONTRIBUTIONS, MENU_CONTRIBUTIONS, element, Messages.ApplicationEditor_MenuContributions) {
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
- });
-
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_TOOLBAR_CONTRIBUTIONS, TOOLBAR_CONTRIBUTIONS, element, Messages.ApplicationEditor_ToolBarContributions) {
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
- });
-
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_TRIM_CONTRIBUTIONS, TRIM_CONTRIBUTIONS, element, Messages.ApplicationEditor_TrimContributions) {
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
- });
-
- return list;
- }
-
- @Override
- public String getDetailLabel(Object element) {
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/BindingTableEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/BindingTableEditor.java
deleted file mode 100644
index 53f4c330..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/BindingTableEditor.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.property.list.IListProperty;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.ObservableColumnLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.ui.model.application.commands.MBindingTable;
-import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
-import org.eclipse.e4.ui.model.application.commands.MHandler;
-import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.databinding.IEMFListProperty;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditValueProperty;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class BindingTableEditor extends AbstractComponentEditor {
-
- private Composite composite;
- private Image image;
- private EMFDataBindingContext context;
-
- private IListProperty BINDING_TABLE__BINDINGS = EMFProperties.list(CommandsPackageImpl.Literals.BINDING_TABLE__BINDINGS);
- private EStackLayout stackLayout;
-
- public BindingTableEditor(EditingDomain editingDomain, ModelEditor editor) {
- super(editingDomain, editor);
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/BindingTable.png")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.BindingTableEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.BindingTableEditor_Description;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- if (getEditor().isModelFragment()) {
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
- createForm(composite, context, getMaster(), false);
- createForm(composite, context, getMaster(), true);
- } else {
- composite = createForm(parent, context, getMaster(), false);
- }
- }
-
- if (getEditor().isModelFragment()) {
- Control topControl;
- if (Util.isImport((EObject) object)) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if (stackLayout.topControl != topControl) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent, EMFDataBindingContext context, IObservableValue master, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- if (isImport) {
- ControlFactory.createFindImport(parent, this, context);
- return parent;
- }
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.BindingTableEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.BindingTableEditor_ContextId);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.BINDING_TABLE__BINDING_CONTEXT_ID).observeDetail(getMaster()));
-
- Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.setImage(getImage(t.getDisplay(), SEARCH_IMAGE));
- b.setText(Messages.BindingTableEditor_Find);
- }
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.BindingTableEditor_Keybindings);
- l.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, false, false));
-
- final TableViewer viewer = new TableViewer(parent);
- ObservableListContentProvider cp = new ObservableListContentProvider();
- viewer.setContentProvider(cp);
-
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 300;
- viewer.getControl().setLayoutData(gd);
- viewer.getTable().setHeaderVisible(true);
-
- {
- IEMFEditValueProperty prop = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.KEY_SEQUENCE__KEY_SEQUENCE);
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.BindingTableEditor_KeySequence);
- column.getColumn().setWidth(100);
- column.setLabelProvider(new ObservableColumnLabelProvider<MHandler>(prop.observeDetail(cp.getKnownElements())));
- }
-
- {
- IEMFEditValueProperty prop = EMFEditProperties.value(getEditingDomain(), FeaturePath.fromList(CommandsPackageImpl.Literals.KEY_BINDING__COMMAND, CommandsPackageImpl.Literals.COMMAND__COMMAND_NAME));
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.BindingTableEditor_Command);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MHandler>(prop.observeDetail(cp.getKnownElements())));
- }
-
- {
- IEMFEditValueProperty prop = EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID);
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.BindingTableEditor_Id);
- column.getColumn().setWidth(170);
- column.setLabelProvider(new ObservableColumnLabelProvider<MHandler>(prop.observeDetail(cp.getKnownElements())));
- }
-
- IEMFListProperty prop = EMFProperties.list(CommandsPackageImpl.Literals.BINDING_TABLE__BINDINGS);
- viewer.setInput(prop.observeDetail(getMaster()));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout();
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.BindingTableEditor_Up);
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MBindingTable container = (MBindingTable) getMaster().getValue();
- int idx = container.getBindings().indexOf(obj) - 1;
- if (idx >= 0) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), CommandsPackageImpl.Literals.BINDING_TABLE__BINDINGS, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.BindingTableEditor_Down);
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MBindingTable container = (MBindingTable) getMaster().getValue();
- int idx = container.getBindings().indexOf(obj) + 1;
- if (idx < container.getBindings().size()) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), CommandsPackageImpl.Literals.BINDING_TABLE__BINDINGS, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.BindingTableEditor_Add);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MKeyBinding handler = MCommandsFactory.INSTANCE.createKeyBinding();
- System.err.println(getMaster().getValue());
- Command cmd = AddCommand.create(getEditingDomain(), getMaster().getValue(), CommandsPackageImpl.Literals.BINDING_TABLE__BINDINGS, handler);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- getEditor().setSelection(handler);
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.BindingTableEditor_Remove);
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- List<?> keybinding = ((IStructuredSelection) viewer.getSelection()).toList();
- Command cmd = RemoveCommand.create(getEditingDomain(), getMaster().getValue(), CommandsPackageImpl.Literals.BINDING_TABLE__BINDINGS, keybinding);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
- }
- });
- }
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- return BINDING_TABLE__BINDINGS.observe(element);
- }
-
- @Override
- public String getDetailLabel(Object element) {
- MBindingTable cmd = (MBindingTable) element;
- if (cmd.getBindingContextId() != null && cmd.getBindingContextId().trim().length() > 0) {
- return cmd.getBindingContextId();
- }
-
- return null;
- }
-
- @Override
- public FeaturePath[] getLabelProperties() {
- return new FeaturePath[] { FeaturePath.fromList(CommandsPackageImpl.Literals.BINDING_TABLE__BINDING_CONTEXT_ID) };
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java
deleted file mode 100644
index 4e55a7a0..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/CommandEditor.java
+++ /dev/null
@@ -1,435 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.ObservableColumnLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.ui.model.application.commands.MCommand;
-import org.eclipse.e4.ui.model.application.commands.MCommandParameter;
-import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.databinding.IEMFValueProperty;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditListProperty;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnViewerEditor;
-import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
-import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
-import org.eclipse.jface.viewers.ComboBoxCellEditor;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.TableViewerEditor;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class CommandEditor extends AbstractComponentEditor {
-
- private Composite composite;
- private Image image;
- private EMFDataBindingContext context;
- private EStackLayout stackLayout;
-
- public CommandEditor(EditingDomain editingDomain, ModelEditor editor) {
- super(editingDomain, editor);
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Command.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.CommandEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.CommandEditor_Description;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- if (getEditor().isModelFragment()) {
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
- createForm(composite, context, getMaster(), false);
- createForm(composite, context, getMaster(), true);
- } else {
- composite = createForm(parent, context, getMaster(), false);
- }
- }
-
- if (getEditor().isModelFragment()) {
- Control topControl;
- if (Util.isImport((EObject) object)) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if (stackLayout.topControl != topControl) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent, EMFDataBindingContext context, IObservableValue master, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- if (isImport) {
- ControlFactory.createFindImport(parent, this, context);
-
- return parent;
- }
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.CommandEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.CommandEditor_Name);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.COMMAND__COMMAND_NAME).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.CommandEditor_LabelDescription);
- l.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, false, false));
-
- Text t = new Text(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- gd.heightHint = 100;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.COMMAND__DESCRIPTION).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.CommandEditor_Parameters);
- l.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, false, false));
-
- final TableViewer viewer = new TableViewer(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER);
- ObservableListContentProvider cp = new ObservableListContentProvider();
- viewer.setContentProvider(cp);
- viewer.getTable().setHeaderVisible(true);
-
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 120;
- viewer.getControl().setLayoutData(gd);
-
- {
- IEMFValueProperty prop = EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID);
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.CommandEditor_ParameterId);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MCommandParameter>(prop.observeDetail(cp.getKnownElements())));
- column.setEditingSupport(new EditingSupport(viewer) {
- private TextCellEditor editor = new TextCellEditor(viewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- if (value.toString().trim().length() == 0) {
- value = null;
- }
-
- Command cmd = SetCommand.create(getEditingDomain(), element, ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID, value);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
-
- @Override
- protected Object getValue(Object element) {
- MCommandParameter obj = (MCommandParameter) element;
- return obj.getElementId() != null ? obj.getElementId() : ""; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return editor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
- }
-
- {
- IEMFValueProperty prop = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.COMMAND_PARAMETER__NAME);
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.CommandEditor_ParameterName);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MCommandParameter>(prop.observeDetail(cp.getKnownElements())));
- column.setEditingSupport(new EditingSupport(viewer) {
- private TextCellEditor editor = new TextCellEditor(viewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- Command cmd = SetCommand.create(getEditingDomain(), element, CommandsPackageImpl.Literals.COMMAND_PARAMETER__NAME, value);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
-
- @Override
- protected Object getValue(Object element) {
- MCommandParameter obj = (MCommandParameter) element;
- return obj.getName() != null ? obj.getName() : ""; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return editor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
- }
-
- {
- IEMFValueProperty prop = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.COMMAND_PARAMETER__TYPE_ID);
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.CommandEditor_ParameterTypeId);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MCommandParameter>(prop.observeDetail(cp.getKnownElements())));
- column.setEditingSupport(new EditingSupport(viewer) {
- private TextCellEditor editor = new TextCellEditor(viewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- Command cmd = SetCommand.create(getEditingDomain(), element, CommandsPackageImpl.Literals.COMMAND_PARAMETER__TYPE_ID, value);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
-
- @Override
- protected Object getValue(Object element) {
- MCommandParameter obj = (MCommandParameter) element;
- return obj.getTypeId() != null ? obj.getTypeId() : ""; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return editor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
- }
-
- {
- IEMFValueProperty prop = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.COMMAND_PARAMETER__OPTIONAL);
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.CommandEditor_ParameterOptional);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MCommandParameter>(prop.observeDetail(cp.getKnownElements())) {
- @Override
- public String getText(MCommandParameter element) {
- return element.isOptional() ? Messages.CommandEditor_ParameterOptional_Yes : Messages.CommandEditor_ParameterOptional_No;
- }
- });
- column.setEditingSupport(new EditingSupport(viewer) {
- private ComboBoxCellEditor editor = new ComboBoxCellEditor(viewer.getTable(), new String[] { Messages.CommandEditor_ParameterOptional_Yes, Messages.CommandEditor_ParameterOptional_No });
-
- @Override
- protected void setValue(Object element, Object value) {
- int idx = ((Number) value).intValue();
- Command cmd = SetCommand.create(getEditingDomain(), element, CommandsPackageImpl.Literals.COMMAND_PARAMETER__OPTIONAL, idx == 0);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
-
- @Override
- protected Object getValue(Object element) {
- MCommandParameter obj = (MCommandParameter) element;
- return obj.isOptional() ? 0 : 1;
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return editor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
- }
-
- ColumnViewerEditorActivationStrategy editorActivationStrategy = new ColumnViewerEditorActivationStrategy(viewer) {
- @Override
- protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
- boolean singleSelect = ((IStructuredSelection) viewer.getSelection()).size() == 1;
- boolean isLeftDoubleMouseSelect = event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION && ((MouseEvent) event.sourceEvent).button == 1;
-
- return singleSelect && (isLeftDoubleMouseSelect || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL);
- }
- };
- TableViewerEditor.create(viewer, editorActivationStrategy, ColumnViewerEditor.TABBING_HORIZONTAL | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR);
-
- IEMFEditListProperty mProp = EMFEditProperties.list(getEditingDomain(), CommandsPackageImpl.Literals.COMMAND__PARAMETERS);
- viewer.setInput(mProp.observeDetail(getMaster()));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout();
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.CommandEditor_Up);
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.CommandEditor_Down);
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.CommandEditor_Add);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MCommandParameter param = MCommandsFactory.INSTANCE.createCommandParameter();
- Command cmd = AddCommand.create(getEditingDomain(), getMaster().getValue(), CommandsPackageImpl.Literals.COMMAND__PARAMETERS, param);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.editElement(param, 0);
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.CommandEditor_Remove);
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- }
-
- ControlFactory.createStringListWidget(parent, this, "Tags", ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__TAGS, VERTICAL_LIST_WIDGET_INDENT);
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- return null;
- }
-
- @Override
- public String getDetailLabel(Object element) {
- MCommand cmd = (MCommand) element;
- if (cmd.getCommandName() != null && cmd.getCommandName().trim().length() > 0) {
- return cmd.getCommandName();
- }
-
- return null;
- }
-
- @Override
- public FeaturePath[] getLabelProperties() {
- return new FeaturePath[] { FeaturePath.fromList(CommandsPackageImpl.Literals.COMMAND__COMMAND_NAME) };
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java
deleted file mode 100644
index 7c12c0b2..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ControlFactory.java
+++ /dev/null
@@ -1,302 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.util.Arrays;
-import java.util.List;
-import org.eclipse.core.databinding.Binding;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.map.IObservableMap;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.FindImportElementDialog;
-import org.eclipse.e4.ui.model.application.MApplication;
-import org.eclipse.e4.ui.model.application.MApplicationElement;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.MContext;
-import org.eclipse.e4.ui.model.application.ui.MUILabel;
-import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.databinding.IEMFListProperty;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditListProperty;
-import org.eclipse.emf.databinding.edit.IEMFEditValueProperty;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.IViewerValueProperty;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.databinding.viewers.ObservableMapLabelProvider;
-import org.eclipse.jface.databinding.viewers.ViewerProperties;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyAdapter;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class ControlFactory {
- public static void createFindImport(Composite parent, final AbstractComponentEditor editor, EMFDataBindingContext context) {
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- Label l = new Label(parent, SWT.NONE);
- l.setText("Reference-Id");
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(editor.getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(editor.getMaster()));
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setText("Find ...");
- b.setImage(editor.getImage(t.getDisplay(), AbstractComponentEditor.SEARCH_IMAGE));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- FindImportElementDialog dialog = new FindImportElementDialog(b.getShell(), editor.getEditingDomain(), (EObject) editor.getMaster().getValue());
- dialog.open();
- }
- });
- }
-
- public static void createSelectedElement(Composite parent, final AbstractComponentEditor editor, final EMFDataBindingContext context, String label) {
- Label l = new Label(parent, SWT.NONE);
- l.setText(label);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- ComboViewer viewer = new ComboViewer(parent);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- viewer.getControl().setLayoutData(gd);
- IEMFEditListProperty listProp = EMFEditProperties.list(editor.getEditingDomain(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN);
- IEMFEditValueProperty labelProp = EMFEditProperties.value(editor.getEditingDomain(), UiPackageImpl.Literals.UI_LABEL__LABEL);
- IEMFEditValueProperty idProp = EMFEditProperties.value(editor.getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID);
-
- IViewerValueProperty vProp = ViewerProperties.singleSelection();
-
- final Binding[] binding = new Binding[1];
- final IObservableValue uiObs = vProp.observe(viewer);
- final IObservableValue mObs = EMFEditProperties.value(editor.getEditingDomain(), UiPackageImpl.Literals.ELEMENT_CONTAINER__SELECTED_ELEMENT).observeDetail(editor.getMaster());
- editor.getMaster().addValueChangeListener(new IValueChangeListener() {
-
- public void handleValueChange(ValueChangeEvent event) {
- if (binding[0] != null) {
- binding[0].dispose();
- }
-
- }
- });
-
- final IObservableList list = listProp.observeDetail(editor.getMaster());
- ObservableListContentProvider cp = new ObservableListContentProvider();
- viewer.setContentProvider(cp);
- IObservableMap[] attributeMaps = { labelProp.observeDetail(cp.getKnownElements()), idProp.observeDetail(cp.getKnownElements()) };
- viewer.setLabelProvider(new ObservableMapLabelProvider(attributeMaps) {
- @Override
- public String getText(Object element) {
- EObject o = (EObject) element;
- String rv = o.eClass().getName();
-
- if (element instanceof MUILabel) {
- MUILabel label = (MUILabel) element;
- if (!Util.isNullOrEmpty(label.getLabel())) {
- return rv + " - " + label.getLabel().trim();
- }
-
- }
-
- if (element instanceof MApplicationElement) {
- MApplicationElement appEl = (MApplicationElement) element;
- if (!Util.isNullOrEmpty(appEl.getElementId())) {
- return rv + " - " + appEl.getElementId();
- }
- }
-
- return rv + "[" + list.indexOf(element) + "]";
- }
- });
- viewer.setInput(list);
-
- editor.getMaster().addValueChangeListener(new IValueChangeListener() {
-
- public void handleValueChange(ValueChangeEvent event) {
- binding[0] = context.bindValue(uiObs, mObs);
- }
- });
- }
-
- public static void createStringListWidget(Composite parent, final AbstractComponentEditor editor, String label, final EStructuralFeature feature, int vIndent) {
- Label l = new Label(parent, SWT.NONE);
- l.setText(label);
- GridData gd = new GridData(GridData.END, GridData.BEGINNING, false, false);
- gd.verticalIndent = vIndent;
- l.setLayoutData(gd);
-
- final Text t = new Text(parent, SWT.BORDER);
- gd = new GridData(GridData.FILL, GridData.BEGINNING, true, false);
- gd.verticalIndent = vIndent;
- t.setLayoutData(gd);
- t.addKeyListener(new KeyAdapter() {
- @Override
- public void keyPressed(KeyEvent e) {
- if (e.keyCode == SWT.CR || e.keyCode == SWT.LF) {
- handleAddText(editor, UiPackageImpl.Literals.CONTEXT__VARIABLES, t);
- }
- }
- });
-
- Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.ControlFactory_AddNoEllipse);
- b.setImage(editor.getImage(b.getDisplay(), AbstractComponentEditor.TABLE_ADD_IMAGE));
- gd = new GridData(GridData.FILL, GridData.CENTER, false, false);
- gd.verticalIndent = vIndent;
- b.setLayoutData(gd);
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- handleAddText(editor, feature, t);
- }
- });
-
- new Label(parent, SWT.NONE);
-
- final TableViewer viewer = new TableViewer(parent);
- viewer.setLabelProvider(new LabelProvider());
- viewer.setContentProvider(new ObservableListContentProvider());
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 150;
- viewer.getControl().setLayoutData(gd);
-
- IEMFListProperty prop = EMFProperties.list(feature);
- viewer.setInput(prop.observeDetail(editor.getMaster()));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout();
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.ControlFactory_Up);
- b.setImage(editor.getImage(b.getDisplay(), AbstractComponentEditor.ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MContext container = (MContext) editor.getMaster().getValue();
- int idx = container.getVariables().indexOf(obj) - 1;
- if (idx >= 0) {
- Command cmd = MoveCommand.create(editor.getEditingDomain(), editor.getMaster().getValue(), feature, obj, idx);
-
- if (cmd.canExecute()) {
- editor.getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.ControlFactory_Down);
- b.setImage(editor.getImage(b.getDisplay(), AbstractComponentEditor.ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MContext container = (MApplication) editor.getMaster().getValue();
- int idx = container.getVariables().indexOf(obj) + 1;
- if (idx < container.getVariables().size()) {
- Command cmd = MoveCommand.create(editor.getEditingDomain(), editor.getMaster().getValue(), feature, obj, idx);
-
- if (cmd.canExecute()) {
- editor.getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.ControlFactory_Remove);
- b.setImage(editor.getImage(b.getDisplay(), AbstractComponentEditor.TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- MContext el = (MContext) editor.getMaster().getValue();
- List<?> ids = ((IStructuredSelection) viewer.getSelection()).toList();
- Command cmd = RemoveCommand.create(editor.getEditingDomain(), el, feature, ids);
- if (cmd.canExecute()) {
- editor.getEditingDomain().getCommandStack().execute(cmd);
- if (el.getVariables().size() > 0) {
- viewer.setSelection(new StructuredSelection(el.getVariables().get(0)));
- }
- }
- }
- }
- });
- }
-
- private static void handleAddText(AbstractComponentEditor editor, EStructuralFeature feature, Text tagText) {
- if (tagText.getText().trim().length() > 0) {
- String[] tags = tagText.getText().split(";"); //$NON-NLS-1$
- for (int i = 0; i < tags.length; i++) {
- tags[i] = tags[i].trim();
- }
-
- MApplicationElement appEl = (MApplicationElement) editor.getMaster().getValue();
- Command cmd = AddCommand.create(editor.getEditingDomain(), appEl, feature, Arrays.asList(tags));
- if (cmd.canExecute()) {
- editor.getEditingDomain().getCommandStack().execute(cmd);
- }
- tagText.setText(""); //$NON-NLS-1$
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectMenuItemEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectMenuItemEditor.java
deleted file mode 100644
index 45998f78..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectMenuItemEditor.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.ContributionClassDialog;
-import org.eclipse.e4.ui.model.application.MContribution;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class DirectMenuItemEditor extends MenuItemEditor {
- private Image image;
-
- public DirectMenuItemEditor(EditingDomain editingDomain, ModelEditor editor, IProject project) {
- super(editingDomain, editor, project);
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectMenuItem.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.DirectMenuItemEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.DirectMenuItemEditor_Description;
- }
-
- @Override
- protected void createFormSubTypeForm(Composite parent, EMFDataBindingContext context, WritableValue master) {
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.DirectMenuItemEditor_ClassURI);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI).observeDetail(master));
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.setImage(getImage(t.getDisplay(), SEARCH_IMAGE));
- b.setText(Messages.DirectMenuItemEditor_Find);
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- ContributionClassDialog dialog = new ContributionClassDialog(b.getShell(), project, getEditingDomain(), (MContribution) getMaster().getValue(), ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI);
- dialog.open();
- }
- });
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectToolItemEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectToolItemEditor.java
deleted file mode 100644
index 43f64ed3..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DirectToolItemEditor.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.ContributionClassDialog;
-import org.eclipse.e4.ui.model.application.MContribution;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class DirectToolItemEditor extends ToolItemEditor {
- private Image image;
-
- public DirectToolItemEditor(EditingDomain editingDomain, ModelEditor editor, IProject project) {
- super(editingDomain,editor, project);
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/DirectToolItem.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
-
- @Override
- protected void createSubTypeFormElements(Composite parent, EMFDataBindingContext context, WritableValue master) {
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.DirectToolItemEditor_ClassURI);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- context.bindValue(textProp.observeDelayed(200,t), EMFEditProperties.value( getEditingDomain(), ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI).observeDetail(master));
-
- final Button b = new Button(parent, SWT.PUSH|SWT.FLAT);
- b.setText(Messages.DirectToolItemEditor_Find);
- b.setImage(getImage(b.getDisplay(), SEARCH_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- ContributionClassDialog dialog = new ContributionClassDialog(b.getShell(),project,getEditingDomain(),(MContribution) getMaster().getValue(), ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI);
- dialog.open();
- }
- });
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.DirectToolItemEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.DirectToolItemEditor_Description;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledMenuItemEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledMenuItemEditor.java
deleted file mode 100644
index 8ed2596d..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledMenuItemEditor.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.ObservableColumnLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.HandledMenuItemCommandSelectionDialog;
-import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
-import org.eclipse.e4.ui.model.application.commands.MParameter;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem;
-import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.databinding.IEMFValueProperty;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditListProperty;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnViewerEditor;
-import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
-import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.TableViewerEditor;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class HandledMenuItemEditor extends MenuItemEditor {
- private Image image;
- private IModelResource resource;
-
- public HandledMenuItemEditor(EditingDomain editingDomain, ModelEditor editor, IProject project, IModelResource resource) {
- super(editingDomain,editor,project);
- this.resource = resource;
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledMenuItem.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.HandledMenuItemEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.HandledMenuItemEditor_Description;
- }
-
- @Override
- protected void createFormSubTypeForm(Composite parent, EMFDataBindingContext context, final WritableValue master) {
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.HandledMenuItemEditor_Command);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- t.setEnabled(false);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), FeaturePath.fromList(MenuPackageImpl.Literals.HANDLED_ITEM__COMMAND, ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID)).observeDetail(master));
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledMenuItemEditor_Find);
- b.setImage(getImage(b.getDisplay(), SEARCH_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- HandledMenuItemCommandSelectionDialog dialog = new HandledMenuItemCommandSelectionDialog(b.getShell(), (MHandledItem) getMaster().getValue(), resource);
- dialog.open();
- }
- });
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.HandledMenuItemEditor_Parameters);
- l.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, false, false));
-
- final TableViewer tableviewer = new TableViewer(parent);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 120;
- tableviewer.getTable().setHeaderVisible(true);
- tableviewer.getControl().setLayoutData(gd);
-
- ObservableListContentProvider cp = new ObservableListContentProvider();
- tableviewer.setContentProvider(cp);
-
- {
- IEMFValueProperty prop = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.PARAMETER__NAME);
-
- TableViewerColumn column = new TableViewerColumn(tableviewer, SWT.NONE);
- column.getColumn().setText(Messages.HandledMenuItemEditor_Tag);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MParameter>(prop.observeDetail(cp.getKnownElements())));
- column.setEditingSupport(new EditingSupport(tableviewer) {
- private TextCellEditor cellEditor = new TextCellEditor(tableviewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- Command cmd = SetCommand.create(getEditingDomain(), element, CommandsPackageImpl.Literals.PARAMETER__NAME, value);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
-
- @Override
- protected Object getValue(Object element) {
- String val = ((MParameter) element).getName();
- return val == null ? "" : val; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return cellEditor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
- }
-
- {
- IEMFValueProperty prop = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.PARAMETER__VALUE);
-
- TableViewerColumn column = new TableViewerColumn(tableviewer, SWT.NONE);
- column.getColumn().setText(Messages.HandledMenuItemEditor_Value);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MParameter>(prop.observeDetail(cp.getKnownElements())));
- column.setEditingSupport(new EditingSupport(tableviewer) {
- private TextCellEditor cellEditor = new TextCellEditor(tableviewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- Command cmd = SetCommand.create(getEditingDomain(), element, CommandsPackageImpl.Literals.PARAMETER__VALUE, value);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
-
- @Override
- protected Object getValue(Object element) {
- String val = ((MParameter) element).getValue();
- return val == null ? "" : val; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return cellEditor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
- }
-
- ColumnViewerEditorActivationStrategy editorActivationStrategy = new ColumnViewerEditorActivationStrategy(tableviewer) {
- @Override
- protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
- boolean singleSelect = ((IStructuredSelection) tableviewer.getSelection()).size() == 1;
- boolean isLeftDoubleMouseSelect = event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION && ((MouseEvent) event.sourceEvent).button == 1;
-
- return singleSelect && (isLeftDoubleMouseSelect || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL);
- }
- };
- TableViewerEditor.create(tableviewer, editorActivationStrategy, ColumnViewerEditor.TABBING_HORIZONTAL | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR);
-
- IEMFEditListProperty prop = EMFEditProperties.list(getEditingDomain(), MenuPackageImpl.Literals.HANDLED_ITEM__PARAMETERS);
- tableviewer.setInput(prop.observeDetail(master));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout();
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledMenuItemEditor_Up);
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledMenuItemEditor_Down);
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledMenuItemEditor_Add);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MHandledItem item = (MHandledItem) master.getValue();
- MParameter param = MCommandsFactory.INSTANCE.createParameter();
- Command cmd = AddCommand.create(getEditingDomain(), item, MenuPackageImpl.Literals.HANDLED_ITEM__PARAMETERS, param);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- tableviewer.editElement(param, 0);
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledMenuItemEditor_Remove);
- b.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- IStructuredSelection s = (IStructuredSelection) tableviewer.getSelection();
- if (!s.isEmpty()) {
- MHandledItem item = (MHandledItem) master.getValue();
- Command cmd = RemoveCommand.create(getEditingDomain(), item, MenuPackageImpl.Literals.HANDLED_ITEM__PARAMETERS, s.toList());
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
- }
-
- });
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledToolItemEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledToolItemEditor.java
deleted file mode 100644
index e0eb7458..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandledToolItemEditor.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.ObservableColumnLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.HandledToolItemCommandSelectionDialog;
-import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
-import org.eclipse.e4.ui.model.application.commands.MParameter;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.menu.MHandledItem;
-import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.databinding.IEMFValueProperty;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditListProperty;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnViewerEditor;
-import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
-import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.TableViewerEditor;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class HandledToolItemEditor extends ToolItemEditor {
- private Image image;
- private IModelResource resource;
-
- public HandledToolItemEditor(EditingDomain editingDomain, ModelEditor editor, IProject project, IModelResource resource) {
- super(editingDomain, editor, project);
- this.resource = resource;
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/HandledToolItem.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- protected void createSubTypeFormElements(Composite parent, EMFDataBindingContext context, final WritableValue master) {
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.HandledToolItemEditor_Command);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- t.setEnabled(false);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), FeaturePath.fromList(MenuPackageImpl.Literals.HANDLED_ITEM__COMMAND, ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID)).observeDetail(master));
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledToolItemEditor_Find);
- b.setImage(getImage(b.getDisplay(), SEARCH_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- HandledToolItemCommandSelectionDialog dialog = new HandledToolItemCommandSelectionDialog(b.getShell(), (MHandledItem) getMaster().getValue(), resource);
- dialog.open();
- }
- });
- }
-
- // ------------------------------------------------------------
-
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.HandledToolItemEditor_Parameters);
- l.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, false, false));
-
- final TableViewer tableviewer = new TableViewer(parent);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 120;
- tableviewer.getTable().setHeaderVisible(true);
- tableviewer.getControl().setLayoutData(gd);
-
- ObservableListContentProvider cp = new ObservableListContentProvider();
- tableviewer.setContentProvider(cp);
-
- {
- IEMFValueProperty prop = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.PARAMETER__NAME);
-
- TableViewerColumn column = new TableViewerColumn(tableviewer, SWT.NONE);
- column.getColumn().setText(Messages.HandledToolItemEditor_ParametersName);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MParameter>(prop.observeDetail(cp.getKnownElements())));
- column.setEditingSupport(new EditingSupport(tableviewer) {
- private TextCellEditor cellEditor = new TextCellEditor(tableviewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- Command cmd = SetCommand.create(getEditingDomain(), element, CommandsPackageImpl.Literals.PARAMETER__NAME, value);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
-
- @Override
- protected Object getValue(Object element) {
- String val = ((MParameter) element).getName();
- return val == null ? "" : val; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return cellEditor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
- }
-
- {
- IEMFValueProperty prop = EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.PARAMETER__VALUE);
-
- TableViewerColumn column = new TableViewerColumn(tableviewer, SWT.NONE);
- column.getColumn().setText(Messages.HandledToolItemEditor_ParametersValue);
- column.getColumn().setWidth(200);
- column.setLabelProvider(new ObservableColumnLabelProvider<MParameter>(prop.observeDetail(cp.getKnownElements())));
- column.setEditingSupport(new EditingSupport(tableviewer) {
- private TextCellEditor cellEditor = new TextCellEditor(tableviewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- Command cmd = SetCommand.create(getEditingDomain(), element, CommandsPackageImpl.Literals.PARAMETER__VALUE, value);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
-
- @Override
- protected Object getValue(Object element) {
- String val = ((MParameter) element).getValue();
- return val == null ? "" : val; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return cellEditor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
- }
-
- ColumnViewerEditorActivationStrategy editorActivationStrategy = new ColumnViewerEditorActivationStrategy(tableviewer) {
- @Override
- protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
- boolean singleSelect = ((IStructuredSelection) tableviewer.getSelection()).size() == 1;
- boolean isLeftDoubleMouseSelect = event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION && ((MouseEvent) event.sourceEvent).button == 1;
-
- return singleSelect && (isLeftDoubleMouseSelect || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL);
- }
- };
- TableViewerEditor.create(tableviewer, editorActivationStrategy, ColumnViewerEditor.TABBING_HORIZONTAL | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR);
-
- IEMFEditListProperty prop = EMFEditProperties.list(getEditingDomain(), MenuPackageImpl.Literals.HANDLED_ITEM__PARAMETERS);
- tableviewer.setInput(prop.observeDetail(getMaster()));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout();
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledToolItemEditor_Up);
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledToolItemEditor_Down);
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledToolItemEditor_Add);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MHandledItem item = (MHandledItem) master.getValue();
- MParameter param = MCommandsFactory.INSTANCE.createParameter();
- Command cmd = AddCommand.create(getEditingDomain(), item, MenuPackageImpl.Literals.HANDLED_ITEM__PARAMETERS, param);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- tableviewer.editElement(param, 0);
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandledToolItemEditor_Remove);
- b.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- IStructuredSelection s = (IStructuredSelection) tableviewer.getSelection();
- if (!s.isEmpty()) {
- MHandledItem item = (MHandledItem) master.getValue();
- Command cmd = RemoveCommand.create(getEditingDomain(), item, MenuPackageImpl.Literals.HANDLED_ITEM__PARAMETERS, s.toList());
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
- }
-
- });
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.HandledToolItemEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.HandledToolItemEditor_Description;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandlerEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandlerEditor.java
deleted file mode 100644
index 6788e92a..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/HandlerEditor.java
+++ /dev/null
@@ -1,215 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.ContributionClassDialog;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.HandlerCommandSelectionDialog;
-import org.eclipse.e4.ui.model.application.MContribution;
-import org.eclipse.e4.ui.model.application.commands.MHandler;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class HandlerEditor extends AbstractComponentEditor {
- private Composite composite;
- private Image image;
- private EMFDataBindingContext context;
- private IModelResource resource;
- private IProject project;
- private EStackLayout stackLayout;
-
- public HandlerEditor(EditingDomain editingDomain, ModelEditor editor, IModelResource resource, IProject project) {
- super(editingDomain, editor);
- this.resource = resource;
- this.project = project;
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Handler.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.HandlerEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.HandlerEditor_Description;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- if (getEditor().isModelFragment()) {
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
- createForm(composite, context, getMaster(), false);
- createForm(composite, context, getMaster(), true);
- } else {
- composite = createForm(parent, context, getMaster(), false);
- }
- }
-
- if (getEditor().isModelFragment()) {
- Control topControl;
- if (Util.isImport((EObject) object)) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if (stackLayout.topControl != topControl) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent, EMFDataBindingContext context, IObservableValue master, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- if (isImport) {
- ControlFactory.createFindImport(parent, this, context);
- return parent;
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.HandlerEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.HandlerEditor_Command);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- t.setEnabled(false);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), FeaturePath.fromList(CommandsPackageImpl.Literals.HANDLER__COMMAND, ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID)).observeDetail(getMaster()));
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.HandlerEditor_Find);
- b.setImage(getImage(b.getDisplay(), SEARCH_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- HandlerCommandSelectionDialog dialog = new HandlerCommandSelectionDialog(b.getShell(), (MHandler) getMaster().getValue(), resource);
- dialog.open();
- }
- });
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.HandlerEditor_ClassURI);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI).observeDetail(getMaster()));
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setImage(getImage(b.getDisplay(), SEARCH_IMAGE));
- b.setText(Messages.HandlerEditor_Find);
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- ContributionClassDialog dialog = new ContributionClassDialog(b.getShell(), project, getEditingDomain(), (MContribution) getMaster().getValue(), ApplicationPackageImpl.Literals.CONTRIBUTION__CONTRIBUTION_URI);
- dialog.open();
- }
- });
- }
-
- ControlFactory.createStringListWidget(parent, this, "Tags", ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__TAGS, VERTICAL_LIST_WIDGET_INDENT);
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- return null;
- }
-
- @Override
- public String getDetailLabel(Object element) {
- MHandler handler = (MHandler) element;
- if (handler.getCommand() != null && handler.getCommand().getCommandName() != null && handler.getCommand().getCommandName().trim().length() > 0) {
- return handler.getCommand().getCommandName();
- }
-
- return null;
- }
-
- @Override
- public FeaturePath[] getLabelProperties() {
- return new FeaturePath[] { FeaturePath.fromList(CommandsPackageImpl.Literals.HANDLER__COMMAND, CommandsPackageImpl.Literals.COMMAND__COMMAND_NAME) };
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/InputPartEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/InputPartEditor.java
deleted file mode 100644
index b1164d29..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/InputPartEditor.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class InputPartEditor extends PartEditor {
-
- public InputPartEditor(EditingDomain editingDomain, ModelEditor editor, IProject project) {
- super(editingDomain, editor, project);
- }
-
-
- @Override
- public String getLabel(Object element) {
- return Messages.InputPartEditor_Label;
- }
-
- @Override
- protected void createSubformElements(Composite parent, EMFDataBindingContext context, IObservableValue master) {
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.InputPartEditor_InputURI);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan=2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200,t), EMFEditProperties.value(getEditingDomain(), UiPackageImpl.Literals.INPUT__INPUT_URI).observeDetail(master));
- }
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/KeyBindingEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/KeyBindingEditor.java
deleted file mode 100644
index 05c8a277..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/KeyBindingEditor.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.property.value.IValueProperty;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.IModelResource;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.KeyBindingCommandSelectionDialog;
-import org.eclipse.e4.ui.model.application.commands.MCommandsFactory;
-import org.eclipse.e4.ui.model.application.commands.MKeyBinding;
-import org.eclipse.e4.ui.model.application.commands.MKeySequence;
-import org.eclipse.e4.ui.model.application.commands.MParameter;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditListProperty;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ViewerSupport;
-import org.eclipse.jface.viewers.CellEditor;
-import org.eclipse.jface.viewers.ColumnViewerEditor;
-import org.eclipse.jface.viewers.ColumnViewerEditorActivationEvent;
-import org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy;
-import org.eclipse.jface.viewers.EditingSupport;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.jface.viewers.TableViewerEditor;
-import org.eclipse.jface.viewers.TextCellEditor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class KeyBindingEditor extends AbstractComponentEditor {
-
- private Composite composite;
- private Image image;
- private EMFDataBindingContext context;
- private IModelResource resource;
- private EStackLayout stackLayout;
-
- public KeyBindingEditor(EditingDomain editingDomain, ModelEditor editor, IModelResource resource) {
- super(editingDomain, editor);
- this.resource = resource;
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/KeyBinding.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.KeyBindingEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.KeyBindingEditor_Description;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- if (getEditor().isModelFragment()) {
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
- createForm(composite, context, getMaster(), false);
- createForm(composite, context, getMaster(), true);
- } else {
- composite = createForm(parent, context, getMaster(), false);
- }
- }
-
- if (getEditor().isModelFragment()) {
- Control topControl;
- if (Util.isImport((EObject) object)) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if (stackLayout.topControl != topControl) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent, EMFDataBindingContext context, IObservableValue master, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- if (isImport) {
- ControlFactory.createFindImport(parent, this, context);
- return parent;
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.KeyBindingEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.KeyBindingEditor_Sequence);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.KEY_SEQUENCE__KEY_SEQUENCE).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.KeyBindingEditor_Command);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- t.setEnabled(false);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), FeaturePath.fromList(CommandsPackageImpl.Literals.KEY_BINDING__COMMAND, ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID)).observeDetail(getMaster()));
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.KeyBindingEditor_Find);
- b.setImage(getImage(b.getDisplay(), SEARCH_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- KeyBindingCommandSelectionDialog dialog = new KeyBindingCommandSelectionDialog(b.getShell(), (MKeyBinding) getMaster().getValue(), resource);
- dialog.open();
- }
- });
- }
-
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.KeyBindingEditor_Parameters);
- l.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, false, false));
-
- final TableViewer tableviewer = new TableViewer(parent);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 120;
- tableviewer.getTable().setHeaderVisible(true);
- tableviewer.getControl().setLayoutData(gd);
- IEMFEditListProperty prop = EMFEditProperties.list(getEditingDomain(), CommandsPackageImpl.Literals.KEY_BINDING__PARAMETERS);
-
- TableViewerColumn column = new TableViewerColumn(tableviewer, SWT.NONE);
- column.getColumn().setText(Messages.KeyBindingEditor_ParametersKey);
- column.getColumn().setWidth(200);
- column.setEditingSupport(new EditingSupport(tableviewer) {
- private TextCellEditor cellEditor = new TextCellEditor(tableviewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- ((MParameter) element).setName((String) value);
- }
-
- @Override
- protected Object getValue(Object element) {
- String val = ((MParameter) element).getName();
- return val == null ? "" : val; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return cellEditor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
-
- column = new TableViewerColumn(tableviewer, SWT.NONE);
- column.getColumn().setText(Messages.KeyBindingEditor_ParametersValue);
- column.getColumn().setWidth(200);
- column.setEditingSupport(new EditingSupport(tableviewer) {
- private TextCellEditor cellEditor = new TextCellEditor(tableviewer.getTable());
-
- @Override
- protected void setValue(Object element, Object value) {
- ((MParameter) element).setValue((String) value);
- }
-
- @Override
- protected Object getValue(Object element) {
- String val = ((MParameter) element).getValue();
- return val == null ? "" : val; //$NON-NLS-1$
- }
-
- @Override
- protected CellEditor getCellEditor(Object element) {
- return cellEditor;
- }
-
- @Override
- protected boolean canEdit(Object element) {
- return true;
- }
- });
-
- ColumnViewerEditorActivationStrategy editorActivationStrategy = new ColumnViewerEditorActivationStrategy(tableviewer) {
- @Override
- protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
- boolean singleSelect = ((IStructuredSelection) tableviewer.getSelection()).size() == 1;
- boolean isLeftDoubleMouseSelect = event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION && ((MouseEvent) event.sourceEvent).button == 1;
-
- return singleSelect && (isLeftDoubleMouseSelect || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL);
- }
- };
- TableViewerEditor.create(tableviewer, editorActivationStrategy, ColumnViewerEditor.TABBING_HORIZONTAL | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR);
-
- ViewerSupport.bind(tableviewer, prop.observeDetail(getMaster()), new IValueProperty[] { EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.PARAMETER__NAME), EMFEditProperties.value(getEditingDomain(), CommandsPackageImpl.Literals.PARAMETER__VALUE) });
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout();
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.KeyBindingEditor_Up);
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.KeyBindingEditor_Down);
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.KeyBindingEditor_Add);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MKeyBinding item = (MKeyBinding) getMaster().getValue();
- MParameter param = MCommandsFactory.INSTANCE.createParameter();
- Command cmd = AddCommand.create(getEditingDomain(), item, CommandsPackageImpl.Literals.KEY_BINDING__PARAMETERS, param);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- tableviewer.editElement(param, 0);
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.KeyBindingEditor_Remove);
- b.addSelectionListener(new SelectionAdapter() {
-
- public void widgetSelected(SelectionEvent e) {
- IStructuredSelection s = (IStructuredSelection) tableviewer.getSelection();
- if (!s.isEmpty()) {
- MKeyBinding item = (MKeyBinding) getMaster().getValue();
- Command cmd = RemoveCommand.create(getEditingDomain(), item, CommandsPackageImpl.Literals.KEY_BINDING__PARAMETERS, s.toList());
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
- }
-
- });
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
-
- ControlFactory.createStringListWidget(parent, this, "Tags", ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__TAGS, VERTICAL_LIST_WIDGET_INDENT);
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- return null;
- }
-
- @Override
- public String getDetailLabel(Object element) {
- MKeySequence seq = (MKeySequence) element;
- if (seq.getKeySequence() != null && seq.getKeySequence().trim().length() > 0) {
- return seq.getKeySequence();
- }
- return null;
- }
-
- @Override
- public FeaturePath[] getLabelProperties() {
- return new FeaturePath[] { FeaturePath.fromList(CommandsPackageImpl.Literals.KEY_SEQUENCE__KEY_SEQUENCE) };
- }
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuContributionEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuContributionEditor.java
deleted file mode 100644
index 8593eb27..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuContributionEditor.java
+++ /dev/null
@@ -1,370 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.databinding.property.list.IListProperty;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.ObservableColumnLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.ComponentLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.ui.model.application.commands.MHandler;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.MElementContainer;
-import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement;
-import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.databinding.IEMFListProperty;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditValueProperty;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class MenuContributionEditor extends AbstractComponentEditor {
- private Composite composite;
- private Image image;
- private EMFDataBindingContext context;
- private IProject project;
-
- private IListProperty ELEMENT_CONTAINER__CHILDREN = EMFProperties.list(UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN);
- private EStackLayout stackLayout;
-
- private static class Struct {
- private final String label;
- private final EClass eClass;
- private final boolean separator;
-
- public Struct(String label, EClass eClass, boolean separator) {
- this.label = label;
- this.eClass = eClass;
- this.separator = separator;
- }
- }
-
- public MenuContributionEditor(EditingDomain editingDomain, IProject project, ModelEditor editor) {
- super(editingDomain, editor);
- this.project = project;
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuContribution.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return "Menu Contribution";
- }
-
- @Override
- public String getDetailLabel(Object element) {
- return null;
- }
-
- @Override
- public String getDescription(Object element) {
- return "Menu Contribution Bla Bla Bla Bla";
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- if (getEditor().isModelFragment()) {
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
- createForm(composite, context, getMaster(), false);
- createForm(composite, context, getMaster(), true);
- } else {
- composite = createForm(parent, context, getMaster(), false);
- }
- }
-
- if (getEditor().isModelFragment()) {
- Control topControl;
- if (Util.isImport((EObject) object)) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if (stackLayout.topControl != topControl) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent, EMFDataBindingContext context, WritableValue master, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- if (isImport) {
- ControlFactory.createFindImport(parent, this, context);
- return parent;
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuContributionEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuContributionEditor_ParentId);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), MenuPackageImpl.Literals.MENU_CONTRIBUTION__PARENT_ID).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuContributionEditor_Position);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), MenuPackageImpl.Literals.MENU_CONTRIBUTION__POSITION_IN_PARENT).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuContributionEditor_MenuItems);
- l.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, false, false));
-
- final TableViewer viewer = new TableViewer(parent);
- ObservableListContentProvider cp = new ObservableListContentProvider();
- viewer.setContentProvider(cp);
-
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 300;
- viewer.getControl().setLayoutData(gd);
- viewer.getTable().setHeaderVisible(true);
-
- {
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.MenuContributionEditor_MenuItemType);
- column.getColumn().setWidth(300);
- column.setLabelProvider(new ComponentLabelProvider(getEditor()));
- }
-
- {
- IEMFEditValueProperty prop = EMFEditProperties.value(getEditingDomain(), MenuPackageImpl.Literals.ITEM__TYPE);
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.MenuContributionEditor_MenuItemItemType);
- column.getColumn().setWidth(100);
- column.setLabelProvider(new ObservableColumnLabelProvider<MHandler>(prop.observeDetail(cp.getKnownElements())));
- }
-
- IEMFListProperty prop = EMFEditProperties.list(getEditingDomain(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN);
- viewer.setInput(prop.observeDetail(master));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout(2, false);
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.MenuContributionEditor_Up);
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MElementContainer<?> container = (MElementContainer<?>) getMaster().getValue();
- int idx = container.getChildren().indexOf(obj) - 1;
- if (idx >= 0) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.MenuContributionEditor_Down);
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MElementContainer<?> container = (MElementContainer<?>) getMaster().getValue();
- int idx = container.getChildren().indexOf(obj) + 1;
- if (idx < container.getChildren().size()) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- final ComboViewer childrenDropDown = new ComboViewer(buttonComp);
- childrenDropDown.getControl().setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- childrenDropDown.setContentProvider(new ArrayContentProvider());
- childrenDropDown.setLabelProvider(new LabelProvider() {
- @Override
- public String getText(Object element) {
- Struct struct = (Struct) element;
- return struct.label;
- }
- });
-
- Struct defaultStruct = new Struct(Messages.MenuContributionEditor_HandledMenuItem, MenuPackageImpl.Literals.HANDLED_MENU_ITEM, false);
- childrenDropDown.setInput(new Struct[] { new Struct(Messages.MenuContributionEditor_Separator, MenuPackageImpl.Literals.MENU_SEPARATOR, true), new Struct(Messages.MenuContributionEditor_Menu, MenuPackageImpl.Literals.MENU, false), defaultStruct, new Struct(Messages.MenuContributionEditor_DirectMenuItem, MenuPackageImpl.Literals.DIRECT_MENU_ITEM, false) });
- childrenDropDown.setSelection(new StructuredSelection(defaultStruct));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!childrenDropDown.getSelection().isEmpty()) {
- Struct struct = (Struct) ((IStructuredSelection) childrenDropDown.getSelection()).getFirstElement();
- EClass eClass = struct.eClass;
- MMenuElement eObject = (MMenuElement) EcoreUtil.create(eClass);
-
- Command cmd = AddCommand.create(getEditingDomain(), getMaster().getValue(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, eObject);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- if (!struct.separator) {
- getEditor().setSelection(eObject);
- }
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.MenuContributionEditor_Remove);
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- List<?> keybinding = ((IStructuredSelection) viewer.getSelection()).toList();
- Command cmd = RemoveCommand.create(getEditingDomain(), getMaster().getValue(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, keybinding);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
- }
- });
- }
-
- ControlFactory.createStringListWidget(parent, this, "Tags", ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__TAGS, VERTICAL_LIST_WIDGET_INDENT);
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- return ELEMENT_CONTAINER__CHILDREN.observe(element);
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuEditor.java
deleted file mode 100644
index 33d7513c..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuEditor.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.databinding.property.list.IListProperty;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.ImageTooltip;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.ObservableColumnLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.ComponentLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.MenuIconDialogEditor;
-import org.eclipse.e4.ui.model.application.commands.MHandler;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.MElementContainer;
-import org.eclipse.e4.ui.model.application.ui.MUILabel;
-import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
-import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
-import org.eclipse.e4.ui.model.application.ui.menu.MMenuElement;
-import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.databinding.IEMFListProperty;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditValueProperty;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class MenuEditor extends AbstractComponentEditor {
-
- private Composite composite;
- private Image image;
- private EMFDataBindingContext context;
- private IProject project;
-
- private IListProperty ELEMENT_CONTAINER__CHILDREN = EMFProperties.list(UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN);
- private EStackLayout stackLayout;
-
- private static class Struct {
- private final String label;
- private final EClass eClass;
- private final boolean separator;
-
- public Struct(String label, EClass eClass, boolean separator) {
- this.label = label;
- this.eClass = eClass;
- this.separator = separator;
- }
- }
-
- public MenuEditor(EditingDomain editingDomain, IProject project, ModelEditor editor) {
- super(editingDomain, editor);
- this.project = project;
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Menu.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return image;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.MenuEditor_Description;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
-
- createForm(composite, context, getMaster(), false, false);
- createForm(composite, context, getMaster(), true, false);
- if (getEditor().isModelFragment()) {
- createForm(composite, context, getMaster(), false, true);
- }
- }
- EObject o = (EObject) object;
- Control topControl;
- if (Util.isImport(o) && getEditor().isModelFragment()) {
- topControl = composite.getChildren()[2];
- } else if (o.eContainer() instanceof MWindow || o.eContainer() == null) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if (stackLayout.topControl != topControl) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent, EMFDataBindingContext context, WritableValue master, boolean rootMenu, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- if (isImport) {
- ControlFactory.createFindImport(parent, this, context);
- return parent;
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- // ------------------------------------------------------------
- if (!rootMenu) {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuEditor_LabelLabel);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), UiPackageImpl.Literals.UI_LABEL__LABEL).observeDetail(master));
- }
-
- // ------------------------------------------------------------
- if (!rootMenu) {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuEditor_Tooltip);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), UiPackageImpl.Literals.UI_LABEL__TOOLTIP).observeDetail(master));
- }
-
- // ------------------------------------------------------------
- if (!rootMenu) {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuEditor_IconURI);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), UiPackageImpl.Literals.UI_LABEL__ICON_URI).observeDetail(master));
-
- new ImageTooltip(t) {
-
- @Override
- protected URI getImageURI() {
- MUILabel part = (MUILabel) getMaster().getValue();
- String uri = part.getIconURI();
- if (uri == null || uri.trim().length() == 0) {
- return null;
- }
- return URI.createURI(part.getIconURI());
- }
- };
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.setImage(getImage(t.getDisplay(), SEARCH_IMAGE));
- b.setText(Messages.MenuItemEditor_Find);
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MenuIconDialogEditor dialog = new MenuIconDialogEditor(b.getShell(), project, getEditingDomain(), (MMenu) getMaster().getValue());
- dialog.open();
- }
- });
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuEditor_MenuItems);
- l.setLayoutData(new GridData(GridData.END, GridData.BEGINNING, false, false));
-
- final TableViewer viewer = new TableViewer(parent);
- ObservableListContentProvider cp = new ObservableListContentProvider();
- viewer.setContentProvider(cp);
-
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 300;
- viewer.getControl().setLayoutData(gd);
- viewer.getTable().setHeaderVisible(true);
-
- {
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.MenuEditor_MenuItemType);
- column.getColumn().setWidth(300);
- column.setLabelProvider(new ComponentLabelProvider(getEditor()));
- }
-
- {
- IEMFEditValueProperty prop = EMFEditProperties.value(getEditingDomain(), MenuPackageImpl.Literals.ITEM__TYPE);
-
- TableViewerColumn column = new TableViewerColumn(viewer, SWT.NONE);
- column.getColumn().setText(Messages.MenuEditor_MenuItemItemType);
- column.getColumn().setWidth(100);
- column.setLabelProvider(new ObservableColumnLabelProvider<MHandler>(prop.observeDetail(cp.getKnownElements())));
- }
-
- IEMFListProperty prop = EMFEditProperties.list(getEditingDomain(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN);
- viewer.setInput(prop.observeDetail(master));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout(2, false);
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.MenuEditor_Up);
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MElementContainer<?> container = (MElementContainer<?>) getMaster().getValue();
- int idx = container.getChildren().indexOf(obj) - 1;
- if (idx >= 0) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.MenuEditor_Down);
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MElementContainer<?> container = (MElementContainer<?>) getMaster().getValue();
- int idx = container.getChildren().indexOf(obj) + 1;
- if (idx < container.getChildren().size()) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- final ComboViewer childrenDropDown = new ComboViewer(buttonComp);
- childrenDropDown.getControl().setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- childrenDropDown.setContentProvider(new ArrayContentProvider());
- childrenDropDown.setLabelProvider(new LabelProvider() {
- @Override
- public String getText(Object element) {
- Struct struct = (Struct) element;
- return struct.label;
- }
- });
-
- Struct defaultStruct = new Struct(Messages.MenuEditor_HandledMenuItem, MenuPackageImpl.Literals.HANDLED_MENU_ITEM, false);
- childrenDropDown.setInput(new Struct[] { new Struct(Messages.MenuEditor_Separator, MenuPackageImpl.Literals.MENU_SEPARATOR, true), new Struct(Messages.MenuEditor_Menu, MenuPackageImpl.Literals.MENU, false), defaultStruct, new Struct(Messages.MenuEditor_DirectMenuItem, MenuPackageImpl.Literals.DIRECT_MENU_ITEM, false) });
- childrenDropDown.setSelection(new StructuredSelection(defaultStruct));
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!childrenDropDown.getSelection().isEmpty()) {
- Struct struct = (Struct) ((IStructuredSelection) childrenDropDown.getSelection()).getFirstElement();
- EClass eClass = struct.eClass;
- MMenuElement eObject = (MMenuElement) EcoreUtil.create(eClass);
-
- Command cmd = AddCommand.create(getEditingDomain(), getMaster().getValue(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, eObject);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- if (!struct.separator) {
- getEditor().setSelection(eObject);
- }
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.MenuEditor_Remove);
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- List<?> keybinding = ((IStructuredSelection) viewer.getSelection()).toList();
- Command cmd = RemoveCommand.create(getEditingDomain(), getMaster().getValue(), UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, keybinding);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
- }
- });
- }
-
- ControlFactory.createStringListWidget(parent, this, "Tags", ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__TAGS, VERTICAL_LIST_WIDGET_INDENT);
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- return ELEMENT_CONTAINER__CHILDREN.observe(element);
- }
-
- @Override
- public String getLabel(Object element) {
- MMenu menu = (MMenu) element;
- if (menu.getParent() == null) {
- EObject o = (EObject) element;
- if (o.eContainer() instanceof MWindow) {
- return Messages.MenuEditor_MainMenu;
- }
- }
- return Messages.MenuEditor_Label;
- }
-
- @Override
- public String getDetailLabel(Object element) {
- MMenu menu = (MMenu) element;
-
- if (menu.getLabel() != null && menu.getLabel().trim().length() > 0) {
- return menu.getLabel();
- }
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuItemEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuItemEditor.java
deleted file mode 100644
index 662a124d..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuItemEditor.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.UpdateValueStrategy;
-import org.eclipse.core.databinding.conversion.Converter;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.ImageTooltip;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.MenuItemIconDialogEditor;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.MUILabel;
-import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.menu.ItemType;
-import org.eclipse.e4.ui.model.application.ui.menu.MMenuItem;
-import org.eclipse.e4.ui.model.application.ui.menu.impl.MenuPackageImpl;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ViewerProperties;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public abstract class MenuItemEditor extends AbstractComponentEditor {
-
- private Composite composite;
- private Image menuImage;
- private EMFDataBindingContext context;
- protected IProject project;
- private EStackLayout stackLayout;
-
- public MenuItemEditor(EditingDomain editingDomain, ModelEditor editor, IProject project) {
- super(editingDomain, editor);
- this.project = project;
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (menuImage == null) {
- try {
- menuImage = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuItem.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return menuImage;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- if (getEditor().isModelFragment()) {
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
- createForm(composite, context, getMaster(), false);
- createForm(composite, context, getMaster(), true);
- } else {
- composite = createForm(parent, context, getMaster(), false);
- }
- }
-
- if (getEditor().isModelFragment()) {
- Control topControl;
- if (Util.isImport((EObject) object)) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if (stackLayout.topControl != topControl) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent, EMFDataBindingContext context, WritableValue master, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
- IWidgetValueProperty checkProp = WidgetProperties.selection();
- IWidgetValueProperty enabled = WidgetProperties.enabled();
-
- if (isImport) {
- ControlFactory.createFindImport(parent, this, context);
- return parent;
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuItemEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- if (this.getClass() != MenuItemEditor.class) {
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuItemEditor_Type);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- ComboViewer viewer = new ComboViewer(parent);
- viewer.setContentProvider(new ArrayContentProvider());
- viewer.setInput(new ItemType[] { ItemType.CHECK, ItemType.PUSH, ItemType.RADIO });
- GridData gd = new GridData();
- gd.horizontalSpan = 2;
- viewer.getControl().setLayoutData(gd);
- IObservableValue itemTypeObs = EMFEditProperties.value(getEditingDomain(), MenuPackageImpl.Literals.ITEM__TYPE).observeDetail(master);
- context.bindValue(ViewerProperties.singleSelection().observe(viewer), itemTypeObs);
- }
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuItemEditor_Label);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), UiPackageImpl.Literals.UI_LABEL__LABEL).observeDetail(master));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuItemEditor_Tooltip);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), UiPackageImpl.Literals.UI_LABEL__TOOLTIP).observeDetail(master));
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuItemEditor_IconURI);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- t.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), UiPackageImpl.Literals.UI_LABEL__ICON_URI).observeDetail(master));
-
- new ImageTooltip(t) {
-
- @Override
- protected URI getImageURI() {
- MUILabel part = (MUILabel) getMaster().getValue();
- String uri = part.getIconURI();
- if (uri == null || uri.trim().length() == 0) {
- return null;
- }
- return URI.createURI(part.getIconURI());
- }
- };
-
- final Button b = new Button(parent, SWT.PUSH | SWT.FLAT);
- b.setImage(getImage(t.getDisplay(), SEARCH_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, false, false));
- b.setText(Messages.MenuItemEditor_Find);
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MenuItemIconDialogEditor dialog = new MenuItemIconDialogEditor(b.getShell(), project, getEditingDomain(), (MMenuItem) getMaster().getValue());
- dialog.open();
- }
- });
- }
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText("Enabled");
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Button b = new Button(parent, SWT.CHECK);
- b.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 2, 1));
- context.bindValue(checkProp.observe(b), EMFEditProperties.value(getEditingDomain(), MenuPackageImpl.Literals.ITEM__ENABLED).observeDetail(getMaster()));
- }
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText("Selected");
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Button b = new Button(parent, SWT.CHECK);
- b.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false, 2, 1));
- context.bindValue(checkProp.observe(b), EMFEditProperties.value(getEditingDomain(), MenuPackageImpl.Literals.ITEM__SELECTED).observeDetail(getMaster()));
-
- UpdateValueStrategy t2m = new UpdateValueStrategy();
- t2m.setConverter(new Converter(boolean.class, ItemType.class) {
-
- public Object convert(Object fromObject) {
- return null;
- }
- });
- UpdateValueStrategy m2t = new UpdateValueStrategy();
- m2t.setConverter(new Converter(ItemType.class, boolean.class) {
-
- public Object convert(Object fromObject) {
- return fromObject == ItemType.CHECK || fromObject == ItemType.RADIO;
- }
- });
-
- context.bindValue(enabled.observe(b), EMFEditProperties.value(getEditingDomain(), MenuPackageImpl.Literals.ITEM__TYPE).observeDetail(getMaster()), t2m, m2t);
-
- }
-
- createFormSubTypeForm(parent, context, master);
-
- ControlFactory.createStringListWidget(parent, this, "Tags", ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__TAGS, VERTICAL_LIST_WIDGET_INDENT);
-
- return parent;
- }
-
- protected abstract void createFormSubTypeForm(Composite parent, EMFDataBindingContext context, WritableValue master);
-
- @Override
- public IObservableList getChildList(Object element) {
- return null;
- }
-
- @Override
- public String getDetailLabel(Object element) {
- MUILabel label = (MUILabel) element;
- if (label.getLabel() != null && label.getLabel().trim().length() > 0) {
- return label.getLabel();
- }
- return null;
- }
-
- @Override
- public FeaturePath[] getLabelProperties() {
- return new FeaturePath[] { FeaturePath.fromList(UiPackageImpl.Literals.UI_LABEL__LABEL) };
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuSeparatorEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuSeparatorEditor.java
deleted file mode 100644
index 8479ac77..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/MenuSeparatorEditor.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.value.WritableValue;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-
-public class MenuSeparatorEditor extends AbstractComponentEditor {
- private Image separatorImage;
- private Composite composite;
- private EMFDataBindingContext context;
- private EStackLayout stackLayout;
-
- public MenuSeparatorEditor(EditingDomain editingDomain, ModelEditor editor) {
- super(editingDomain, editor);
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (separatorImage == null) {
- try {
- separatorImage = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/MenuSeparator.gif")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
-
- return separatorImage;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.MenuSeparatorEditor_Label;
- }
-
- @Override
- public String getDetailLabel(Object element) {
- return null;
- }
-
- @Override
- public String getDescription(Object element) {
- return null;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- context = new EMFDataBindingContext();
- if (getEditor().isModelFragment()) {
- composite = new Composite(parent, SWT.NONE);
- stackLayout = new EStackLayout();
- composite.setLayout(stackLayout);
- createForm(composite, context, getMaster(), false);
- createForm(composite, context, getMaster(), true);
- } else {
- composite = createForm(parent, context, getMaster(), false);
- }
- }
-
- if (getEditor().isModelFragment()) {
- Control topControl;
- if (Util.isImport((EObject) object)) {
- topControl = composite.getChildren()[1];
- } else {
- topControl = composite.getChildren()[0];
- }
-
- if (stackLayout.topControl != topControl) {
- stackLayout.topControl = topControl;
- composite.layout(true, true);
- }
- }
-
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent, EMFDataBindingContext context, WritableValue master, boolean isImport) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- IWidgetValueProperty textProp = WidgetProperties.text(SWT.Modify);
-
- if (isImport) {
- ControlFactory.createFindImport(parent, this, context);
- return parent;
- }
-
- // ------------------------------------------------------------
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.MenuSeparatorEditor_Id);
- l.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
-
- Text t = new Text(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- t.setLayoutData(gd);
- context.bindValue(textProp.observeDelayed(200, t), EMFEditProperties.value(getEditingDomain(), ApplicationPackageImpl.Literals.APPLICATION_ELEMENT__ELEMENT_ID).observeDetail(getMaster()));
- }
-
- // TODO Should we add visible to mimic a GroupMarker of 3.x
-
- return parent;
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java
deleted file mode 100644
index 708cd12b..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/ModelFragmentsEditor.java
+++ /dev/null
@@ -1,421 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EPackage;
-
-import java.util.ArrayList;
-import org.eclipse.e4.tools.emf.ui.common.IEditorFeature.FeatureClass;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jface.viewers.ArrayContentProvider;
-import org.eclipse.jface.viewers.ComboViewer;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-
-import org.eclipse.e4.tools.emf.ui.internal.common.VirtualEntry;
-
-import org.eclipse.e4.tools.emf.ui.internal.common.VirtualEntry;
-
-import org.eclipse.core.databinding.observable.list.WritableList;
-
-import org.eclipse.e4.ui.model.fragment.MFragmentFactory;
-
-
-import org.eclipse.e4.ui.model.fragment.MModelFragment;
-
-import org.eclipse.e4.ui.model.fragment.MModelFragments;
-
-import org.eclipse.e4.ui.model.fragment.impl.FragmentPackageImpl;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.property.list.IListProperty;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ComponentLabelProvider;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.databinding.IEMFListProperty;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
-
-public class ModelFragmentsEditor extends AbstractComponentEditor {
-
- private IListProperty MODEL_FRAGMENTS__FRAGMENTS = EMFProperties.list(FragmentPackageImpl.Literals.MODEL_FRAGMENTS__FRAGMENTS);
- private IListProperty MODEL_FRAGMENTS__IMPORTS = EMFProperties.list(FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS);
-
- private Composite composite;
- private Image image;
-
- public ModelFragmentsEditor(EditingDomain editingDomain, ModelEditor editor) {
- super(editingDomain,editor);
- }
-
- @Override
- public Image getImage(Object element, Display display) {
- if (image == null) {
- try {
- image = loadSharedImage(display, new URL("platform:/plugin/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/ModelFragments.png")); //$NON-NLS-1$
- } catch (MalformedURLException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- return image;
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.ModelFragmentsEditor_Label;
- }
-
- @Override
- public String getDescription(Object element) {
- return Messages.ModelFragmentsEditor_Description;
- }
-
- @Override
- public Composite getEditor(Composite parent, Object object) {
- if (composite == null) {
- composite = createForm(parent);
- }
- getMaster().setValue(object);
- return composite;
- }
-
- private Composite createForm(Composite parent) {
- parent = new Composite(parent, SWT.NONE);
- parent.setLayout(new GridLayout(3, false));
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText("Imports");
- l.setLayoutData(new GridData(GridData.END,GridData.BEGINNING,false,false));
-
- final TableViewer viewer = new TableViewer(parent);
- viewer.setContentProvider(new ObservableListContentProvider());
- viewer.setLabelProvider(new ComponentLabelProvider(getEditor()));
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 200;
- viewer.getControl().setLayoutData(gd);
-
- IEMFListProperty prop = EMFProperties.list(FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS);
- viewer.setInput(prop.observeDetail(getMaster()));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout(2, false);
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText("Up");
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MModelFragments container = (MModelFragments) getMaster().getValue();
- int idx = container.getImports().indexOf(obj) - 1;
- if (idx >= 0) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText("Down");
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MModelFragments container = (MModelFragments) getMaster().getValue();
- int idx = container.getImports().indexOf(obj) + 1;
- if (idx < container.getImports().size()) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- final ComboViewer childrenDropDown = new ComboViewer(buttonComp);
- childrenDropDown.getControl().setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- childrenDropDown.setContentProvider(new ArrayContentProvider());
- childrenDropDown.setLabelProvider(new LabelProvider() {
- @Override
- public String getText(Object element) {
- FeatureClass eclass = (FeatureClass) element;
- return eclass.label;
- }
- });
- childrenDropDown.setComparator(new ViewerComparator() {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- FeatureClass eClass1 = (FeatureClass) e1;
- FeatureClass eClass2 = (FeatureClass) e2;
- return eClass1.label.compareTo(eClass2.label);
- }
- });
-
- List<FeatureClass> list = new ArrayList<FeatureClass>();
- addClasses(ApplicationPackageImpl.eINSTANCE, list);
- list.addAll(getEditor().getFeatureClasses(FragmentPackageImpl.Literals.MODEL_FRAGMENT, FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS));
-
- childrenDropDown.setInput(list);
- childrenDropDown.getCombo().select(0);
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- EClass eClass = ((FeatureClass) ((IStructuredSelection) childrenDropDown.getSelection()).getFirstElement()).eClass;
- EObject eObject = EcoreUtil.create(eClass);
-
- Command cmd = AddCommand.create(getEditingDomain(), getMaster().getValue(), FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS, eObject);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- getEditor().setSelection(eObject);
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText("Remove");
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- List<?> elements = ((IStructuredSelection) viewer.getSelection()).toList();
-
- Command cmd = RemoveCommand.create(getEditingDomain(), getMaster().getValue(), FragmentPackageImpl.Literals.MODEL_FRAGMENTS__IMPORTS, elements);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
- }
- });
- }
-
- {
- Label l = new Label(parent, SWT.NONE);
- l.setText(Messages.ModelFragmentsEditor_ModelFragments);
- l.setLayoutData(new GridData(GridData.END,GridData.BEGINNING,false,false));
-
- final TableViewer viewer = new TableViewer(parent);
- viewer.setContentProvider(new ObservableListContentProvider());
- viewer.setLabelProvider(new ComponentLabelProvider(getEditor()));
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.heightHint = 200;
- viewer.getControl().setLayoutData(gd);
-
- IEMFListProperty prop = EMFProperties.list(FragmentPackageImpl.Literals.MODEL_FRAGMENTS__FRAGMENTS);
- viewer.setInput(prop.observeDetail(getMaster()));
-
- Composite buttonComp = new Composite(parent, SWT.NONE);
- buttonComp.setLayoutData(new GridData(GridData.FILL, GridData.END, false, false));
- GridLayout gl = new GridLayout();
- gl.marginLeft = 0;
- gl.marginRight = 0;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- buttonComp.setLayout(gl);
-
- Button b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.ModelFragmentsEditor_Up);
- b.setImage(getImage(b.getDisplay(), ARROW_UP));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MModelFragments container = (MModelFragments) getMaster().getValue();
- int idx = container.getFragments().indexOf(obj) - 1;
- if (idx >= 0) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), FragmentPackageImpl.Literals.MODEL_FRAGMENTS__FRAGMENTS, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.ModelFragmentsEditor_Down);
- b.setImage(getImage(b.getDisplay(), ARROW_DOWN));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- IStructuredSelection s = (IStructuredSelection) viewer.getSelection();
- if (s.size() == 1) {
- Object obj = s.getFirstElement();
- MModelFragments container = (MModelFragments) getMaster().getValue();
- int idx = container.getFragments().indexOf(obj) + 1;
- if (idx < container.getFragments().size()) {
- Command cmd = MoveCommand.create(getEditingDomain(), getMaster().getValue(), FragmentPackageImpl.Literals.MODEL_FRAGMENTS__FRAGMENTS, obj, idx);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- viewer.setSelection(new StructuredSelection(obj));
- }
- }
-
- }
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.ModelFragmentsEditor_Add);
- b.setImage(getImage(b.getDisplay(), TABLE_ADD_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- MModelFragment component = MFragmentFactory.INSTANCE.createStringModelFragment();
-
- Command cmd = AddCommand.create(getEditingDomain(), getMaster().getValue(), FragmentPackageImpl.Literals.MODEL_FRAGMENTS__FRAGMENTS, component);
-
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- getEditor().setSelection(component);
- }
- }
- });
-
- b = new Button(buttonComp, SWT.PUSH | SWT.FLAT);
- b.setText(Messages.ModelFragmentsEditor_Remove);
- b.setImage(getImage(b.getDisplay(), TABLE_DELETE_IMAGE));
- b.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
- b.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (!viewer.getSelection().isEmpty()) {
- List<?> elements = ((IStructuredSelection) viewer.getSelection()).toList();
-
- Command cmd = RemoveCommand.create(getEditingDomain(), getMaster().getValue(), FragmentPackageImpl.Literals.MODEL_FRAGMENTS__FRAGMENTS, elements);
- if (cmd.canExecute()) {
- getEditingDomain().getCommandStack().execute(cmd);
- }
- }
- }
- });
- }
-
- return parent;
- }
-
- public void addClasses(EPackage ePackage, List<FeatureClass> list) {
- for (EClassifier c : ePackage.getEClassifiers()) {
- if (c instanceof EClass) {
- EClass eclass = (EClass) c;
- if (eclass != ApplicationPackageImpl.Literals.APPLICATION && !eclass.isAbstract() && !eclass.isInterface() && eclass.getEAllSuperTypes().contains(ApplicationPackageImpl.Literals.APPLICATION_ELEMENT)) {
- list.add(new FeatureClass(eclass.getName(), eclass));
- }
- }
- }
-
- for (EPackage eSubPackage : ePackage.getESubpackages()) {
- addClasses(eSubPackage, list);
- }
- }
-
- @Override
- public IObservableList getChildList(Object element) {
- WritableList list = new WritableList();
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_MODEL_IMPORTS, MODEL_FRAGMENTS__IMPORTS, element, "Imports") {
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
- });
- list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_MODEL_FRAGEMENTS, MODEL_FRAGMENTS__FRAGMENTS, element, "Fragments") {
- @Override
- protected boolean accepted(Object o) {
- return true;
- }
- });
-
- return list;
- }
-
- @Override
- public String getDetailLabel(Object element) {
- // TODO Auto-generated method stub
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartDescriptorEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartDescriptorEditor.java
deleted file mode 100644
index 8f1d50c4..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/PartDescriptorEditor.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 BestSolution.at 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:
- * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.e4.tools.emf.ui.internal.common.component;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Map.Entry;
-import org.eclipse.core.databinding.observable.list.IObservableList;
-import org.eclipse.core.databinding.observable.list.WritableList;
-import org.eclipse.core.databinding.observable.value.IObservableValue;
-import org.eclipse.core.databinding.observable.value.IValueChangeListener;
-import org.eclipse.core.databinding.observable.value.ValueChangeEvent;
-import org.eclipse.core.databinding.property.list.IListProperty;
-import org.eclipse.core.databinding.property.value.IValueProperty;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.e4.tools.emf.ui.common.EStackLayout;
-import org.eclipse.e4.tools.emf.ui.common.ImageTooltip;
-import org.eclipse.e4.tools.emf.ui.common.Util;
-import org.eclipse.e4.tools.emf.ui.common.component.AbstractComponentEditor;
-import org.eclipse.e4.tools.emf.ui.internal.Messages;
-import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.VirtualEntry;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.ContributionClassDialog;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs.PartDescriptorIconDialogEditor;
-import org.eclipse.e4.ui.model.application.commands.impl.CommandsPackageImpl;
-import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
-import org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl;
-import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.MUILabel;
-import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
-import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory;
-import org.eclipse.e4.ui.model.application.ui.menu.MToolBar;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.databinding.EMFDataBindingContext;
-import org.eclipse.emf.databinding.EMFProperties;
-import org.eclipse.emf.databinding.FeaturePath;
-import org.eclipse.emf.databinding.edit.EMFEditProperties;
-import org.eclipse.emf.databinding.edit.IEMFEditListProperty;
-import org.eclipse.emf.databinding.edit.IEMFEditValueProperty;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.jface.databinding.swt.IWidgetValueProperty;
-import org.eclipse.jface.databinding.swt.WidgetProperties;
-import org.eclipse.jface.databinding.viewers.ObservableListContentProvider;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.TableViewerColumn;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclip