summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2014-05-15 09:55:02 (EDT)
committerBenoit Maggi2014-05-16 05:25:59 (EDT)
commit2092f92dd2ab28499e34f98cd9ccdccb0e37188c (patch)
tree4bceadd7ec7ce8fcde111b31281490a1d21fbfeb
parentf29407a0123ceec8a28e93d2b33c2103d6d979e5 (diff)
downloadorg.eclipse.papyrus-2092f92dd2ab28499e34f98cd9ccdccb0e37188c.zip
org.eclipse.papyrus-2092f92dd2ab28499e34f98cd9ccdccb0e37188c.tar.gz
org.eclipse.papyrus-2092f92dd2ab28499e34f98cd9ccdccb0e37188c.tar.bz2
Bug 405565 -[Papyrus Model Explorer] Papyrus Model Explorer shall enablerefs/changes/60/26660/3
copy/past with views. - Add a test for simple copy of diagrams inside model explorer - Add a test for simple copy of tables inside model explorer Change-Id: I15e3c95bd18d986476bef6cef06980b1bbdfd824 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF67
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java261
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/TableUtils.java82
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/META-INF/MANIFEST.MF4
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.di37
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.notation253
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.uml24
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/AllTests.java6
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/DeleteModelExplorerTest.java2
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CopyPasteModelExplorerTest.java2
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CutPasteModelExplorerTest.java2
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/DiagramCopyPasteModelExplorerTest.java140
-rw-r--r--tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/TableCopyPasteModelExplorerTest.java141
13 files changed, 716 insertions, 305 deletions
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
index 1f39b00..ded1b15 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF
@@ -1,33 +1,34 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources;bundle-version="3.8.0",
- org.eclipse.jdt.ui,
- org.eclipse.papyrus.views.modelexplorer;bundle-version="1.0.0",
- org.eclipse.ui.navigator,
- org.eclipse.ui.views.properties.tabbed,
- org.eclipse.ui.ide;bundle-version="3.8.0",
- org.eclipse.emf.edit;bundle-version="2.8.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
- org.eclipse.papyrus.editor;bundle-version="1.0.0",
- org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.tools;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- com.google.guava;bundle-version="11.0.0"
-Export-Package: org.eclipse.papyrus.junit.utils,
- org.eclipse.papyrus.junit.utils.classification,
- org.eclipse.papyrus.junit.utils.rules,
- org.eclipse.papyrus.junit.utils.tests
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.junit.utils.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.junit.utils
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources;bundle-version="3.8.0",
+ org.eclipse.jdt.ui,
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="1.0.0",
+ org.eclipse.ui.navigator,
+ org.eclipse.ui.views.properties.tabbed,
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.emf.edit;bundle-version="2.8.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
+ org.eclipse.papyrus.editor;bundle-version="1.0.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.nattable.model
+Export-Package: org.eclipse.papyrus.junit.utils,
+ org.eclipse.papyrus.junit.utils.classification,
+ org.eclipse.papyrus.junit.utils.rules,
+ org.eclipse.papyrus.junit.utils.tests
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.junit.utils.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.junit.utils
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java
index d86a002..33c4207 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/DiagramUtils.java
@@ -1,122 +1,139 @@
-/*****************************************************************************
- * Copyright (c) 2014 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:
- * CEA LIST - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.junit.utils;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gef.EditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
-import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
-import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.gmf.runtime.notation.Shape;
-import org.eclipse.gmf.runtime.notation.View;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
-import org.eclipse.papyrus.infra.core.resource.IModel;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.uml2.uml.NamedElement;
-import org.junit.Assert;
-
-/**
- * Utility class for diagrams
- */
-public class DiagramUtils {
-
- public static IGraphicalEditPart findEditPartforView(IMultiDiagramEditor papyrusEditor, View view, Class<? extends EditPart> editPartClass) {
- DiagramEditPart diagramEditPart = findDiagramEditPart(papyrusEditor);
- Object part = diagramEditPart.getViewer().getEditPartRegistry().get(view);
- Assert.assertNotNull("Cannot find the edit part", part);
- Assert.assertNotNull("part has not the right class", editPartClass.isAssignableFrom(part.getClass()));
- return (IGraphicalEditPart) part;
- }
-
- public static DiagramEditPart findDiagramEditPart(IMultiDiagramEditor papyrusEditor) {
- DiagramEditPart diagramEditPart = (DiagramEditPart) papyrusEditor.getAdapter(DiagramEditPart.class);
- Assert.assertNotNull("Cannot find the Diagram edit part", diagramEditPart);
- return diagramEditPart;
- }
-
- /**
- * Search and returns the first view in the specified container view with the given name
- *
- * @param container
- * the view container of the searched view
- * @param elementName
- * the name of the element represented by the search view
- * @return the found view or <code>null</code> if none was found
- */
- public static Shape findShape(View container, String elementName) {
- for (Object viewObject : container.getChildren()) {
- View view = (View) viewObject;
- if (view instanceof Shape && view.getElement() instanceof NamedElement) {
- NamedElement element = (NamedElement) view.getElement();
- if (elementName.equals(element.getName())) {
- return (Shape) view;
- }
- }
- }
-
- // Assert.fail("Cannot find the view associated to " + elementName);
- return null;
- }
-
- /**
- * Returns the int corresponding to the given tuple
- *
- * @param red
- * @param green
- * @param blue
- * @return
- */
- public static int rgb(int red, int green, int blue) {
- return red | green << 8 | blue << 16;
- }
-
- public static RGB integerToRGB(int value) {
- int blue = value & 255;
- int green = (value >> 8) & 255;
- int red = (value >> 16) & 255;
- return new RGB(red, green, blue);
- }
-
- public static String integerToRGBString(int value) {
- RGB rgb = integerToRGB(value);
- return rgb.toString();
-
- }
-
- public static Diagram getNotationDiagram(ModelSet modelSet, String string) {
- IModel notationModel = modelSet.getModel(NotationModel.MODEL_ID);
-
- AbstractBaseModel notationBaseModel = null;
- if (notationModel instanceof AbstractBaseModel) {
- notationBaseModel = (AbstractBaseModel) notationModel;
- } else {
- Assert.fail("notation model is not an abstract base model");
- return null;
- }
- Assert.assertTrue("notation resource contains nothing", notationBaseModel.getResource().getContents().size() >= 1);
- for (EObject object : notationBaseModel.getResource().getContents()) {
- if (object instanceof Diagram && string.equals(((Diagram) object).getName())) {
- return (Diagram) object;
- }
- }
- return null;
- }
-
-
-
-}
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * CEA LIST - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.junit.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.Shape;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+
+/**
+ * Utility class for diagrams
+ */
+public class DiagramUtils {
+
+ public static IGraphicalEditPart findEditPartforView(IMultiDiagramEditor papyrusEditor, View view, Class<? extends EditPart> editPartClass) {
+ DiagramEditPart diagramEditPart = findDiagramEditPart(papyrusEditor);
+ Object part = diagramEditPart.getViewer().getEditPartRegistry().get(view);
+ Assert.assertNotNull("Cannot find the edit part", part);
+ Assert.assertNotNull("part has not the right class", editPartClass.isAssignableFrom(part.getClass()));
+ return (IGraphicalEditPart) part;
+ }
+
+ public static DiagramEditPart findDiagramEditPart(IMultiDiagramEditor papyrusEditor) {
+ DiagramEditPart diagramEditPart = (DiagramEditPart) papyrusEditor.getAdapter(DiagramEditPart.class);
+ Assert.assertNotNull("Cannot find the Diagram edit part", diagramEditPart);
+ return diagramEditPart;
+ }
+
+ /**
+ * Search and returns the first view in the specified container view with the given name
+ *
+ * @param container
+ * the view container of the searched view
+ * @param elementName
+ * the name of the element represented by the search view
+ * @return the found view or <code>null</code> if none was found
+ */
+ public static Shape findShape(View container, String elementName) {
+ for (Object viewObject : container.getChildren()) {
+ View view = (View) viewObject;
+ if (view instanceof Shape && view.getElement() instanceof NamedElement) {
+ NamedElement element = (NamedElement) view.getElement();
+ if (elementName.equals(element.getName())) {
+ return (Shape) view;
+ }
+ }
+ }
+
+ // Assert.fail("Cannot find the view associated to " + elementName);
+ return null;
+ }
+
+ /**
+ * Returns the int corresponding to the given tuple
+ *
+ * @param red
+ * @param green
+ * @param blue
+ * @return
+ */
+ public static int rgb(int red, int green, int blue) {
+ return red | green << 8 | blue << 16;
+ }
+
+ public static RGB integerToRGB(int value) {
+ int blue = value & 255;
+ int green = (value >> 8) & 255;
+ int red = (value >> 16) & 255;
+ return new RGB(red, green, blue);
+ }
+
+ public static String integerToRGBString(int value) {
+ RGB rgb = integerToRGB(value);
+ return rgb.toString();
+
+ }
+
+ public static Diagram getNotationDiagram(ModelSet modelSet, String string) {
+ IModel notationModel = modelSet.getModel(NotationModel.MODEL_ID);
+
+ AbstractBaseModel notationBaseModel = null;
+ if (notationModel instanceof AbstractBaseModel) {
+ notationBaseModel = (AbstractBaseModel) notationModel;
+ } else {
+ Assert.fail("notation model is not an abstract base model");
+ return null;
+ }
+ Assert.assertTrue("notation resource contains nothing", notationBaseModel.getResource().getContents().size() >= 1);
+ for (EObject object : notationBaseModel.getResource().getContents()) {
+ if (object instanceof Diagram && string.equals(((Diagram) object).getName())) {
+ return (Diagram) object;
+ }
+ }
+ return null;
+ }
+
+ public static Collection<Diagram> getAllNotationDiagram(ModelSet modelSet, String string) {
+ IModel notationModel = modelSet.getModel(NotationModel.MODEL_ID);
+ Collection<Diagram> arrayList = new ArrayList<Diagram>();
+ AbstractBaseModel notationBaseModel = null;
+ if (notationModel instanceof AbstractBaseModel) {
+ notationBaseModel = (AbstractBaseModel) notationModel;
+ } else {
+ Assert.fail("notation model is not an abstract base model");
+ return null;
+ }
+ Assert.assertTrue("notation resource contains nothing", notationBaseModel.getResource().getContents().size() >= 1);
+ for (EObject object : notationBaseModel.getResource().getContents()) {
+ if (object instanceof Diagram && string.equals(((Diagram) object).getName())) {
+ arrayList.add((Diagram) object);
+ }
+ }
+ return arrayList;
+ }
+
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/TableUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/TableUtils.java
new file mode 100644
index 0000000..bec37f6
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/TableUtils.java
@@ -0,0 +1,82 @@
+/*****************************************************************************
+ * Copyright (c) 2014 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:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.junit.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.junit.Assert;
+
+/**
+ * Utility class for diagrams
+ */
+public class TableUtils {
+
+ /**
+ * Return the first table found with the specified name
+ * @param modelSet
+ * @param tableName
+ * @return
+ */
+ public static Table getNotationFirstTable(ModelSet modelSet, String tableName) {
+ IModel notationModel = modelSet.getModel(NotationModel.MODEL_ID);
+
+ AbstractBaseModel notationBaseModel = null;
+ if (notationModel instanceof AbstractBaseModel) {
+ notationBaseModel = (AbstractBaseModel) notationModel;
+ } else {
+ Assert.fail("notation model is not an abstract base model");
+ return null;
+ }
+ Assert.assertTrue("notation resource contains nothing", notationBaseModel.getResource().getContents().size() >= 1);
+ for (EObject eObject : notationBaseModel.getResource().getContents()) {
+ if (eObject instanceof Table && tableName.equals(((Table) eObject).getName())) {
+ return (Table) eObject;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Return the all tables found with the specified name
+ * @param modelSet
+ * @param tableName
+ * @return
+ */
+ public static Collection<Table> getAllNotationTable(ModelSet modelSet, String tableName) {
+ IModel notationModel = modelSet.getModel(NotationModel.MODEL_ID);
+ Collection<Table> tableList = new ArrayList<Table>();
+ AbstractBaseModel notationBaseModel = null;
+ if (notationModel instanceof AbstractBaseModel) {
+ notationBaseModel = (AbstractBaseModel) notationModel;
+ } else {
+ Assert.fail("notation model is not an abstract base model");
+ return null;
+ }
+ Assert.assertTrue("notation resource contains nothing", notationBaseModel.getResource().getContents().size() >= 1);
+ for (EObject eObject : notationBaseModel.getResource().getContents()) {
+ if (eObject instanceof Table && tableName.equals(((Table) eObject).getName())) {
+ tableList.add((Table) eObject);
+ }
+ }
+ return tableList;
+ }
+
+}
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/META-INF/MANIFEST.MF
index 9d447b2..35d5661 100644
--- a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/META-INF/MANIFEST.MF
@@ -15,7 +15,9 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="1.0.0",
org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0"
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.notation.edit,
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="1.0.0"
Export-Package: org.eclipse.papyrus.uml.modelexplorer.tests
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.di b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.di
index 97d5ce7..f10ad94 100644
--- a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.di
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.di
@@ -1,17 +1,20 @@
-<?xml version="1.0" encoding="ASCII"?>
-<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList>
- <availablePage>
- <emfPageIdentifier href="model.notation#_ejo4IJtqEeGPWIvNqCqnbQ"/>
- </availablePage>
- </pageList>
- <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
- <windows>
- <children xsi:type="di:TabFolder">
- <children>
- <emfPageIdentifier href="model.notation#_ejo4IJtqEeGPWIvNqCqnbQ"/>
- </children>
- </children>
- </windows>
- </sashModel>
-</di:SashWindowsMngr>
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="model.notation#_ejo4IJtqEeGPWIvNqCqnbQ"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="model.notation#_ejo4IJtqEeGPWIvNqCqnbQ"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="model.notation#_kPCtgNzPEeOyiedyA56Opg"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.notation b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.notation
index f3416c6..492b912 100644
--- a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.notation
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.notation
@@ -1,115 +1,138 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_ejo4IJtqEeGPWIvNqCqnbQ" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_fCkP0JtqEeGPWIvNqCqnbQ" type="2008" fontName="Segoe UI" lineColor="0">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fCkP0ptqEeGPWIvNqCqnbQ" source="ShadowFigure">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fCk24JtqEeGPWIvNqCqnbQ" key="ShadowFigure_Value" value="false"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fCk24ZtqEeGPWIvNqCqnbQ" source="displayNameLabelIcon">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fCk24ptqEeGPWIvNqCqnbQ" key="displayNameLabelIcon_value" value="false"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fCk245tqEeGPWIvNqCqnbQ" source="QualifiedName">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fCk25JtqEeGPWIvNqCqnbQ" key="QualifiedNameDepth" value="1000"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_fCk25ZtqEeGPWIvNqCqnbQ" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fCk25ptqEeGPWIvNqCqnbQ" type="7017">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fCk255tqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fCk26JtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fCk26ZtqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fCk26ptqEeGPWIvNqCqnbQ"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fCk265tqEeGPWIvNqCqnbQ" type="7018">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fCk27JtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fCk27ZtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fCk27ptqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fCk275tqEeGPWIvNqCqnbQ"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fCk28JtqEeGPWIvNqCqnbQ" type="7019">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fCk28ZtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fCk28ptqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fCk285tqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fCk29JtqEeGPWIvNqCqnbQ"/>
- </children>
- <element xmi:type="uml:Class" href="model.uml#_fCjBsJtqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fCkP0ZtqEeGPWIvNqCqnbQ" x="190" y="142"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_fUBzQJtqEeGPWIvNqCqnbQ" type="2008" fontName="Segoe UI" lineColor="0">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fUCaUJtqEeGPWIvNqCqnbQ" source="ShadowFigure">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fUCaUZtqEeGPWIvNqCqnbQ" key="ShadowFigure_Value" value="false"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fUCaUptqEeGPWIvNqCqnbQ" source="displayNameLabelIcon">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fUCaU5tqEeGPWIvNqCqnbQ" key="displayNameLabelIcon_value" value="false"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fUCaVJtqEeGPWIvNqCqnbQ" source="QualifiedName">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fUCaVZtqEeGPWIvNqCqnbQ" key="QualifiedNameDepth" value="1000"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_fUCaVptqEeGPWIvNqCqnbQ" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fUCaV5tqEeGPWIvNqCqnbQ" type="7017">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fUCaWJtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fUCaWZtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fUCaWptqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUCaW5tqEeGPWIvNqCqnbQ"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fUCaXJtqEeGPWIvNqCqnbQ" type="7018">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fUCaXZtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fUCaXptqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fUCaX5tqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUDBYJtqEeGPWIvNqCqnbQ"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fUDBYZtqEeGPWIvNqCqnbQ" type="7019">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fUDBYptqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fUDBY5tqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fUDBZJtqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUDBZZtqEeGPWIvNqCqnbQ"/>
- </children>
- <element xmi:type="uml:Class" href="model.uml#_fUAlIJtqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUBzQZtqEeGPWIvNqCqnbQ" x="448" y="281"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_fi6j0JtqEeGPWIvNqCqnbQ" type="2008" fontName="Segoe UI" lineColor="0">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fi6j0ptqEeGPWIvNqCqnbQ" source="ShadowFigure">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fi6j05tqEeGPWIvNqCqnbQ" key="ShadowFigure_Value" value="false"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fi6j1JtqEeGPWIvNqCqnbQ" source="displayNameLabelIcon">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fi6j1ZtqEeGPWIvNqCqnbQ" key="displayNameLabelIcon_value" value="false"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fi7K4JtqEeGPWIvNqCqnbQ" source="QualifiedName">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fi7K4ZtqEeGPWIvNqCqnbQ" key="QualifiedNameDepth" value="1000"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_fi7K4ptqEeGPWIvNqCqnbQ" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fi7K45tqEeGPWIvNqCqnbQ" type="7017">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fi7K5JtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fi7K5ZtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fi7K5ptqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fi7K55tqEeGPWIvNqCqnbQ"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fi7K6JtqEeGPWIvNqCqnbQ" type="7018">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fi7K6ZtqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fi7K6ptqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fi7K65tqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fi7K7JtqEeGPWIvNqCqnbQ"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fi7K7ZtqEeGPWIvNqCqnbQ" type="7019">
- <styles xmi:type="notation:TitleStyle" xmi:id="_fi7K7ptqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fi7K75tqEeGPWIvNqCqnbQ"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fi7K8JtqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fi7K8ZtqEeGPWIvNqCqnbQ"/>
- </children>
- <element xmi:type="uml:Class" href="model.uml#_fi4uoJtqEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fi6j0ZtqEeGPWIvNqCqnbQ" x="214" y="339"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_L8aaIJtxEeGPWIvNqCqnbQ" type="2012" fontName="Segoe UI" lineColor="0">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_L8aaIptxEeGPWIvNqCqnbQ" source="ShadowFigure">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_L8aaI5txEeGPWIvNqCqnbQ" key="ShadowFigure_Value" value="false"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_L8aaJJtxEeGPWIvNqCqnbQ" source="displayNameLabelIcon">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_L8aaJZtxEeGPWIvNqCqnbQ" key="displayNameLabelIcon_value" value="false"/>
- </eAnnotations>
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_L8aaJptxEeGPWIvNqCqnbQ" source="QualifiedName">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_L8aaJ5txEeGPWIvNqCqnbQ" key="QualifiedNameDepth" value="1000"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_L8aaKJtxEeGPWIvNqCqnbQ" type="5038"/>
- <element xmi:type="uml:Comment" href="model.uml#_L8Nl0JtxEeGPWIvNqCqnbQ"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L8aaIZtxEeGPWIvNqCqnbQ" x="613" y="111"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_ejo4IZtqEeGPWIvNqCqnbQ"/>
- <element xmi:type="uml:Model" href="model.uml#_ejoREJtqEeGPWIvNqCqnbQ"/>
-</notation:Diagram>
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration">
+ <notation:Diagram xmi:id="_ejo4IJtqEeGPWIvNqCqnbQ" type="PapyrusUMLClassDiagram" name="NewDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_fCkP0JtqEeGPWIvNqCqnbQ" type="2008" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fCkP0ptqEeGPWIvNqCqnbQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fCk24JtqEeGPWIvNqCqnbQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fCk24ZtqEeGPWIvNqCqnbQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fCk24ptqEeGPWIvNqCqnbQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fCk245tqEeGPWIvNqCqnbQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fCk25JtqEeGPWIvNqCqnbQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fCk25ZtqEeGPWIvNqCqnbQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fCk25ptqEeGPWIvNqCqnbQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fCk255tqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fCk26JtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fCk26ZtqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fCk26ptqEeGPWIvNqCqnbQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fCk265tqEeGPWIvNqCqnbQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fCk27JtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fCk27ZtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fCk27ptqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fCk275tqEeGPWIvNqCqnbQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fCk28JtqEeGPWIvNqCqnbQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fCk28ZtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fCk28ptqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fCk285tqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fCk29JtqEeGPWIvNqCqnbQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_fCjBsJtqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fCkP0ZtqEeGPWIvNqCqnbQ" x="190" y="142"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_fUBzQJtqEeGPWIvNqCqnbQ" type="2008" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fUCaUJtqEeGPWIvNqCqnbQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fUCaUZtqEeGPWIvNqCqnbQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fUCaUptqEeGPWIvNqCqnbQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fUCaU5tqEeGPWIvNqCqnbQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fUCaVJtqEeGPWIvNqCqnbQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fUCaVZtqEeGPWIvNqCqnbQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fUCaVptqEeGPWIvNqCqnbQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fUCaV5tqEeGPWIvNqCqnbQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fUCaWJtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fUCaWZtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fUCaWptqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUCaW5tqEeGPWIvNqCqnbQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fUCaXJtqEeGPWIvNqCqnbQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fUCaXZtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fUCaXptqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fUCaX5tqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUDBYJtqEeGPWIvNqCqnbQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fUDBYZtqEeGPWIvNqCqnbQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fUDBYptqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fUDBY5tqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fUDBZJtqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUDBZZtqEeGPWIvNqCqnbQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_fUAlIJtqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fUBzQZtqEeGPWIvNqCqnbQ" x="448" y="281"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_fi6j0JtqEeGPWIvNqCqnbQ" type="2008" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fi6j0ptqEeGPWIvNqCqnbQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fi6j05tqEeGPWIvNqCqnbQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fi6j1JtqEeGPWIvNqCqnbQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fi6j1ZtqEeGPWIvNqCqnbQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fi7K4JtqEeGPWIvNqCqnbQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fi7K4ZtqEeGPWIvNqCqnbQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_fi7K4ptqEeGPWIvNqCqnbQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fi7K45tqEeGPWIvNqCqnbQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fi7K5JtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fi7K5ZtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fi7K5ptqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fi7K55tqEeGPWIvNqCqnbQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fi7K6JtqEeGPWIvNqCqnbQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fi7K6ZtqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fi7K6ptqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fi7K65tqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fi7K7JtqEeGPWIvNqCqnbQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_fi7K7ZtqEeGPWIvNqCqnbQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_fi7K7ptqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_fi7K75tqEeGPWIvNqCqnbQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_fi7K8JtqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fi7K8ZtqEeGPWIvNqCqnbQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_fi4uoJtqEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fi6j0ZtqEeGPWIvNqCqnbQ" x="214" y="339"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_L8aaIJtxEeGPWIvNqCqnbQ" type="2012" fontName="Segoe UI" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_L8aaIptxEeGPWIvNqCqnbQ" source="ShadowFigure">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_L8aaI5txEeGPWIvNqCqnbQ" key="ShadowFigure_Value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_L8aaJJtxEeGPWIvNqCqnbQ" source="displayNameLabelIcon">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_L8aaJZtxEeGPWIvNqCqnbQ" key="displayNameLabelIcon_value" value="false"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_L8aaJptxEeGPWIvNqCqnbQ" source="QualifiedName">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_L8aaJ5txEeGPWIvNqCqnbQ" key="QualifiedNameDepth" value="1000"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_L8aaKJtxEeGPWIvNqCqnbQ" type="5038"/>
+ <element xmi:type="uml:Comment" href="model.uml#_L8Nl0JtxEeGPWIvNqCqnbQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_L8aaIZtxEeGPWIvNqCqnbQ" x="613" y="111"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_ejo4IZtqEeGPWIvNqCqnbQ"/>
+ <element xmi:type="uml:Model" href="model.uml#_ejoREJtqEeGPWIvNqCqnbQ"/>
+ </notation:Diagram>
+ <nattable:Table xmi:id="_kPCtgNzPEeOyiedyA56Opg" name="TableOfViews0" currentRowAxisProvider="_kPDUldzPEeOyiedyA56Opg" currentColumnAxisProvider="_kPDUkNzPEeOyiedyA56Opg">
+ <context xmi:type="uml:Model" href="model.uml#_ejoREJtqEeGPWIvNqCqnbQ"/>
+ <owner xmi:type="uml:Model" href="model.uml#_ejoREJtqEeGPWIvNqCqnbQ"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#//@viewpoints.0/@modelKinds.23"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_kPDUkNzPEeOyiedyA56Opg" description="Provides the features of the views" name="Papyrus Views feature provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_kPDUkdzPEeOyiedyA56Opg" element="nattable_editor_pages:/name">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_kPDUktzPEeOyiedyA56Opg" element="nattable_editor_pages:/context">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_kPDUk9zPEeOyiedyA56Opg" element="nattable_editor_pages:/isOpen">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_kPDUlNzPEeOyiedyA56Opg" element="nattable_editor_pages:/type">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.infra.nattable.views.config/resources/viewpage.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_kPDUldzPEeOyiedyA56Opg"/>
+ </nattable:Table>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.uml b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.uml
index 0d48b09..4943c3e 100644
--- a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.uml
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/resources/model.uml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_ejoREJtqEeGPWIvNqCqnbQ" name="Model">
- <ownedComment xmi:id="_L8Nl0JtxEeGPWIvNqCqnbQ">
- <body> </body>
- </ownedComment>
- <packageImport xmi:id="_ejoREZtqEeGPWIvNqCqnbQ">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Class" xmi:id="_fCjBsJtqEeGPWIvNqCqnbQ" name="Class1"/>
- <packagedElement xmi:type="uml:Class" xmi:id="_fUAlIJtqEeGPWIvNqCqnbQ" name="Class2"/>
- <packagedElement xmi:type="uml:Class" xmi:id="_fi4uoJtqEeGPWIvNqCqnbQ" name="Class3"/>
-</uml:Model>
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_ejoREJtqEeGPWIvNqCqnbQ" name="Model">
+ <ownedComment xmi:type="uml:Comment" xmi:id="_L8Nl0JtxEeGPWIvNqCqnbQ">
+ <body> </body>
+ </ownedComment>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_ejoREZtqEeGPWIvNqCqnbQ">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_fCjBsJtqEeGPWIvNqCqnbQ" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_fUAlIJtqEeGPWIvNqCqnbQ" name="Class2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_fi4uoJtqEeGPWIvNqCqnbQ" name="Class3"/>
+</uml:Model>
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/AllTests.java b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/AllTests.java
index daa31b7..087ca0a 100644
--- a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/AllTests.java
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/AllTests.java
@@ -18,14 +18,16 @@ package org.eclipse.papyrus.uml.modelexplorer.tests;
import org.eclipse.papyrus.uml.modelexplorer.tests.paste.CopyPasteModelExplorerTest;
import org.eclipse.papyrus.uml.modelexplorer.tests.paste.CutPasteModelExplorerTest;
+import org.eclipse.papyrus.uml.modelexplorer.tests.paste.DiagramCopyPasteModelExplorerTest;
+import org.eclipse.papyrus.uml.modelexplorer.tests.paste.TableCopyPasteModelExplorerTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses({
- DeleteModelExplorerTest.class, RenameHandlerTest.class, ModelExplorerViewTests.class, CutPasteModelExplorerTest.class, CopyPasteModelExplorerTest.class
-
+ DeleteModelExplorerTest.class, RenameHandlerTest.class, ModelExplorerViewTests.class, CutPasteModelExplorerTest.class, CopyPasteModelExplorerTest.class,
+ DiagramCopyPasteModelExplorerTest.class,TableCopyPasteModelExplorerTest.class
})
public class AllTests {
// JUnit for test suite
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/DeleteModelExplorerTest.java b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/DeleteModelExplorerTest.java
index 2692fe4..7a7ed46 100644
--- a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/DeleteModelExplorerTest.java
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/DeleteModelExplorerTest.java
@@ -60,7 +60,7 @@ public class DeleteModelExplorerTest extends AbstractEditorTest {
try {
initModel(PROJECT_NAME, MODEL_NAME, Activator.getDefault().getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (Exception e) {
- e.printStackTrace();
+ Assert.fail(e.getMessage());
}
}
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CopyPasteModelExplorerTest.java b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CopyPasteModelExplorerTest.java
index 794a95c..ccab894 100644
--- a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CopyPasteModelExplorerTest.java
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CopyPasteModelExplorerTest.java
@@ -60,7 +60,7 @@ public class CopyPasteModelExplorerTest extends AbstractEditorTest {
try {
initModel(PROJECT_NAME, MODEL_NAME, Activator.getDefault().getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (Exception e) {
- e.printStackTrace();
+ Assert.fail(e.getMessage());
}
}
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CutPasteModelExplorerTest.java b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CutPasteModelExplorerTest.java
index b81b085..6efefc6 100644
--- a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CutPasteModelExplorerTest.java
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/CutPasteModelExplorerTest.java
@@ -61,7 +61,7 @@ public class CutPasteModelExplorerTest extends AbstractEditorTest {
try {
initModel(PROJECT_NAME, MODEL_NAME, Activator.getDefault().getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
} catch (Exception e) {
- e.printStackTrace();
+ Assert.fail(e.getMessage());
}
}
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/DiagramCopyPasteModelExplorerTest.java b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/DiagramCopyPasteModelExplorerTest.java
new file mode 100644
index 0000000..0486ca5
--- /dev/null
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/DiagramCopyPasteModelExplorerTest.java
@@ -0,0 +1,140 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST 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:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 434133
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.modelexplorer.tests.paste;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.junit.utils.DiagramUtils;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
+import org.eclipse.papyrus.uml.modelexplorer.tests.Activator;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Model;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+
+/**
+ * Sample test for cut in model explorer
+ *
+ * @author bmaggi
+ */
+public class DiagramCopyPasteModelExplorerTest extends AbstractEditorTest {
+
+ public static final String COPY_COMMAND_ID = "org.eclipse.ui.edit.copy"; //$NON-NLS-1$
+
+ public static final String PASTE_COMMAND_ID = "org.eclipse.ui.edit.paste"; //$NON-NLS-1$
+
+ public static final String RESOURCES_PATH = "resources/"; //$NON-NLS-1$
+
+ public static final String MODEL_NAME = "model"; //$NON-NLS-1$
+
+ public static final String PROJECT_NAME = "copyPasteTest"; //$NON-NLS-1$
+
+ public final static String CLASS_DIAGRAM_NAME = "NewDiagram"; //$NON-NLS-1$
+
+ public final static String CLASS1_NAME = "Class1"; //$NON-NLS-1$
+
+ @Before
+ public void initModelForCutTest() {
+ try {
+ initModel(PROJECT_NAME, MODEL_NAME, Activator.getDefault().getBundle());
+ } catch (Exception e) {
+ Assert.fail(e.getMessage());
+ }
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return RESOURCES_PATH;
+ }
+
+
+ /**
+ * here the purpose is to test the creation of constraint on variable elements.
+ */
+ @Test
+ public void copyPasteDiagramTest() throws Exception {
+
+ //get the rootModel
+ Assert.assertNotNull("RootModel is null", getRootUMLModel()); //$NON-NLS-1$
+
+ Collection<Diagram> allNotationDiagram = DiagramUtils.getAllNotationDiagram(getModelSet(), CLASS_DIAGRAM_NAME);
+ Assert.assertNotNull("No diagrams for copy", allNotationDiagram); //$NON-NLS-1$
+ Assert.assertEquals("Diagram to copy is missing", 1, allNotationDiagram.size()); //$NON-NLS-1$
+
+
+ //get all semantic elment that will handled
+ Model model=(Model) getRootUMLModel();
+ org.eclipse.uml2.uml.Class class1=(org.eclipse.uml2.uml.Class) model.getPackagedElement(CLASS1_NAME);
+ Diagram diagram1=(Diagram)getPageManager().allPages().get(0);
+ Assert.assertEquals("Wrong diagram selected", CLASS_DIAGRAM_NAME, diagram1.getName()); //$NON-NLS-1$
+
+ IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ ISelectionService selectionService = activeWorkbenchWindow.getSelectionService();
+ modelExplorerView=getModelExplorerView();
+ modelExplorerView.setFocus();
+ ArrayList<Object>elements= new ArrayList<Object>();
+ elements.add(getRootUMLModel());
+ modelExplorerView.revealSemanticElement( elements);
+
+
+ //getItem for model
+ Object modelTreeObject=((IStructuredSelection)selectionService.getSelection()).getFirstElement();
+ Assert.assertNotNull("Model TreeElement is null", modelTreeObject); //$NON-NLS-1$
+
+ // FIXME : this is required otherwise diagram1TreeObject is empty (something wrong in the revealSemantic on Diagrams)
+ //get Item for class1
+ elements.clear();
+ elements.add(class1);
+ modelExplorerView.revealSemanticElement( elements);
+ Object class1TreeObject=((IStructuredSelection)selectionService.getSelection()).getFirstElement();
+ Assert.assertNotNull("Class1 TreeElement is null", class1TreeObject); //$NON-NLS-1$
+
+
+ //get Item for diagram1
+ elements.clear();
+ elements.add(diagram1);
+ modelExplorerView.revealSemanticElement( elements);
+ Object diagram1TreeObject=((IStructuredSelection)selectionService.getSelection()).getFirstElement();
+ Assert.assertNotNull("diagram1 TreeElement is null", diagram1TreeObject); //$NON-NLS-1$
+
+ IHandler copyHandler = HandlerUtils.getActiveHandlerFor(COPY_COMMAND_ID);
+ Assert.assertTrue("Copy not available", copyHandler.isEnabled()); //$NON-NLS-1$
+ copyHandler.execute(new ExecutionEvent());
+
+ // select root
+ elements.clear();
+ elements.add(getRootUMLModel());
+ modelExplorerView.revealSemanticElement(elements);
+
+ // paste
+ IHandler pasteHandler = HandlerUtils.getActiveHandlerFor(PASTE_COMMAND_ID);
+ Assert.assertTrue("Paste not available", pasteHandler.isEnabled()); //$NON-NLS-1$
+ pasteHandler.execute(new ExecutionEvent());
+
+ allNotationDiagram = DiagramUtils.getAllNotationDiagram(getModelSet(), CLASS_DIAGRAM_NAME);
+ Assert.assertEquals("Duplicate Diagram is missing", 2, allNotationDiagram.size());
+ }
+
+}
diff --git a/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/TableCopyPasteModelExplorerTest.java b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/TableCopyPasteModelExplorerTest.java
new file mode 100644
index 0000000..8c30def
--- /dev/null
+++ b/tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests/src/org/eclipse/papyrus/uml/modelexplorer/tests/paste/TableCopyPasteModelExplorerTest.java
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST 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:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.modelexplorer.tests.paste;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.junit.utils.HandlerUtils;
+import org.eclipse.papyrus.junit.utils.TableUtils;
+import org.eclipse.papyrus.junit.utils.tests.AbstractEditorTest;
+import org.eclipse.papyrus.uml.modelexplorer.tests.Activator;
+import org.eclipse.ui.ISelectionService;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Model;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+
+
+/**
+ * Sample test for copy of table in model explorer
+ *
+ * @author bmaggi
+ */
+public class TableCopyPasteModelExplorerTest extends AbstractEditorTest {
+
+ public static final String COPY_COMMAND_ID = "org.eclipse.ui.edit.copy"; //$NON-NLS-1$
+
+ public static final String PASTE_COMMAND_ID = "org.eclipse.ui.edit.paste"; //$NON-NLS-1$
+
+ public static final String RESOURCES_PATH = "resources/"; //$NON-NLS-1$
+
+ public static final String MODEL_NAME = "model"; //$NON-NLS-1$
+
+ public static final String PROJECT_NAME = "copyPasteTest"; //$NON-NLS-1$
+
+ public final static String VIEW_TABLE_NAME = "TableOfViews0"; //$NON-NLS-1$
+
+ public final static String CLASS1_NAME = "Class1"; //$NON-NLS-1$
+
+ @Before
+ public void initModelForCutTest() {
+ try {
+ initModel(PROJECT_NAME, MODEL_NAME, Activator.getDefault().getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (Exception e) {
+ Assert.fail(e.getMessage());
+ }
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return RESOURCES_PATH;
+ }
+
+
+ /**
+ * here the purpose is to test the creation of constraint on variable elements.
+ */
+ @Test
+ @Ignore // TODO to activate with implementation of table strategy
+ public void copyPasteTableTest() throws Exception {
+
+ //get the rootModel
+ Assert.assertNotNull("RootModel is null", getRootUMLModel()); //$NON-NLS-1$
+
+ Collection<Table> allNotationTable = TableUtils.getAllNotationTable(getModelSet(), VIEW_TABLE_NAME);
+ Assert.assertNotNull("No Tables for copy", allNotationTable); //$NON-NLS-1$
+ Assert.assertEquals("Table to copy is missing", 1, allNotationTable.size()); //$NON-NLS-1$
+
+
+ //get all semantic elment that will handled
+ Model model = (Model)getRootUMLModel();
+ org.eclipse.uml2.uml.Class class1 = (org.eclipse.uml2.uml.Class)model.getPackagedElement(CLASS1_NAME);
+ Table notationFirstTable = TableUtils.getNotationFirstTable(getModelSet(), VIEW_TABLE_NAME);
+ Assert.assertEquals("Wrong Table selected", VIEW_TABLE_NAME, notationFirstTable.getName()); //$NON-NLS-1$
+
+ IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ ISelectionService selectionService = activeWorkbenchWindow.getSelectionService();
+ modelExplorerView = getModelExplorerView();
+ modelExplorerView.setFocus();
+ ArrayList<Object> elements = new ArrayList<Object>();
+ elements.add(getRootUMLModel());
+ modelExplorerView.revealSemanticElement(elements);
+
+
+ //getItem for model
+ Object modelTreeObject = ((IStructuredSelection)selectionService.getSelection()).getFirstElement();
+ Assert.assertNotNull("Model TreeElement is null", modelTreeObject); //$NON-NLS-1$
+
+ // FIXME : this is required otherwise Table1TreeObject is empty (something wrong in the revealSemantic on Tables)
+ //get Item for class1
+ elements.clear();
+ elements.add(class1);
+ modelExplorerView.revealSemanticElement(elements);
+ Object class1TreeObject = ((IStructuredSelection)selectionService.getSelection()).getFirstElement();
+ Assert.assertNotNull("Class1 TreeElement is null", class1TreeObject); //$NON-NLS-1$
+
+
+ //get Item for Table1
+ elements.clear();
+ elements.add(notationFirstTable);
+ modelExplorerView.revealSemanticElement(elements);
+ Object tableTreeObject = ((IStructuredSelection)selectionService.getSelection()).getFirstElement();
+ Assert.assertNotNull("TableOfViews0 TreeElement is null", tableTreeObject); //$NON-NLS-1$
+
+ IHandler copyHandler = HandlerUtils.getActiveHandlerFor(COPY_COMMAND_ID);
+ Assert.assertTrue("Copy not available", copyHandler.isEnabled()); //$NON-NLS-1$
+ copyHandler.execute(new ExecutionEvent());
+
+ // select root
+ elements.clear();
+ elements.add(getRootUMLModel());
+ modelExplorerView.revealSemanticElement(elements);
+
+ // paste
+ IHandler pasteHandler = HandlerUtils.getActiveHandlerFor(PASTE_COMMAND_ID);
+ Assert.assertTrue("Paste not available", pasteHandler.isEnabled()); //$NON-NLS-1$
+ pasteHandler.execute(new ExecutionEvent());
+
+ allNotationTable = TableUtils.getAllNotationTable(getModelSet(), VIEW_TABLE_NAME);
+ Assert.assertEquals("Duplicate Table is missing", 2, allNotationTable.size());
+ }
+
+}