Bug 425879 - Add MDialog and MWizardDialog to model editor

Added the new elements to the model editor.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=425879
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/resources.properties b/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/resources.properties
index 7e109d4..f4b0761 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/resources.properties
+++ b/bundles/org.eclipse.e4.tools.emf.ui/OSGI-INF/resources.properties
@@ -8,6 +8,7 @@
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.Command=/icons/full/modelelements/Command.png
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.CommandParameter=/icons/full/modelelements/CommandParameter.png
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.CoreExpression=/icons/full/modelelements/CoreExpression.png
+IMG_org.eclipse.e4.tools.emf.ui.modelelements.Dialog=/icons/full/modelelements/Dialog.png
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.DirectMenuItem=/icons/full/modelelements/DirectMenuItem.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.DirectToolItem=/icons/full/modelelements/DirectToolItem.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.HandledMenuItem=/icons/full/modelelements/HandledMenuItem.gif
@@ -37,6 +38,7 @@
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.TrimContribution=/icons/full/modelelements/TrimContribution.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.Window=/icons/full/modelelements/Window.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.WindowTrim=/icons/full/modelelements/WindowTrim.gif
+IMG_org.eclipse.e4.tools.emf.ui.modelelements.WizardDialog=/icons/full/modelelements/WizardDialog.png
 
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.Addons=/icons/full/modelelements/tbr/Addons.png
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.Application=/icons/full/modelelements/tbr/Application.png
@@ -45,6 +47,7 @@
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.BindingContext=/icons/full/modelelements/tbr/BindingContext.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.BindingTable=/icons/full/modelelements/tbr/BindingTable.png
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.CommandParameter=/icons/full/modelelements/tbr/CommandParameter.gif
+IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.Dialog=/icons/full/modelelements/tbr/Dialog.png
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.DirectMenuItem=/icons/full/modelelements/tbr/DirectMenuItem.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.DirectToolItem=/icons/full/modelelements/tbr/DirectToolItem.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.HandledMenuItem=/icons/full/modelelements/tbr/HandledMenuItem.gif
@@ -72,6 +75,8 @@
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.TrimContribution=/icons/full/modelelements/tbr/TrimContribution.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.Window=/icons/full/modelelements/tbr/Window.gif
 IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.WindowTrim=/icons/full/modelelements/tbr/WindowTrim.gif
+IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.WizardDialog=/icons/full/modelelements/tbr/WizardDialog.png
+
 
 IMG_org.eclipse.e4.tools.emf.ui.obj16.arrow_down=/icons/full/obj16/arrow_down.png
 IMG_org.eclipse.e4.tools.emf.ui.obj16.arrow_up=/icons/full/obj16/arrow_up.png
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
new file mode 100644
index 0000000..681c0a0
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/Dialog.png
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
new file mode 100644
index 0000000..0889b90
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/WizardDialog.png
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/tbr/Dialog.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/tbr/Dialog.png
new file mode 100644
index 0000000..4a4cbfe
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/tbr/Dialog.png
Binary files differ
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/tbr/WizardDialog.png b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/tbr/WizardDialog.png
new file mode 100644
index 0000000..2ad3435
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.emf.ui/icons/full/modelelements/tbr/WizardDialog.png
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 0d4b8ef..7643488 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
@@ -268,6 +268,10 @@
 	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;
@@ -475,6 +479,8 @@
 	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 3dceed6..7e0e85a 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
@@ -47,7 +47,7 @@
 ApplicationEditor_PartDescriptors=Part Descriptors
 ApplicationEditor_BindingTables=BindingTables
 ApplicationEditor_Commands=Commands
-ApplicationEditor_Windows=Windows
+ApplicationEditor_Windows=Windows and Dialogs
 ApplicationEditor_Addons=Addons
 ApplicationEditor_MenuContributions=Menu Contributions
 ApplicationEditor_Snippets=Snippets
@@ -80,6 +80,10 @@
 CommandEditor_AddCommandParameter=Command Parameter
 CommandEditor_NewCommandParameter=Command Parameter {0}
 
+DialogEditor_Label=Dialog
+
+WizardDialogEditor_Label=Wizard
+
 DirectMenuItemEditor_Label=DirectMenuItem
 DirectMenuItemEditor_Description=DirectMenuItem bla bla bla
 DirectMenuItemEditor_ClassURI=Class URI
@@ -476,6 +480,8 @@
 VWindowEditor_Windows=Windows
 VWindowEditor_AddTrimmedWindow=Trimmed Window
 VWindowEditor_AddWindow=Window
+VWindowEditor_AddDialog=Dialog
+VWindowEditor_AddWizardDialog=Wizard
 
 VWindowSharedElementsEditor_TreeLabel=Shared Elements
 VWindowSharedElementsEditor_TreeLabelDescription=Shared Elements Bla Bla Bla Bla
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 60c8ecf..353ab2f 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,6 +24,7 @@
 	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$
@@ -53,6 +54,7 @@
 	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_Tbr_Addons = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.Addons"; //$NON-NLS-1$
 	public static final String IMG_Tbr_Application = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.Application"; //$NON-NLS-1$
@@ -61,6 +63,7 @@
 	public static final String IMG_Tbr_BindingContext = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.BindingContext"; //$NON-NLS-1$
 	public static final String IMG_Tbr_BindingTable = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.BindingTable"; //$NON-NLS-1$
 	public static final String IMG_Tbr_CommandParameter = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.CommandParameter"; //$NON-NLS-1$
+	public static final String IMG_Tbr_Dialog = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.Dialog"; //$NON-NLS-1$
 	public static final String IMG_Tbr_DirectMenuItem = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.DirectMenuItem"; //$NON-NLS-1$
 	public static final String IMG_Tbr_DirectToolItem = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.DirectToolItem"; //$NON-NLS-1$
 	public static final String IMG_Tbr_HandledMenuItem = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.HandledMenuItem"; //$NON-NLS-1$
@@ -88,6 +91,7 @@
 	public static final String IMG_Tbr_TrimContribution = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.TrimContribution"; //$NON-NLS-1$
 	public static final String IMG_Tbr_Window = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.Window"; //$NON-NLS-1$
 	public static final String IMG_Tbr_WindowTrim = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.WindowTrim"; //$NON-NLS-1$
+	public static final String IMG_Tbr_WizardDialog = "IMG_org.eclipse.e4.tools.emf.ui.modelelements.tbr.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$
 	public static final String IMG_Obj16_arrow_up = "IMG_org.eclipse.e4.tools.emf.ui.obj16.arrow_up"; //$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 2a6143f..8087b53 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
@@ -12,8 +12,6 @@
  ******************************************************************************/
 package org.eclipse.e4.tools.emf.ui.internal.common;
 
-import org.eclipse.jface.viewers.AbstractTreeViewer;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -75,6 +73,7 @@
 import org.eclipse.e4.tools.emf.ui.internal.common.component.CommandParameterEditor;
 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;
@@ -108,6 +107,7 @@
 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.virtual.VApplicationAddons;
 import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VApplicationCategoriesEditor;
 import org.eclipse.e4.tools.emf.ui.internal.common.component.virtual.VApplicationWindowEditor;
@@ -195,6 +195,7 @@
 import org.eclipse.jface.text.source.AnnotationModel;
 import org.eclipse.jface.text.source.SourceViewer;
 import org.eclipse.jface.text.source.VerticalRuler;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
 import org.eclipse.jface.viewers.DoubleClickEvent;
 import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -1203,6 +1204,8 @@
 		registerEditor(BasicPackageImpl.Literals.PART_STACK, ContextInjectionFactory.make(PartStackEditor.class, context));
 		registerEditor(BasicPackageImpl.Literals.INPUT_PART, ContextInjectionFactory.make(InputPartEditor.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(org.eclipse.e4.ui.model.application.descriptor.basic.impl.BasicPackageImpl.Literals.PART_DESCRIPTOR, ContextInjectionFactory.make(PartDescriptorEditor.class, context));
 
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
index 8d95afc..77cb8ee 100644
--- 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
@@ -89,6 +89,7 @@
 	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 APPLICATION__DIALOGS = EMFProperties.list(ApplicationPackageImpl.Literals.APPLICATION__DIALOGS);
 	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);
@@ -263,7 +264,6 @@
 			protected boolean accepted(Object o) {
 				return true;
 			}
-
 		});
 
 		list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_CATEGORIES, APPLICATION__CATEGORIES, element, Messages.ApplicationEditor_Categories) {
@@ -272,7 +272,6 @@
 			protected boolean accepted(Object o) {
 				return true;
 			}
-
 		});
 
 		list.add(new VirtualEntry<Object>(ModelEditor.VIRTUAL_APPLICATION_WINDOWS, ELEMENT_CONTAINER__CHILDREN, element, Messages.ApplicationEditor_Windows) {
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
new file mode 100644
index 0000000..44495c0
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/DialogEditor.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MDialog;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+public class DialogEditor extends WindowEditor {
+
+	@Override
+	public Image getImage(Object element, Display display) {
+		if (element instanceof MUIElement) {
+			MUIElement uiElement = (MUIElement) element;
+			if (uiElement.isToBeRendered() && uiElement.isVisible()) {
+				return createImage(ResourceProvider.IMG_Dialog);
+			} else {
+				return createImage(ResourceProvider.IMG_Tbr_Dialog);
+			}
+		}
+
+		return null;
+	}
+
+	@Override
+	public String getLabel(Object element) {
+		return Messages.DialogEditor_Label;
+	}
+
+	@Override
+	public List<Action> getActions(Object element) {
+		List<Action> actions = new ArrayList<Action>();
+
+		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/WindowEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WindowEditor.java
index 7f4ae23..c533efc 100644
--- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WindowEditor.java
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WindowEditor.java
@@ -419,9 +419,13 @@
 
 		MWindow window = (MWindow) element;
 		if (window.getMainMenu() == null) {
-			actions.add(addMainMenu);
+			actions.add(getActionAddMainMenu());
 		}
 
 		return actions;
 	}
+
+	protected Action getActionAddMainMenu() {
+		return addMainMenu;
+	}
 }
\ 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/WizardDialogEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WizardDialogEditor.java
new file mode 100644
index 0000000..7389d7e
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/WizardDialogEditor.java
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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.MUIElement;
+import org.eclipse.e4.ui.model.application.ui.basic.MWizardDialog;
+import org.eclipse.jface.action.Action;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+
+public class WizardDialogEditor extends WindowEditor {
+
+	@Override
+	public Image getImage(Object element, Display display) {
+		if (element instanceof MUIElement) {
+			MUIElement uiElement = (MUIElement) element;
+			if (uiElement.isToBeRendered() && uiElement.isVisible()) {
+				return createImage(ResourceProvider.IMG_WizardDialog);
+			} else {
+				return createImage(ResourceProvider.IMG_Tbr_WizardDialog);
+			}
+		}
+
+		return null;
+	}
+
+	@Override
+	public String getLabel(Object element) {
+		return Messages.WizardDialogEditor_Label;
+	}
+
+	@Override
+	public List<Action> getActions(Object element) {
+		List<Action> actions = new ArrayList<Action>();
+
+		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/VWindowEditor.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/virtual/VWindowEditor.java
index aa69f16..5ddd02d 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
@@ -65,6 +65,12 @@
 
 	@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() {
@@ -77,6 +83,12 @@
 				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
@@ -139,7 +151,7 @@
 				return eclass.getName();
 			}
 		});
-		childrenDropDown.setInput(new EClass[] { BasicPackageImpl.Literals.TRIMMED_WINDOW, BasicPackageImpl.Literals.WINDOW });
+		childrenDropDown.setInput(new EClass[] { BasicPackageImpl.Literals.DIALOG, BasicPackageImpl.Literals.TRIMMED_WINDOW, BasicPackageImpl.Literals.WINDOW, BasicPackageImpl.Literals.WIZARD_DIALOG });
 		childrenDropDown.setSelection(new StructuredSelection(BasicPackageImpl.Literals.TRIMMED_WINDOW));
 
 		Button b = new Button(buttonCompTop, SWT.PUSH | SWT.FLAT);