From df1d4d493dc8ea4b4a81ad8da993f91df220431a Mon Sep 17 00:00:00 2001
From: Patrick tessier
Date: Mon, 10 Feb 2014 13:45:32 +0100
Subject: 386118: [EMF Facet] Papyrus should progressively support EMF Facet
0.2 https://bugs.eclipse.org/bugs/show_bug.cgi?id=386118
Import EMF Facet---
.../emf/facet/util/ui/internal/Activator.java | 52 ++++
.../emf/facet/util/ui/internal/Messages.java | 37 +++
.../facet/util/ui/internal/dialog/OkDialog.java | 168 ++++++++++
.../util/ui/internal/dialog/OkDialogFactory.java | 105 +++++++
.../util/ui/internal/dialog/QuestionDialog.java | 184 +++++++++++
.../ui/internal/dialog/QuestionDialogFactory.java | 32 ++
.../IFilteredElementSelectionComposite.java | 34 ++
.../util/ui/internal/exported/dialog/IDialog.java | 51 +++
.../internal/exported/dialog/IDialogCallback.java | 28 ++
.../dialog/IDialogCallbackWithPreCommit.java | 59 ++++
.../dialog/IDialogWithoutResultCallback.java | 33 ++
.../ui/internal/exported/dialog/IOkDialog.java | 32 ++
.../internal/exported/dialog/IOkDialogFactory.java | 52 ++++
.../internal/exported/dialog/IQuestionDialog.java | 43 +++
.../exported/dialog/IQuestionDialogFactory.java | 49 +++
.../exported/dialog/IWithResultDialogCallback.java | 34 ++
.../displaysync/AbstractExceptionFreeRunnable.java | 20 ++
.../AbstractVoidExceptionFreeRunnable.java | 22 ++
.../exported/displaysync/AbstractVoidRunnable.java | 22 ++
.../displaysync/DisplaySyncRuntimeException.java | 34 ++
.../internal/exported/displaysync/IRunnable.java | 16 +
.../displaysync/SynchronizedComposite.java | 38 +++
.../exported/displaysync/SynchronizedObject.java | 115 +++++++
.../ui/internal/exported/handler/HandlerUtils.java | 90 ++++++
.../ui/internal/exported/tree/menu/ITreeMenu.java | 44 +++
.../FilteredElementSelectionComposite.java | 174 +++++++++++
...chronizedFilteredElementSelectionComposite.java | 89 ++++++
.../exported/util/dialog/AbstractDialog.java | 169 ++++++++++
.../util/dialog/AbstractDialogWithCallback.java | 58 ++++
.../exported/util/dialog/AbstractMainDialog.java | 62 ++++
.../util/dialog/SynchronizedAbstractDialog.java | 94 ++++++
.../AbstractSelectionExpectedTypeHandler.java | 51 +++
.../internal/exported/util/tree/ExtendedTree.java | 174 +++++++++++
.../exported/util/tree/item/AbstractTreeItem.java | 210 +++++++++++++
.../exported/util/tree/menu/AbstractTreeMenu.java | 205 +++++++++++++
.../util/tree/menu/AbstractTreeMenuItem.java | 213 +++++++++++++
.../util/tree/menu/AbstractTreeSubMenu.java | 128 ++++++++
.../exported/util/tree/menu/ExtendedTreeMenu.java | 341 +++++++++++++++++++++
.../exported/util/widget/AbstractWidget.java | 155 ++++++++++
.../util/widget/command/AbstractCommandWidget.java | 86 ++++++
...actGetOrCreateFilteredElementCommandWidget.java | 147 +++++++++
.../util/widget/command/ICommandWidget.java | 40 +++
.../IGetOrCreateFilteredElementCommmandWidget.java | 33 ++
.../util/widget/component/CreateElementWidget.java | 132 ++++++++
.../AbstractGetOrCreateElementWidget.java | 168 ++++++++++
...AbstractGetOrCreateElementWithButtonWidget.java | 120 ++++++++
...ctGetOrCreateElementWithDialogButtonWidget.java | 89 ++++++
...ctGetOrCreateElementWithWizardButtonWidget.java | 82 +++++
.../properties/AbstractGetPropertyWidget.java | 159 ++++++++++
.../properties/bounds/AbstractGetBoundsWidget.java | 127 ++++++++
.../name/AbstractGetElementNameWidget.java | 86 ++++++
.../name/AbstractPrintElementWidget.java | 59 ++++
.../util/widget/query/AbstractQueryWidget.java | 40 +++
.../exported/util/wizard/SynchronizedWizard.java | 314 +++++++++++++++++++
.../internal/exported/widget/IAbstractWidget.java | 56 ++++
.../IAbstractGetOrCreateElementWidget.java | 43 +++
...AbstractGetOrCreateElementWithButtonWidget.java | 41 +++
.../internal/exported/wizard/IExtendedWizard.java | 56 ++++
.../emf/facet/util/ui/internal/messages.properties | 23 ++
...nchronizedAbstractGetOrCreateElementWidget.java | 92 ++++++
...AbstractGetOrCreateElementWithButtonWidget.java | 112 +++++++
...edGetOrCreateFilteredElementCommmandWidget.java | 142 +++++++++
.../sync/generated/SynchronizedOkDialog.java | 64 ++++
.../metaclass/FilteredElementSelectionWidget.java | 150 +++++++++
.../emf/facet/util/ui/utils/PropertyElement.java | 113 +++++++
.../emf/facet/util/ui/utils/PropertyElement2.java | 54 ++++
.../eclipse/emf/facet/util/ui/utils/UIUtils.java | 248 +++++++++++++++
.../emf/facet/util/ui/utils/WidgetProperties.java | 67 ++++
68 files changed, 6460 insertions(+)
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/Activator.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/Messages.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/dialog/OkDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/dialog/OkDialogFactory.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/dialog/QuestionDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/dialog/QuestionDialogFactory.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/composite/IFilteredElementSelectionComposite.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IDialogCallback.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IDialogCallbackWithPreCommit.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IDialogWithoutResultCallback.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IOkDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IOkDialogFactory.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IQuestionDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IQuestionDialogFactory.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IWithResultDialogCallback.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/displaysync/AbstractExceptionFreeRunnable.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/displaysync/AbstractVoidExceptionFreeRunnable.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/displaysync/AbstractVoidRunnable.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/displaysync/DisplaySyncRuntimeException.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/displaysync/IRunnable.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/displaysync/SynchronizedComposite.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/displaysync/SynchronizedObject.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/handler/HandlerUtils.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/tree/menu/ITreeMenu.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/composite/FilteredElementSelectionComposite.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/composite/SynchronizedFilteredElementSelectionComposite.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/dialog/AbstractDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/dialog/AbstractDialogWithCallback.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/dialog/AbstractMainDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/dialog/SynchronizedAbstractDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/handler/AbstractSelectionExpectedTypeHandler.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/tree/ExtendedTree.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/tree/item/AbstractTreeItem.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/tree/menu/AbstractTreeMenu.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/tree/menu/AbstractTreeMenuItem.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/tree/menu/AbstractTreeSubMenu.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/tree/menu/ExtendedTreeMenu.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/AbstractWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/command/AbstractCommandWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/command/AbstractGetOrCreateFilteredElementCommandWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/command/ICommandWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/command/IGetOrCreateFilteredElementCommmandWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/CreateElementWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/getorcreate/AbstractGetOrCreateElementWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/getorcreate/AbstractGetOrCreateElementWithButtonWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/getorcreate/AbstractGetOrCreateElementWithDialogButtonWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/getorcreate/AbstractGetOrCreateElementWithWizardButtonWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/properties/AbstractGetPropertyWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/properties/bounds/AbstractGetBoundsWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/properties/name/AbstractGetElementNameWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/component/properties/name/AbstractPrintElementWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/widget/query/AbstractQueryWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/wizard/SynchronizedWizard.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/widget/IAbstractWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/widget/getorcreate/IAbstractGetOrCreateElementWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/widget/getorcreate/IAbstractGetOrCreateElementWithButtonWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/wizard/IExtendedWizard.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/messages.properties
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/sync/generated/SynchronizedAbstractGetOrCreateElementWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/sync/generated/SynchronizedAbstractGetOrCreateElementWithButtonWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/sync/generated/SynchronizedGetOrCreateFilteredElementCommmandWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/sync/generated/SynchronizedOkDialog.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/widget/metaclass/FilteredElementSelectionWidget.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/utils/PropertyElement.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/utils/PropertyElement2.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/utils/UIUtils.java
create mode 100644 plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/utils/WidgetProperties.java
(limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src')
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/Activator.java b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/Activator.java
new file mode 100644
index 00000000000..78ea2cb7f82
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/Activator.java
@@ -0,0 +1,52 @@
+/**
+ * Copyright (c) 2012 Mia-Software.
+ *
+ * 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:
+ * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
+ */
+package org.eclipse.emf.facet.util.ui.internal;
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+@SuppressWarnings("PMD.UseSingleton")
+// @SuppressWarnings("PMD.UseSingleton") We cannot conforms to this rule because
+// this class is an Eclipse plug-in activator which will be instantiated by the
+// Eclipse framework.
+public class Activator extends Plugin {
+
+ private static Activator plugin;
+
+ @Override
+ @SuppressWarnings("PMD.SignatureDeclareThrowsException")
+ // @SuppressWarnings("PMD.SignatureDeclareThrowsException") We have to use
+ // this signature because this is an override of an Eclipse framework's
+ // method.
+ public void start(final BundleContext bundleContext) throws Exception {
+ super.start(bundleContext);
+ Activator.plugin = this;
+ }
+
+ @Override
+ @SuppressWarnings({ "PMD.SignatureDeclareThrowsException",
+ "PMD.NullAssignment" })
+ // @SuppressWarnings("PMD.SignatureDeclareThrowsException") We have to use
+ // this signature because this is an override of an Eclipse framework's
+ // method.
+ // @SuppressWarnings("PMD.NullAssignment")
+ // No choice to right it in another way : this is an Eclipse pattern.
+ public void stop(final BundleContext bundleContext) throws Exception {
+ Activator.plugin = null;
+ super.stop(bundleContext);
+ }
+
+ public static Plugin getDefault() {
+ return Activator.plugin;
+ }
+
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/Messages.java b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/Messages.java
new file mode 100644
index 00000000000..3491bf39f6b
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/Messages.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Mia-Software.
+ * 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:
+ * Nicolas Bros (Mia-Software) - Bug 366367 - To be able to change the "CanBePresentedInTheTable" query
+ * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
+ * Thomas Cicognani (Soft-Maint) - Bug 406565 - Ok Dialog
+ *******************************************************************************/
+package org.eclipse.emf.facet.util.ui.internal;
+
+import org.eclipse.osgi.util.NLS;
+
+public final class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.emf.facet.util.ui.internal.messages"; //$NON-NLS-1$
+ public static String FilteredElementSelectionControl_type_filter_text;
+ public static String QuestionDialog_yes;
+ public static String QuestionDialog_no;
+ public static String OK;
+
+ public static String item_todo;
+ public static String Type;
+ public static String Select;
+ public static String New;
+
+ public static String Select_Facet;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(Messages.BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/dialog/OkDialog.java b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/dialog/OkDialog.java
new file mode 100644
index 00000000000..26d9b707e71
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/dialog/OkDialog.java
@@ -0,0 +1,168 @@
+/**
+ * Copyright (c) Soft-Maint.
+ *
+ * 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:
+ * Thomas Cicognani (Soft-Maint) - Bug 406565 - Ok Dialog
+ */
+package org.eclipse.emf.facet.util.ui.internal.dialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.facet.util.ui.internal.Messages;
+import org.eclipse.emf.facet.util.ui.internal.exported.dialog.IDialogCallback;
+import org.eclipse.emf.facet.util.ui.internal.exported.dialog.IOkDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+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.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class OkDialog implements IOkDialog {
+ private static final int SHELL_WIDTH = 450;
+ private static final int SHELL_HEIGHT = 170;
+ private static final int BUTTON_WIDTH_HINT = 80;
+ private static final int MARGIN_LEFT = 5;
+ private static final int MARGIN_TOP = 8;
+ private static final int VERTICAL_SPACING = 10;
+ private static final int HORIZONT_SPACING = 15;
+ private static final int BUTTONS_COMP_COL = 3;
+
+ private final List
+ * The second dialog should either:
+ *
+ *
+ *
+ * @param null
from this method, you
+ * mustn't call {@link IDialogCallback#committed(Object)} or the commit will be done twice
+ * @return the pre-commit dialog (for unit tests), or null
if no pre-commit callback is needed
+ */
+ D openPrecommitDialog(T1 result, IDialogCallback
+ *
+ */
+ Boolean getResult();
+
+ /** @return the dialog's shell */
+ Shell getShell();
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IQuestionDialogFactory.java b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IQuestionDialogFactory.java
new file mode 100644
index 00000000000..f43e2632424
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/dialog/IQuestionDialogFactory.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ * 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:
+ * Nicolas Bros (Mia-Software) - Bug 366367 - To be able to change the "CanBePresentedInTheTable" query
+ * Gregoire Dupe (Mia-Software) - Bug 374903 - [Table] ITableWidget.setLoadedFacetSets
+ *******************************************************************************/
+package org.eclipse.emf.facet.util.ui.internal.exported.dialog;
+
+import org.eclipse.emf.facet.util.ui.internal.dialog.QuestionDialogFactory;
+import org.eclipse.swt.widgets.Shell;
+
+/** A factory to instantiate {@link IQuestionDialog} */
+public interface IQuestionDialogFactory {
+ static IQuestionDialogFactory INSTANCE = new QuestionDialogFactory();
+
+ /**
+ * Instantiates a question dialog (without opening it)
+ *
+ * @param parent
+ * the parent shell for the new dialog
+ * @param title
+ * the text that appears in the title of the dialog
+ * @param message
+ * the text that appears in the message area of the dialog
+ * @return the dialog, ready to be {@link IQuestionDialog#open() opened}
+ */
+ @Deprecated
+ IQuestionDialog createQuestionDialog(Shell parent, String title, String message);
+
+ /**
+ * Instantiates a question dialog (without opening it)
+ *
+ * @param parent
+ * the parent shell for the new dialog
+ * @param title
+ * the text that appears in the title of the dialog
+ * @param message
+ * the text that appears in the message area of the dialog
+ * @return the dialog, ready to be {@link IQuestionDialog#open() opened}
+ * @since 0.2
+ */
+ IQuestionDialog createQuestionDialog(Shell parent, String title,
+ String message, IDialogCallbacktrue
if the user clicked "Yes"
+ * false
if the user clicked "No"
+ * null
if the user closed the dialog without clicking either on "Yes" or "No"
+ *
menuItems
in parameter.
+ *
+ * @param parent
+ * the parent of the TreeExtended.
+ * @param menuItems
+ * the items of the menu.
+ *
+ * @see ExtendedTreeMenu
+ * @see AbstractTreeMenu
+ */
+ public ExtendedTree(final Composite parent,
+ final Listproperties
passed by the
+ * {@link #treeExtended} via the method
+ * {@link ExtendedTree#putExtraPropertiesToItems(Map)}.
+ *
+ * @return the extraProperties
+ */
+ public MaptreeItem
+ * .
+ */
+ public abstract AbstractTreeItemproperties
to each items created.
+ *
+ * @param properties
+ * the list of properties to pass.
+ */
+ public void putExtraProperties(final MapmenuItemName
into the items of the tree menu.
+ *
+ * @param menuItemType
+ * the name of the element to find.
+ * @return the item menu with the name in parameter (can be null).
+ */
+ private AbstractTreeMenuItemtreeItemName
+ *
+ * @param treeItemName
+ * the name of the item to select.
+ * @return the list of all the tree item with the name in parameter.
+ */
+ public List extends
+ AbstractCommandWidget {
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * the parent of this widget.
+ * @param editingDomain
+ * the current editing domain.
+ * @param properties
+ * the properties.
+ */
+ protected AbstractQueryWidget(final Composite parent) {
+ super(parent);
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/wizard/SynchronizedWizard.java b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/wizard/SynchronizedWizard.java
new file mode 100644
index 00000000000..5e51c80f200
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/internal/exported/util/wizard/SynchronizedWizard.java
@@ -0,0 +1,314 @@
+/**
+ * Copyright (c) 2012 Mia-Software.
+ *
+ * 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:
+ * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
+ */
+package org.eclipse.emf.facet.util.ui.internal.exported.util.wizard;
+
+import org.eclipse.emf.facet.util.ui.internal.exported.displaysync.AbstractExceptionFreeRunnable;
+import org.eclipse.emf.facet.util.ui.internal.exported.displaysync.AbstractVoidExceptionFreeRunnable;
+import org.eclipse.emf.facet.util.ui.internal.exported.displaysync.SynchronizedObject;
+import org.eclipse.emf.facet.util.ui.internal.exported.wizard.IExtendedWizard;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.wizard.IWizardContainer;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+
+/**
+ * Synchronized class for safe run.
+ *
+ * @see WizardFactoryImpl
+ * @since 0.3
+ */
+public class SynchronizedWizard
+ *
+ *
+ * @since 0.3
+ */
+public class PropertyElement {
+
+ // TODO This class must not be exposed.
+
+ private final String name;
+ private final Class> type;
+ private boolean changeable;
+ private Object value;
+
+ /**
+ * Constructor
+ *
+ * @param name
+ * the name of the property.
+ * @param type
+ * the type of the property.
+ * @param changeable
+ * if the property can be changed (edited) or not.
+ */
+ public PropertyElement(final String name, final Class> type,
+ final boolean changeable) {
+ this(name, type, changeable, null);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param name
+ * the name of the property.
+ * @param type
+ * the type of the property.
+ * @param changeable
+ * if the property can be changed (edited) or not.
+ * @param value
+ * the initial value of the property.
+ */
+ public PropertyElement(final String name, final Class> type,
+ final boolean changeable, final Object value) {
+ super();
+ this.name = name;
+ this.type = type;
+ this.changeable = changeable;
+ this.value = value;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * @return the changeable
+ */
+ public boolean isChangeable() {
+ return this.changeable;
+ }
+
+ /**
+ * @return the type
+ */
+ public Class> getType() {
+ return this.type;
+ }
+
+ /**
+ * @return the value
+ */
+ public Object getValue() {
+ return this.value;
+ }
+
+ /**
+ * set the value.
+ */
+ public void setValue(final Object value) {
+ this.value = value;
+ }
+
+ /**
+ * @param changeable
+ * the changeable to set
+ */
+ public void setChangeable(final boolean changeable) {
+ this.changeable = changeable;
+ }
+}
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/utils/PropertyElement2.java b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/utils/PropertyElement2.java
new file mode 100644
index 00000000000..4adb661da1c
--- /dev/null
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.util.ui/src/org/eclipse/emf/facet/util/ui/utils/PropertyElement2.java
@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) 2012 Mia-Software.
+ *
+ * All rights reserved.
+ *
+ * Contributors:
+ * Alban Ménager (Soft-Maint) - Bug 387470 - [EFacet][Custom] Editors
+ * Grégoire Dupé (Mia-Software) - Integration into ITM-Factory
+ * Grégoire Dupé (Mia-Software) - Bug 387470 - [EFacet][Custom] Editors
+ */
+package org.eclipse.emf.facet.util.ui.utils;
+
+
+/**
+ * @since 0.3
+ */
+public class PropertyElement2