Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Prouvost2018-02-13 22:54:45 +0000
committerOlivier Prouvost2018-02-13 23:22:44 +0000
commit0dd549dc731ba25dbf3fc45d1aa974e5962a07fd (patch)
tree6369906b9aa4c39bbfbefec32caaf030c18ec6a3 /bundles
parent7ca877ed5a9cb79e8c95b40e4d7c18abf6a9d67a (diff)
downloadeclipse.platform.ui.tools-0dd549dc731ba25dbf3fc45d1aa974e5962a07fd.tar.gz
eclipse.platform.ui.tools-0dd549dc731ba25dbf3fc45d1aa974e5962a07fd.tar.xz
eclipse.platform.ui.tools-0dd549dc731ba25dbf3fc45d1aa974e5962a07fd.zip
Bug 531054 - Remove Wizard and Dialogs from model edit and integrateI20180214-2000
that they should not be used Change-Id: I1a4313a272f4c9a92f750587c3888164adaeb4e3 Signed-off-by: Olivier Prouvost <olivier.prouvost@opcoach.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Dialog.pngbin730 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WizardDialog.pngbin339 -> 0 bytes
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.java6
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/Messages.properties12
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java2
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/ModelEditor.java139
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DialogEditor.java44
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java16
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WizardDialogEditor.java44
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VSnippetsEditor.java15
-rw-r--r--bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowEditor.java35
11 files changed, 71 insertions, 242 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Dialog.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Dialog.png
deleted file mode 100644
index 681c0a0f..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Dialog.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WizardDialog.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WizardDialog.png
deleted file mode 100644
index 0889b901..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WizardDialog.png
+++ /dev/null
Binary files differ
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
index 71072d42..8346eb00 100644
--- 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
@@ -348,10 +348,6 @@ public class Messages {
public String ToolControlEditor_Description;
public String ToolControlEditor_ClassURI;
- public String DialogEditor_Label;
-
- public String WizardDialogEditor_Label;
-
public String VBindingTableEditor_Label;
public String VBindingTableEditor_Description;
public String VBindingTableEditor_Contexts;
@@ -561,8 +557,6 @@ public class Messages {
public String VWindowEditor_Windows;
public String VWindowEditor_AddTrimmedWindow;
public String VWindowEditor_AddWindow;
- public String VWindowEditor_AddDialog;
- public String VWindowEditor_AddWizardDialog;
public String VWindowSharedElementsEditor_TreeLabel;
public String VWindowSharedElementsEditor_TreeLabelDescription;
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
index e6b40578..7618dcc9 100644
--- 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
@@ -70,7 +70,7 @@ ApplicationEditor_Handlers=Handlers
ApplicationEditor_PartDescriptors=Part Descriptors
ApplicationEditor_BindingTables=BindingTables
ApplicationEditor_Commands=Commands
-ApplicationEditor_Windows=Windows and Dialogs
+ApplicationEditor_Windows=Windows
ApplicationEditor_Addons=Add-ons
ApplicationEditor_MenuContributions=Menu Contributions
ApplicationEditor_Snippets=Snippets
@@ -122,10 +122,6 @@ CommandEditor_Category=Category
CommandEditor_AddCommandParameter=Command Parameter
CommandEditor_NewCommandParameter=Command Parameter {0}
-DialogEditor_Label=Dialog
-
-WizardDialogEditor_Label=Wizard
-
DirectMenuItemEditor_Label=Direct Menu Item
DirectMenuItemEditor_Description=Direct Menu Item
DirectMenuItemEditor_ClassURI=Class URI
@@ -459,7 +455,7 @@ WindowEditor_MainMenu=Main Menu
WindowEditor_SelectedElement=Selected Element
WindowEditor_BindingContexts=Binding Contexts
WindowEditor_Handlers=Handlers
-WindowEditor_Windows=Windows and Dialogs
+WindowEditor_Windows=Windows YYYYY
WindowEditor_Controls=Controls
WindowEditor_SharedElements=Shared Elements
WindowEditor_Snippets=Snippets
@@ -530,13 +526,11 @@ VWindowControlEditor_AddPartStack=Part Stack
VWindowControlEditor_AddPart=Part
VWindowControlEditor_AddArea=Area
-VWindowEditor_TreeLabel=Windows and Dialogs
+VWindowEditor_TreeLabel=Windows
VWindowEditor_TreeLabelDescription=Windows
VWindowEditor_Windows=Windows
VWindowEditor_AddTrimmedWindow=Trimmed Window
VWindowEditor_AddWindow=Window
-VWindowEditor_AddDialog=Dialog
-VWindowEditor_AddWizardDialog=Wizard
VWindowSharedElementsEditor_TreeLabel=Shared Elements
VWindowSharedElementsEditor_TreeLabelDescription=Shared Elements
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java
index a9887428..6d0a1c1d 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/ResourceProvider.java
@@ -24,7 +24,6 @@ public class ResourceProvider extends BasicResourceProvider {
public static final String IMG_Command = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.Command"; //$NON-NLS-1$
public static final String IMG_CommandParameter = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.CommandParameter"; //$NON-NLS-1$
public static final String IMG_CoreExpression = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.CoreExpression"; //$NON-NLS-1$
- public static final String IMG_Dialog = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.Dialog"; //$NON-NLS-1$
public static final String IMG_DirectMenuItem = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.DirectMenuItem"; //$NON-NLS-1$
public static final String IMG_DirectToolItem = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.DirectToolItem"; //$NON-NLS-1$
public static final String IMG_HandledMenuItem = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.HandledMenuItem"; //$NON-NLS-1$
@@ -54,7 +53,6 @@ public class ResourceProvider extends BasicResourceProvider {
public static final String IMG_TrimContribution = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.TrimContribution"; //$NON-NLS-1$
public static final String IMG_Window = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.Window"; //$NON-NLS-1$
public static final String IMG_WindowTrim = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.WindowTrim"; //$NON-NLS-1$
- public static final String IMG_WizardDialog = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.WizardDialog"; //$NON-NLS-1$
public static final String IMG_Obj16_arrow_down = "IMG_org.eclipse.e4.tools.emf.ui.obj16.arrow_down"; //$NON-NLS-1$
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
index 4a92de53..36dfee13 100644
--- 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
@@ -80,7 +80,6 @@ import org.eclipse.e4.tools.emf.ui.internal.common.component.CommandParameterEdi
import org.eclipse.e4.tools.emf.ui.internal.common.component.CompositePartEditor;
import org.eclipse.e4.tools.emf.ui.internal.common.component.CoreExpressionEditor;
import org.eclipse.e4.tools.emf.ui.internal.common.component.DefaultEditor;
-import org.eclipse.e4.tools.emf.ui.internal.common.component.DialogEditor;
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.DynamicMenuContributionEditor;
@@ -111,7 +110,6 @@ 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.WizardDialogEditor;
import org.eclipse.e4.tools.emf.ui.internal.common.component.tabs.EmfUtil;
import org.eclipse.e4.tools.emf.ui.internal.common.component.tabs.IGotoObject;
import org.eclipse.e4.tools.emf.ui.internal.common.component.tabs.ListTab;
@@ -1253,95 +1251,56 @@ public class ModelEditor implements IGotoObject {
}
private void registerDefaultEditors() {
- // System.err.println(getClass().getName() + ".registerDefaultEditors: " +
- // resourcePool); //$NON-NLS-1$
-
- registerEditor(ApplicationPackageImpl.Literals.APPLICATION,
- ContextInjectionFactory.make(ApplicationEditor.class, context));
- registerEditor(ApplicationPackageImpl.Literals.ADDON,
- ContextInjectionFactory.make(AddonsEditor.class, context));
-
- registerEditor(CommandsPackageImpl.Literals.KEY_BINDING,
- ContextInjectionFactory.make(KeyBindingEditor.class, context));
- registerEditor(CommandsPackageImpl.Literals.HANDLER,
- ContextInjectionFactory.make(HandlerEditor.class, context));
- registerEditor(CommandsPackageImpl.Literals.COMMAND,
- ContextInjectionFactory.make(CommandEditor.class, context));
- registerEditor(CommandsPackageImpl.Literals.COMMAND_PARAMETER,
- ContextInjectionFactory.make(CommandParameterEditor.class, context));
- registerEditor(CommandsPackageImpl.Literals.PARAMETER,
- ContextInjectionFactory.make(ParameterEditor.class, context));
- registerEditor(CommandsPackageImpl.Literals.BINDING_TABLE,
- ContextInjectionFactory.make(BindingTableEditor.class, context));
- registerEditor(CommandsPackageImpl.Literals.BINDING_CONTEXT,
- ContextInjectionFactory.make(BindingContextEditor.class, context));
- registerEditor(CommandsPackageImpl.Literals.CATEGORY,
- ContextInjectionFactory.make(CategoryEditor.class, context));
-
- registerEditor(MenuPackageImpl.Literals.TOOL_BAR, ContextInjectionFactory.make(ToolBarEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.DIRECT_TOOL_ITEM,
- ContextInjectionFactory.make(DirectToolItemEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.HANDLED_TOOL_ITEM,
- ContextInjectionFactory.make(HandledToolItemEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.TOOL_BAR_SEPARATOR,
- ContextInjectionFactory.make(ToolBarSeparatorEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.TOOL_CONTROL,
- ContextInjectionFactory.make(ToolControlEditor.class, context));
-
- registerEditor(MenuPackageImpl.Literals.MENU, ContextInjectionFactory.make(MenuEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.POPUP_MENU,
- ContextInjectionFactory.make(PopupMenuEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.MENU_SEPARATOR,
- ContextInjectionFactory.make(MenuSeparatorEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.HANDLED_MENU_ITEM,
- ContextInjectionFactory.make(HandledMenuItemEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.DIRECT_MENU_ITEM,
- ContextInjectionFactory.make(DirectMenuItemEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.MENU_CONTRIBUTION,
- ContextInjectionFactory.make(MenuContributionEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.TOOL_BAR_CONTRIBUTION,
- ContextInjectionFactory.make(ToolBarContributionEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.TRIM_CONTRIBUTION,
- ContextInjectionFactory.make(TrimContributionEditor.class, context));
- registerEditor(MenuPackageImpl.Literals.DYNAMIC_MENU_CONTRIBUTION,
- ContextInjectionFactory.make(DynamicMenuContributionEditor.class, context));
-
- registerEditor(UiPackageImpl.Literals.CORE_EXPRESSION,
- ContextInjectionFactory.make(CoreExpressionEditor.class, context));
- registerEditor(UiPackageImpl.Literals.IMPERATIVE_EXPRESSION,
- ContextInjectionFactory.make(ImperativeExpressionEditor.class, context));
-
- registerEditor(BasicPackageImpl.Literals.COMPOSITE_PART,
- ContextInjectionFactory.make(CompositePartEditor.class, context));
- registerEditor(BasicPackageImpl.Literals.PART, ContextInjectionFactory.make(PartEditor.class, context));
- registerEditor(BasicPackageImpl.Literals.WINDOW, ContextInjectionFactory.make(WindowEditor.class, context));
- registerEditor(BasicPackageImpl.Literals.TRIMMED_WINDOW,
- ContextInjectionFactory.make(TrimmedWindowEditor.class, context));
- registerEditor(BasicPackageImpl.Literals.PART_SASH_CONTAINER,
- ContextInjectionFactory.make(PartSashContainerEditor.class, context));
- registerEditor(AdvancedPackageImpl.Literals.AREA, ContextInjectionFactory.make(AreaEditor.class, context));
- registerEditor(BasicPackageImpl.Literals.PART_STACK,
- ContextInjectionFactory.make(PartStackEditor.class, context));
- registerEditor(BasicPackageImpl.Literals.TRIM_BAR, ContextInjectionFactory.make(TrimBarEditor.class, context));
- registerEditor(BasicPackageImpl.Literals.DIALOG, ContextInjectionFactory.make(DialogEditor.class, context));
- registerEditor(BasicPackageImpl.Literals.WIZARD_DIALOG,
- ContextInjectionFactory.make(WizardDialogEditor.class, context));
+
+ registerEditor(ApplicationPackageImpl.Literals.APPLICATION, ApplicationEditor.class);
+ registerEditor(ApplicationPackageImpl.Literals.ADDON, AddonsEditor.class);
+
+ registerEditor(CommandsPackageImpl.Literals.KEY_BINDING, KeyBindingEditor.class);
+ registerEditor(CommandsPackageImpl.Literals.HANDLER, HandlerEditor.class);
+ registerEditor(CommandsPackageImpl.Literals.COMMAND, CommandEditor.class);
+ registerEditor(CommandsPackageImpl.Literals.COMMAND_PARAMETER, CommandParameterEditor.class);
+ registerEditor(CommandsPackageImpl.Literals.PARAMETER, ParameterEditor.class);
+ registerEditor(CommandsPackageImpl.Literals.BINDING_TABLE, BindingTableEditor.class);
+ registerEditor(CommandsPackageImpl.Literals.BINDING_CONTEXT, BindingContextEditor.class);
+ registerEditor(CommandsPackageImpl.Literals.CATEGORY, CategoryEditor.class);
+
+ registerEditor(MenuPackageImpl.Literals.TOOL_BAR, ToolBarEditor.class);
+ registerEditor(MenuPackageImpl.Literals.DIRECT_TOOL_ITEM, DirectToolItemEditor.class);
+ registerEditor(MenuPackageImpl.Literals.HANDLED_TOOL_ITEM, HandledToolItemEditor.class);
+ registerEditor(MenuPackageImpl.Literals.TOOL_BAR_SEPARATOR, ToolBarSeparatorEditor.class);
+ registerEditor(MenuPackageImpl.Literals.TOOL_CONTROL, ToolControlEditor.class);
+ registerEditor(MenuPackageImpl.Literals.MENU, MenuEditor.class);
+ registerEditor(MenuPackageImpl.Literals.POPUP_MENU, PopupMenuEditor.class);
+ registerEditor(MenuPackageImpl.Literals.MENU_SEPARATOR, MenuSeparatorEditor.class);
+ registerEditor(MenuPackageImpl.Literals.HANDLED_MENU_ITEM, HandledMenuItemEditor.class);
+ registerEditor(MenuPackageImpl.Literals.DIRECT_MENU_ITEM, DirectMenuItemEditor.class);
+ registerEditor(MenuPackageImpl.Literals.MENU_CONTRIBUTION, MenuContributionEditor.class);
+ registerEditor(MenuPackageImpl.Literals.TOOL_BAR_CONTRIBUTION, ToolBarContributionEditor.class);
+ registerEditor(MenuPackageImpl.Literals.TRIM_CONTRIBUTION, TrimContributionEditor.class);
+ registerEditor(MenuPackageImpl.Literals.DYNAMIC_MENU_CONTRIBUTION, DynamicMenuContributionEditor.class);
+
+ registerEditor(UiPackageImpl.Literals.CORE_EXPRESSION, CoreExpressionEditor.class);
+ registerEditor(UiPackageImpl.Literals.IMPERATIVE_EXPRESSION, ImperativeExpressionEditor.class);
+
+ registerEditor(BasicPackageImpl.Literals.COMPOSITE_PART, CompositePartEditor.class);
+ registerEditor(BasicPackageImpl.Literals.PART, PartEditor.class);
+ registerEditor(BasicPackageImpl.Literals.WINDOW, WindowEditor.class);
+ registerEditor(BasicPackageImpl.Literals.TRIMMED_WINDOW, TrimmedWindowEditor.class);
+ registerEditor(BasicPackageImpl.Literals.PART_SASH_CONTAINER, PartSashContainerEditor.class);
+ registerEditor(AdvancedPackageImpl.Literals.AREA, AreaEditor.class);
+ registerEditor(BasicPackageImpl.Literals.PART_STACK, PartStackEditor.class);
+ registerEditor(BasicPackageImpl.Literals.TRIM_BAR, TrimBarEditor.class);
registerEditor(
org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.Literals.PART_DESCRIPTOR,
- ContextInjectionFactory.make(PartDescriptorEditor.class, context));
-
- registerEditor(AdvancedPackageImpl.Literals.PERSPECTIVE_STACK,
- ContextInjectionFactory.make(PerspectiveStackEditor.class, context));
- registerEditor(AdvancedPackageImpl.Literals.PERSPECTIVE,
- ContextInjectionFactory.make(PerspectiveEditor.class, context));
- registerEditor(AdvancedPackageImpl.Literals.PLACEHOLDER,
- ContextInjectionFactory.make(PlaceholderEditor.class, context));
-
- registerEditor(FragmentPackageImpl.Literals.MODEL_FRAGMENTS,
- ContextInjectionFactory.make(ModelFragmentsEditor.class, context));
- registerEditor(FragmentPackageImpl.Literals.STRING_MODEL_FRAGMENT,
- ContextInjectionFactory.make(StringModelFragment.class, context));
+ PartDescriptorEditor.class);
+
+ registerEditor(AdvancedPackageImpl.Literals.PERSPECTIVE_STACK, PerspectiveStackEditor.class);
+ registerEditor(AdvancedPackageImpl.Literals.PERSPECTIVE, PerspectiveEditor.class);
+ registerEditor(AdvancedPackageImpl.Literals.PLACEHOLDER, PlaceholderEditor.class);
+
+ registerEditor(FragmentPackageImpl.Literals.MODEL_FRAGMENTS, ModelFragmentsEditor.class);
+ registerEditor(FragmentPackageImpl.Literals.STRING_MODEL_FRAGMENT, StringModelFragment.class);
}
public void tab_list_show(Boolean show) {
@@ -1415,6 +1374,10 @@ public class ModelEditor implements IGotoObject {
}
}
+ private void registerEditor(EClass eClass, Class<? extends AbstractComponentEditor> clazz) {
+ registerEditor(eClass, ContextInjectionFactory.make(clazz, context));
+ }
+
public void registerEditor(EClass eClass, AbstractComponentEditor editor) {
editorMap.put(eClass, editor);
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DialogEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DialogEditor.java
deleted file mode 100644
index e40c09fa..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DialogEditor.java
+++ /dev/null
@@ -1,44 +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.ArrayList;
-import java.util.List;
-
-import org.eclipse.e4.tools.emf.ui.internal.ResourceProvider;
-import org.eclipse.e4.ui.model.application.ui.basic.MDialog;
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.graphics.Image;
-
-public class DialogEditor extends WindowEditor {
-
- @Override
- public Image getImage(Object element) {
- return getImage(element, ResourceProvider.IMG_Dialog);
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.DialogEditor_Label;
- }
-
- @Override
- public List<Action> getActions(Object element) {
- final List<Action> actions = new ArrayList<>();
-
- final MDialog dialog = (MDialog) element;
- if (dialog.getMainMenu() == null) {
- actions.add(getActionAddMainMenu());
- }
-
- return actions;
- }
-} \ 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/StringModelFragment.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java
index 3f8a3bfd..81606a2e 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/StringModelFragment.java
@@ -15,6 +15,7 @@
package org.eclipse.e4.tools.emf.ui.internal.common.component;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
@@ -671,7 +672,7 @@ public class StringModelFragment extends AbstractComponentEditor {
result = new ArrayList<>();
for (final InternalPackage p : Util.loadPackages()) {
for (EClass c : p.getAllClasses()) {
- if (childClass.isSuperTypeOf(c)) {
+ if (childClass.isSuperTypeOf(c) && isRelevant(c.getName())) {
result.add(new FeatureClass(c.getName(), c));
}
}
@@ -681,4 +682,17 @@ public class StringModelFragment extends AbstractComponentEditor {
return result;
}
+ // Fix bug 531054 -> This code could be removed when Dialog and WizardDialog
+ // will disappear from model !
+ static private final List<String> excludeNames = Arrays.asList("Dialog", "WizardDialog");
+
+ // Fix bug 531054 -> This code could be removed when DIalog and WizardDialog
+ // will be definitively removed from code (after 2020).
+ private static boolean isRelevant(String className)
+ {
+ // System.out.println("Checking if " + className + " should be kept : " +
+ // !excludeNames.contains(className));
+ return !excludeNames.contains(className);
+ }
+
}
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WizardDialogEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WizardDialogEditor.java
deleted file mode 100644
index 60fd7275..00000000
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WizardDialogEditor.java
+++ /dev/null
@@ -1,44 +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.ArrayList;
-import java.util.List;
-
-import org.eclipse.e4.tools.emf.ui.internal.ResourceProvider;
-import org.eclipse.e4.ui.model.application.ui.basic.MWizardDialog;
-import org.eclipse.jface.action.Action;
-import org.eclipse.swt.graphics.Image;
-
-public class WizardDialogEditor extends WindowEditor {
-
- @Override
- public Image getImage(Object element) {
- return getImage(element, ResourceProvider.IMG_WizardDialog);
- }
-
- @Override
- public String getLabel(Object element) {
- return Messages.WizardDialogEditor_Label;
- }
-
- @Override
- public List<Action> getActions(Object element) {
- final List<Action> actions = new ArrayList<>();
-
- final MWizardDialog dialog = (MWizardDialog) element;
- if (dialog.getMainMenu() == null) {
- actions.add(getActionAddMainMenu());
- }
-
- return actions;
- }
-} \ 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/virtual/VSnippetsEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VSnippetsEditor.java
index 7d17f586..2768b513 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VSnippetsEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VSnippetsEditor.java
@@ -61,12 +61,6 @@ public class VSnippetsEditor extends AbstractComponentEditor {
}
});
- actions.add(new Action(Messages.VWindowEditor_AddDialog, createImageDescriptor(ResourceProvider.IMG_Dialog)) {
- @Override
- public void run() {
- handleAdd(BasicPackageImpl.Literals.DIALOG);
- }
- });
actions
.add(new Action(Messages.VWindowControlEditor_AddPart, createImageDescriptor(ResourceProvider.IMG_Part)) {
@@ -135,13 +129,6 @@ public class VSnippetsEditor extends AbstractComponentEditor {
handleAdd(BasicPackageImpl.Literals.TRIM_BAR);
}
});
- actions.add(new Action(Messages.VWindowEditor_AddWizardDialog,
- createImageDescriptor(ResourceProvider.IMG_WizardDialog)) {
- @Override
- public void run() {
- handleAdd(BasicPackageImpl.Literals.WIZARD_DIALOG);
- }
- });
Collections.sort(actions, (o1, o2) -> o1.getText().compareTo(o2.getText()));
@@ -203,7 +190,7 @@ public class VSnippetsEditor extends AbstractComponentEditor {
AdvancedPackageImpl.Literals.PERSPECTIVE_STACK, AdvancedPackageImpl.Literals.PERSPECTIVE,
AdvancedPackageImpl.Literals.AREA, BasicPackageImpl.Literals.PART_SASH_CONTAINER,
BasicPackageImpl.Literals.PART_STACK, BasicPackageImpl.Literals.PART,
- BasicPackageImpl.Literals.TRIM_BAR, BasicPackageImpl.Literals.TRIM_ELEMENT, });
+ BasicPackageImpl.Literals.TRIM_BAR });
pickList.setSelection(new StructuredSelection(AdvancedPackageImpl.Literals.PERSPECTIVE));
folder.setSelection(0);
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowEditor.java
index bb2a7412..e05a1ab9 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowEditor.java
@@ -57,12 +57,6 @@ public abstract class VWindowEditor extends AbstractComponentEditor {
@PostConstruct
void init() {
- actions.add(new Action(Messages.VWindowEditor_AddDialog, createImageDescriptor(ResourceProvider.IMG_Dialog)) {
- @Override
- public void run() {
- handleAdd(BasicPackageImpl.Literals.DIALOG);
- }
- });
actions.add(new Action(Messages.VWindowEditor_AddTrimmedWindow, createImageDescriptor(ResourceProvider.IMG_Window)) {
@Override
public void run() {
@@ -75,12 +69,6 @@ public abstract class VWindowEditor extends AbstractComponentEditor {
handleAdd(BasicPackageImpl.Literals.WINDOW);
}
});
- actions.add(new Action(Messages.VWindowEditor_AddWizardDialog, createImageDescriptor(ResourceProvider.IMG_WizardDialog)) {
- @Override
- public void run() {
- handleAdd(BasicPackageImpl.Literals.WIZARD_DIALOG);
- }
- });
}
@Override
@@ -135,30 +123,9 @@ public abstract class VWindowEditor extends AbstractComponentEditor {
viewer = pickList.getList();
pickList.setLabelProvider(new EClassLabelProvider(getEditor()));
- pickList.setInput(new EClass[] { BasicPackageImpl.Literals.DIALOG, BasicPackageImpl.Literals.TRIMMED_WINDOW, BasicPackageImpl.Literals.WINDOW, BasicPackageImpl.Literals.WIZARD_DIALOG });
+ pickList.setInput(new EClass[] { BasicPackageImpl.Literals.TRIMMED_WINDOW, BasicPackageImpl.Literals.WINDOW });
pickList.setSelection(new StructuredSelection(BasicPackageImpl.Literals.TRIMMED_WINDOW));
- // @SuppressWarnings("unchecked")
- // @Override
- // public void widgetSelected(SelectionEvent e) {
- // if (!viewer.getSelection().isEmpty()) {
- // IStructuredSelection s = (IStructuredSelection)
- // viewer.getSelection();
- // if (s.size() == 1) {
- // Object obj = s.getFirstElement();
- // EObject container = (EObject) getMaster().getValue();
- // List<Object> l = (List<Object>) container.eGet(targetFeature);
- // int idx = l.indexOf(obj) - 1;
- // if (idx >= 0) {
- // if (Util.moveElementByIndex(getEditingDomain(), (MUIElement) obj,
- // getEditor().isLiveModel(), idx, targetFeature)) {
- // viewer.setSelection(new StructuredSelection(obj));
- // }
- // }
- //
- // }
- // }
-
folder.setSelection(0);
return folder;

Back to the top