Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorvlorenzo2013-06-21 08:12:59 +0000
committervlorenzo2013-06-21 08:12:59 +0000
commit8f78ea12377f1c2d8f2364d4a141e34bb93f013c (patch)
treec39101fb359377b7a0f77cc56d771598042387d4 /tests
parent6a7c46135c4446611b8c5df920ac14b9008491af (diff)
downloadorg.eclipse.papyrus-8f78ea12377f1c2d8f2364d4a141e34bb93f013c.tar.gz
org.eclipse.papyrus-8f78ea12377f1c2d8f2364d4a141e34bb93f013c.tar.xz
org.eclipse.papyrus-8f78ea12377f1c2d8f2364d4a141e34bb93f013c.zip
411338: [Table 2] Papyrus must provides Tests for the Requirement Table
https://bugs.eclipse.org/bugs/show_bug.cgi?id=411338
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.classpath7
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.project28
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF31
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/OSGI-INF/l10n/bundle.properties3
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/SysMLNatTableRequirementTests.launch47
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/about.html28
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/build.properties9
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/plugin.pdoc4
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.di13
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.notation18
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.uml77
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.di9
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.notation2
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.uml81
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.di9
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.notation2
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.uml6
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/Activator.java66
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java31
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java68
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java333
-rw-r--r--tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java120
23 files changed, 999 insertions, 0 deletions
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.classpath b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.classpath
new file mode 100644
index 00000000000..8a8f1668cdc
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.project b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.project
new file mode 100644
index 00000000000..4ebbc80cec7
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.sysml.nattable.requirement.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..f287d53cf45
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..8a5de3b86b0
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.sysml.nattable.requirement.tests
+Bundle-Version: 0.10.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
+ org.junit,
+ org.eclipse.uml2.uml;bundle-version="4.1.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="0.10.0",
+ org.eclipse.papyrus.views.modelexplorer;bundle-version="0.10.0",
+ org.eclipse.emf.transaction,
+ org.eclipse.papyrus.infra.nattable.common;bundle-version="0.10.0",
+ org.eclipse.papyrus.sysml.nattable.requirement;bundle-version="0.10.0",
+ org.eclipse.papyrus.sysml.nattable.requirement.config;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.nattable;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="0.10.0",
+ org.eclipse.gmf.runtime.emf.core;bundle-version="1.7.0",
+ org.eclipse.gmf.runtime.emf.type.core,
+ org.eclipse.papyrus.sysml.service.types;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.0",
+ org.eclipse.papyrus.editor.integration.tests;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/OSGI-INF/l10n/bundle.properties b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..1d31e04c7cd
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.sysml.nattable.requirement.tests
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = SysML NatTable Requirements Tests (Incubation) \ No newline at end of file
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/SysMLNatTableRequirementTests.launch b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/SysMLNatTableRequirementTests.launch
new file mode 100644
index 00000000000..c8ea0bf1f1c
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/SysMLNatTableRequirementTests.launch
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<listAttribute key="classFilters">
+<listEntry value="ClassFilter(include, org.eclipse.papyrus.infra.emf.*)"/>
+<listEntry value="ClassFilter(include, org.eclipse.papyrus.uml.tools.*)"/>
+<listEntry value="ClassFilter(include, *.tests.*)"/>
+</listAttribute>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.sysml.nattable.requirement.tests.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.sysml.nattable.requirement.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms120m -Xmx512m -XX:PermSize=256M -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/about.html b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/build.properties b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/build.properties
new file mode 100644
index 00000000000..d875e66cb24
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ OSGI-INF/,\
+ about.html,\
+ plugin.pdoc,\
+ resources/,\
+ SysMLNatTableRequirementTests.launch
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/plugin.pdoc b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/plugin.pdoc
new file mode 100644
index 00000000000..eef11c221a6
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin tests the plugin org.eclipse.papyrus.sysml.nattable.requirement">
+ <referent firstName="vincent" lastName="lorenzo" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.di b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.di
new file mode 100644
index 00000000000..27d22a3afed
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.di
@@ -0,0 +1,13 @@
+<?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="openTest.notation#_WQOhgNm-EeKL79b9rs5dSQ"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder"/>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.notation b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.notation
new file mode 100644
index 00000000000..9b2a4e94da4
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.notation
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattable:Table xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:uml="http://www.eclipse.org/uml2/4.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" xmi:id="_WQOhgNm-EeKL79b9rs5dSQ" name="RequirementTable0" currentRowAxisProvider="_WQOhhdm-EeKL79b9rs5dSQ" currentColumnAxisProvider="_WQOhgdm-EeKL79b9rs5dSQ">
+ <context xmi:type="uml:Model" href="openTest.uml#_SsmpwNm-EeKL79b9rs5dSQ"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_WQOhgdm-EeKL79b9rs5dSQ" description="Provides the columns of the tables with a default configuration" name="Requirements Feature Columns Provider">
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_WQOhgtm-EeKL79b9rs5dSQ" element="property_of_stereotype:/SysML::Requirements::Requirement::id">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_WQOhg9m-EeKL79b9rs5dSQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/4.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:FeatureIdAxis" xmi:id="_WQOhhNm-EeKL79b9rs5dSQ" element="property_of_stereotype:/SysML::Requirements::Requirement::text">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.sysml.nattable.requirement.config/configs/requirement.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.1"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_WQOhhdm-EeKL79b9rs5dSQ" description="Provides the requirements directly owned by the context of the table" name="Requirement Axis Provider" disconnectSlave="true"/>
+</nattable:Table>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.uml b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.uml
new file mode 100644
index 00000000000..5313746433c
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/openTest.uml
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_SsmpwNm-EeKL79b9rs5dSQ" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_UZqBcNm-EeKL79b9rs5dSQ" name="Requirement1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_U-P8QNm-EeKL79b9rs5dSQ" name="Requirement2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_VlrIoNm-EeKL79b9rs5dSQ" name="Requirement3"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_St8GgNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_St8Ggdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2HyINm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2HyIdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjINm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjIdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjItm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjI9m-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjJNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjJdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjJtm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjJ9m-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjKNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjKdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjKtm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjK9m-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjLNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjLdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjLtm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjL9m-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_S2RjMNm-EeKL79b9rs5dSQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_S2RjMdm-EeKL79b9rs5dSQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_UZ88YNm-EeKL79b9rs5dSQ" base_Class="_UZqBcNm-EeKL79b9rs5dSQ"/>
+ <Requirements:Requirement xmi:id="_U-ZtQNm-EeKL79b9rs5dSQ" base_Class="_U-P8QNm-EeKL79b9rs5dSQ"/>
+ <Requirements:Requirement xmi:id="_Vl05oNm-EeKL79b9rs5dSQ" base_Class="_VlrIoNm-EeKL79b9rs5dSQ"/>
+</xmi:XMI>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.di b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.di
new file mode 100644
index 00000000000..279b08e24e1
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.di
@@ -0,0 +1,9 @@
+<?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/>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder"/>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.notation b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.notation
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.uml b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.uml
new file mode 100644
index 00000000000..d2b15453ff3
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/sysmlModel.uml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Requirements="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Requirements http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements">
+ <uml:Model xmi:id="_NydJMNjoEeKw9PDRLmC3Lg" name="SysMLmodel">
+ <packagedElement xmi:type="uml:Class" xmi:id="_pFCy0Nj3EeKw9PDRLmC3Lg" name="Class1"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_4P-YwNmjEeKw9PDRLmC3Lg" name="Requirement1">
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_EKEE0NmnEeKw9PDRLmC3Lg" name="NestedRequirement1"/>
+ <nestedClassifier xmi:type="uml:Class" xmi:id="_E0dssNmnEeKw9PDRLmC3Lg" name="NestedRequirement2"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_DY0OENmnEeKw9PDRLmC3Lg" name="Requirement2"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_NzMwENjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_NzMwEdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_TZ_nULU5EduiKqCzJMWbGw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdINjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdIdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//modelelements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_Gx8MgLX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdItjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdI9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdJNjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdJdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//portandflows"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_rpx28LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdJtjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdJ9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//constraints"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_5WYJ0LX7EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdKNjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdKdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//activities"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_C2zXMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdKtjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdK9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//allocations"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_NxdG4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdLNjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdLdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_OOJC4LX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdLtjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdL9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//interactions"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_meOioLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdMNjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdMdjoEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//statemachines"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_nAF5kLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_N5AdMtjoEeKw9PDRLmC3Lg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_N5AdM9joEeKw9PDRLmC3Lg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//usecases"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_neZmMLX8EduFmqQsrNB9lw"/>
+ </profileApplication>
+ </uml:Model>
+ <Requirements:Requirement xmi:id="_4QkOoNmjEeKw9PDRLmC3Lg" base_Class="_4P-YwNmjEeKw9PDRLmC3Lg"/>
+ <Requirements:Requirement xmi:id="_DY9_ENmnEeKw9PDRLmC3Lg" base_Class="_DY0OENmnEeKw9PDRLmC3Lg"/>
+ <Requirements:Requirement xmi:id="_EKNOwNmnEeKw9PDRLmC3Lg" base_Class="_EKEE0NmnEeKw9PDRLmC3Lg"/>
+ <Requirements:Requirement xmi:id="_E0m2oNmnEeKw9PDRLmC3Lg" base_Class="_E0dssNmnEeKw9PDRLmC3Lg"/>
+</xmi:XMI>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.di b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.di
new file mode 100644
index 00000000000..279b08e24e1
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.di
@@ -0,0 +1,9 @@
+<?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/>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder"/>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.notation b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.notation
new file mode 100644
index 00000000000..8634d4c00e0
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.uml b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.uml
new file mode 100644
index 00000000000..9bd7d004820
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/resources/umlmodel.uml
@@ -0,0 +1,6 @@
+<?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="_Qv2HpNjoEeKw9PDRLmC3Lg" name="Model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_Qv2HpdjoEeKw9PDRLmC3Lg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+</uml:Model>
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/Activator.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/Activator.java
new file mode 100644
index 00000000000..070f2db1268
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/Activator.java
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.sysml.nattable.requirement.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java
new file mode 100644
index 00000000000..0bb39ba2979
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/AllTests.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * 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:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+@RunWith(Suite.class)
+@SuiteClasses({ TableCreationInSysMLModelTest.class, OpenTableTest.class, TableCreationInUMLModel.class
+
+})
+public class AllTests {
+
+ /** The type of the requirement table */
+ public static final String REQUIREMENT_TABLE_ID = "PapyrusSysMLRequirementTable"; //$NON-NLS-1$
+
+ /** the creation command tested for the requirement table */
+ public static final String COMMAND_ID = "org.eclipse.papyrus.sysml.nattable.requirement.create.withoutdialog.command"; //$NON-NLS-1$
+}
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java
new file mode 100644
index 00000000000..ec02680fea7
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/OpenTableTest.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.commands.OpenDiagramCommand;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.editor.integration.tests.tests.AbstractEditorIntegrationTest;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.sasheditor.contentprovider.IPageManager;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.ui.IEditorPart;
+import org.junit.Assert;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+
+public class OpenTableTest extends AbstractEditorIntegrationTest {
+
+ /**
+ * This test allows to be sure that we doesn't break existing table model
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testOpenExistingTable() throws Exception {
+ initModel("requirementtableTest", "openTest", getBundle()); //$NON-NLS-1$ //$NON-NLS-2$
+ IPageManager pageManager = editor.getServicesRegistry().getService(IPageManager.class);
+ Assert.assertEquals(1, pageManager.allPages().size());
+ IEditorPart tableEditor = editor.getActiveEditor();
+ Assert.assertNull(tableEditor);
+ Resource notationResource = NotationUtils.getNotationModel(editor.getServicesRegistry().getService(ModelSet.class)).getResource();
+ Table requirementTable = (Table)notationResource.getContents().get(0);
+ TransactionalEditingDomain editingDomain = editor.getServicesRegistry().getService(TransactionalEditingDomain.class);
+ editingDomain.getCommandStack().execute(new GMFtoEMFCommandWrapper(new OpenDiagramCommand(editingDomain, requirementTable)));
+ tableEditor = editor.getActiveEditor();
+ Assert.assertTrue(tableEditor instanceof NatTableEditor);
+ INattableModelManager manager = (INattableModelManager)tableEditor.getAdapter(INattableModelManager.class);
+ Assert.assertNotNull(manager);
+ Assert.assertEquals(AllTests.REQUIREMENT_TABLE_ID, manager.getTable().getTableConfiguration().getType());
+
+ }
+
+ @Override
+ protected String getSourcePath() {
+ return "/resources/"; //$NON-NLS-1$
+ }
+
+ @Override
+ protected Bundle getBundle() {
+ return org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator.getDefault().getBundle();
+ }
+}
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java
new file mode 100644
index 00000000000..cc1d3cb7f39
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInSysMLModelTest.java
@@ -0,0 +1,333 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.nattable.common.editor.NatTableEditor;
+import org.eclipse.papyrus.infra.nattable.manager.axis.IAxisManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.NattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.NamedElement;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
+public class TableCreationInSysMLModelTest {
+
+ private static Class class_;
+
+ private static Class requirement1;
+
+ private static Class requirement2;
+
+ private static Class requirement3;
+
+ private static Class nestedRequirement1;
+
+ private static Class nestedRequirement2;
+
+ private static Class nestedRequirement3;
+
+ private static final String MODEL_PATH = "/resources/sysmlModel"; //$NON-NLS-1$
+
+ private static final String SOURCE_PATH = "/resources/"; //$NON-NLS-1$
+
+ private static final String FILE_ROOT_NAME = "sysmlModel"; //$NON-NLS-1$
+
+ private static final String PROJECT_NAME = "test"; //$NON-NLS-1$
+
+ private static IMultiDiagramEditor papyrusEditor;
+
+ private static final String BUNDLE_ID = Activator.getDefault().getBundle().getSymbolicName();
+
+ protected static Model rootModel;
+
+ protected static ModelExplorerView view;
+
+ @BeforeClass
+ public static void init() {
+ try {
+
+ initTests(Activator.getDefault().getBundle(), PROJECT_NAME, MODEL_PATH);
+
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ } catch (BundleException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ public static void initTests(final Bundle bundle, final String projectName, final String papyrusModelPath) throws CoreException, IOException, BundleException {
+ ProjectUtils.removeAllProjectFromTheWorkspace();
+ IProject testProject = ProjectUtils.createProject(projectName);
+ final IFile file = PapyrusProjectUtils.copyPapyrusModel(testProject, bundle, SOURCE_PATH, FILE_ROOT_NAME);
+ RunnableWithResult<?> runnableWithResult = new RunnableWithResult.Impl<Object>() {
+
+ @Override
+ public void run() {
+ try {
+ papyrusEditor = EditorUtils.openPapyrusEditor(file);
+ } catch (PartInitException e) {
+ setStatus(new Status(IStatus.ERROR, bundle.getSymbolicName(), e.getMessage()));
+ }
+ try {
+ TableCreationInSysMLModelTest.view = ModelExplorerUtils.openModelExplorerView();
+ } catch (PartInitException e) {
+ setStatus(new Status(IStatus.ERROR, bundle.getSymbolicName(), e.getMessage()));
+ }
+ EObject root = ModelExplorerUtils.getRootInModelExplorer(TableCreationInSysMLModelTest.view);
+ TableCreationInSysMLModelTest.rootModel = (Model)root;
+ class_ = (Class)TableCreationInSysMLModelTest.rootModel.getMember("Class1"); //$NON-NLS-1$
+ requirement1 = (Class)TableCreationInSysMLModelTest.rootModel.getMember("Requirement1"); //$NON-NLS-1$
+ requirement2 = (Class)TableCreationInSysMLModelTest.rootModel.getMember("Requirement2"); //$NON-NLS-1$
+ if(requirement1 != null) {
+ nestedRequirement1 = (Class)requirement1.getMember("NestedRequirement1"); //$NON-NLS-1$
+ nestedRequirement2 = (Class)requirement1.getMember("NestedRequirement2"); //$NON-NLS-1$
+ setStatus(Status.OK_STATUS);
+
+ } else {
+ setStatus(new Status(IStatus.ERROR, bundle.getSymbolicName(), "Requirement1 not found")); //$NON-NLS-1$
+
+ }
+
+ }
+
+ };
+ Display.getDefault().syncExec(runnableWithResult);
+ try {
+ Platform.getBundle("org.eclipse.papyrus.infra.nattable.common").start(); //$NON-NLS-1$
+ Platform.getBundle("org.eclipse.papyrus.sysml.nattable.requirement").start(); //$NON-NLS-1$
+ Platform.getBundle("org.eclipse.papyrus.sysml.nattable.requirement.config").start(); //$NON-NLS-1$
+ } catch (BundleException e) {
+ throw e;
+ }
+ Assert.assertEquals(runnableWithResult.getStatus().getMessage(), IStatus.OK, runnableWithResult.getStatus().getSeverity());
+ Assert.assertNotNull(class_);
+ Assert.assertNotNull(requirement1);
+ Assert.assertNotNull(requirement2);
+ Assert.assertNotNull(TableCreationInSysMLModelTest.rootModel);
+
+
+
+ }
+
+ @Test
+ public void testCreationHandlerStatusOnRootModel() {
+ ModelExplorerUtils.testHandlerStatusInModelExplorer(TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, TableCreationInSysMLModelTest.rootModel, true);
+ }
+
+ @Test
+ public void testCreationHandlerStatusOnRequirement() {
+ ModelExplorerUtils.testHandlerStatusInModelExplorer(TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, requirement1, true);
+ }
+
+ @Test
+ public void testCreationHandlerStatusOnClass() {
+ ModelExplorerUtils.testHandlerStatusInModelExplorer(TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, class_, false);
+ }
+
+ @Test
+ public void testCreationAndDestructionOnRootModel() {
+ Object result = ModelExplorerUtils.executeCreateNestedEditorHandlerInModelExplorer(papyrusEditor, TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, TableCreationInSysMLModelTest.rootModel, BUNDLE_ID);
+ Assert.assertTrue(result instanceof NatTableEditor);
+ NatTableEditor editor = (NatTableEditor)result;
+ NattableModelManager manager = (NattableModelManager)editor.getAdapter(INattableModelManager.class);
+ Assert.assertNotNull(manager);
+ Table table = manager.getTable();
+ Assert.assertEquals(AllTests.REQUIREMENT_TABLE_ID, table.getTableConfiguration().getType());
+
+ IAxisManager rowAxisManager = manager.getRowAxisManager();
+ Collection<Object> managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(2, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(requirement1));
+ Assert.assertTrue(managedAxis.contains(requirement2));
+
+
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement2));
+
+ final TransactionalEditingDomain domain = (TransactionalEditingDomain)papyrusEditor.getAdapter(TransactionalEditingDomain.class);
+ Assert.assertNotNull(domain);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(TableCreationInSysMLModelTest.rootModel);
+ Assert.assertNotNull(provider);
+ CreateElementRequest request = new CreateElementRequest(domain, TableCreationInSysMLModelTest.rootModel, SysMLElementTypes.REQUIREMENT);
+ final ICommand creationCommand = provider.getEditCommand(request);
+ Assert.assertNotNull(creationCommand);
+ Assert.assertTrue(creationCommand.canExecute());
+ RunnableWithResult<Object> runnable = new RunnableWithResult.Impl<Object>() {//in a runnable to be sure that the table will be refreshed
+
+ @Override
+ public void run() {
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(creationCommand));
+ NamedElement requirement = TableCreationInSysMLModelTest.rootModel.getMember("Requirement3"); //$NON-NLS-1$
+ Assert.assertNotNull(requirement);
+ requirement3 = (Class)requirement;
+ }
+ };
+
+ Display.getDefault().syncExec(runnable);
+ managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(3, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(requirement1));
+ Assert.assertTrue(managedAxis.contains(requirement2));
+ Assert.assertTrue(managedAxis.contains(requirement3));
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement2));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement3));
+
+ DestroyElementRequest destroyRequest = new DestroyElementRequest(domain, requirement3, false);
+ provider = ElementEditServiceUtils.getCommandProvider(requirement3);
+ final ICommand destroyCommand = provider.getEditCommand(destroyRequest);
+ Assert.assertNotNull(destroyCommand);
+ Assert.assertTrue(destroyCommand.canExecute());
+
+ runnable = new RunnableWithResult.Impl<Object>() {//in a runnable to be sure that the table will be refreshed
+
+ @Override
+ public void run() {
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(destroyCommand));
+ NamedElement requirement = TableCreationInSysMLModelTest.rootModel.getMember("Requirement3"); //$NON-NLS-1$
+ Assert.assertNull(requirement);
+ requirement3 = (Class)requirement;
+ }
+ };
+
+ Display.getDefault().syncExec(runnable);
+ managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(2, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(requirement1));
+ Assert.assertTrue(managedAxis.contains(requirement2));
+
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(requirement2));
+ }
+
+ @Test
+ public void testCreationAndDestructionOnRequirement() {
+ Object result = ModelExplorerUtils.executeCreateNestedEditorHandlerInModelExplorer(papyrusEditor, TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, TableCreationInSysMLModelTest.requirement1, BUNDLE_ID);
+ Assert.assertTrue(result instanceof NatTableEditor);
+ NatTableEditor editor = (NatTableEditor)result;
+ NattableModelManager manager = (NattableModelManager)editor.getAdapter(INattableModelManager.class);
+ Assert.assertNotNull(manager);
+ Table table = manager.getTable();
+ Assert.assertEquals(AllTests.REQUIREMENT_TABLE_ID, table.getTableConfiguration().getType());
+
+ IAxisManager rowAxisManager = manager.getRowAxisManager();
+ Collection<Object> managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(2, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(nestedRequirement1));
+ Assert.assertTrue(managedAxis.contains(nestedRequirement2));
+
+
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement2));
+
+ final TransactionalEditingDomain domain = (TransactionalEditingDomain)papyrusEditor.getAdapter(TransactionalEditingDomain.class);
+ Assert.assertNotNull(domain);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(TableCreationInSysMLModelTest.requirement1);
+ Assert.assertNotNull(provider);
+ CreateElementRequest request = new CreateElementRequest(domain, TableCreationInSysMLModelTest.requirement1, SysMLElementTypes.REQUIREMENT);
+ final ICommand creationCommand = provider.getEditCommand(request);
+ Assert.assertNotNull(creationCommand);
+ Assert.assertTrue(creationCommand.canExecute());
+ RunnableWithResult<Object> runnable = new RunnableWithResult.Impl<Object>() {//in a runnable to be sure that the table will be refreshed
+
+ @Override
+ public void run() {
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(creationCommand));
+ NamedElement requirement = TableCreationInSysMLModelTest.rootModel.getMember("Requirement1"); //$NON-NLS-1$
+ Assert.assertNotNull(requirement);
+ nestedRequirement3 = (Class)requirement;
+ }
+ };
+
+ Display.getDefault().syncExec(runnable);
+ managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(3, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(nestedRequirement1));
+ Assert.assertTrue(managedAxis.contains(nestedRequirement2));
+ Assert.assertTrue(managedAxis.contains(nestedRequirement3));
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement2));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement3));
+
+ DestroyElementRequest destroyRequest = new DestroyElementRequest(domain, nestedRequirement3, false);
+ provider = ElementEditServiceUtils.getCommandProvider(nestedRequirement3);
+ final ICommand destroyCommand = provider.getEditCommand(destroyRequest);
+ Assert.assertNotNull(destroyCommand);
+ Assert.assertTrue(destroyCommand.canExecute());
+
+ runnable = new RunnableWithResult.Impl<Object>() {//in a runnable to be sure that the table will be refreshed
+
+ @Override
+ public void run() {
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(destroyCommand));
+ NamedElement requirement = TableCreationInSysMLModelTest.rootModel.getMember("Requirement1"); //$NON-NLS-1$
+ Assert.assertNull(requirement);
+ nestedRequirement3 = (Class)requirement;
+ }
+ };
+
+ Display.getDefault().syncExec(runnable);
+ managedAxis = rowAxisManager.getAllManagedAxis();
+ Assert.assertEquals(2, managedAxis.size());
+ Assert.assertTrue(managedAxis.contains(nestedRequirement1));
+ Assert.assertTrue(managedAxis.contains(nestedRequirement2));
+
+ Assert.assertEquals(managedAxis.size(), rowAxisManager.getTableManager().getRowElementsList().size());
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement1));
+ Assert.assertTrue(rowAxisManager.getTableManager().getRowElementsList().contains(nestedRequirement2));
+ }
+
+ //FIXME : test syncrho sur requirements fils!
+}
diff --git a/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java
new file mode 100644
index 00000000000..2301aa65485
--- /dev/null
+++ b/tests/junit/extraplugins/table/org.eclipse.papyrus.sysml.nattable.requirement.tests/src/org/eclipse/papyrus/sysml/nattable/requirement/tests/tests/TableCreationInUMLModel.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.sysml.nattable.requirement.tests.tests;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.junit.utils.EditorUtils;
+import org.eclipse.papyrus.junit.utils.ModelExplorerUtils;
+import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
+import org.eclipse.papyrus.junit.utils.ProjectUtils;
+import org.eclipse.papyrus.sysml.nattable.requirement.tests.Activator;
+import org.eclipse.papyrus.views.modelexplorer.ModelExplorerView;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.uml2.uml.Model;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+
+
+public class TableCreationInUMLModel {
+
+ private static final String MODEL_PATH = "/resources/umlmodel"; //$NON-NLS-1$
+
+ private static final String SOURCE_PATH = "/resources/"; //$NON-NLS-1$
+
+ private static final String FILE_ROOT_NAME = "umlmodel"; //$NON-NLS-1$
+
+ private static final String PROJECT_NAME = "testCreationWithNoProfile"; //$NON-NLS-1$
+
+ private static IMultiDiagramEditor papyrusEditor;
+
+ private static final String BUNDLE_ID = Activator.getDefault().getBundle().getSymbolicName();
+
+ protected static Model rootModel;
+
+ protected static ModelExplorerView view;
+
+ @BeforeClass
+ public static void init() {
+ try {
+
+ initTests(Activator.getDefault().getBundle(), PROJECT_NAME, MODEL_PATH);
+
+ } catch (CoreException e) {
+ Activator.log.error(e);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ } catch (BundleException e) {
+ Activator.log.error(e);
+ }
+ }
+
+ public static void initTests(final Bundle bundle, final String projectName, final String papyrusModelPath) throws CoreException, IOException, BundleException {
+ ProjectUtils.removeAllProjectFromTheWorkspace();
+ IProject testProject = ProjectUtils.createProject(projectName);
+ final IFile file = PapyrusProjectUtils.copyPapyrusModel(testProject, bundle, SOURCE_PATH, FILE_ROOT_NAME);
+ RunnableWithResult<?> runnableWithResult = new RunnableWithResult.Impl<Object>() {
+
+ @Override
+ public void run() {
+ try {
+ papyrusEditor = EditorUtils.openPapyrusEditor(file);
+ } catch (PartInitException e) {
+ setStatus(new Status(IStatus.ERROR, bundle.getSymbolicName(), e.getMessage()));
+ }
+ try {
+ TableCreationInSysMLModelTest.view = ModelExplorerUtils.openModelExplorerView();
+ } catch (PartInitException e) {
+ setStatus(new Status(IStatus.ERROR, bundle.getSymbolicName(), e.getMessage()));
+ }
+ EObject root = ModelExplorerUtils.getRootInModelExplorer(TableCreationInSysMLModelTest.view);
+ TableCreationInSysMLModelTest.rootModel = (Model)root;
+ // we look for the testedCommand
+ setStatus(Status.OK_STATUS);
+ }
+
+ };
+ Display.getDefault().syncExec(runnableWithResult);
+ try {
+ Platform.getBundle("org.eclipse.papyrus.infra.nattable.common").start(); //$NON-NLS-1$
+ Platform.getBundle("org.eclipse.papyrus.sysml.nattable.requirement").start(); //$NON-NLS-1$
+ Platform.getBundle("org.eclipse.papyrus.sysml.nattable.requirement.config").start(); //$NON-NLS-1$
+ } catch (BundleException e) {
+ throw e;
+ }
+ Assert.assertEquals(runnableWithResult.getStatus().getMessage(), IStatus.OK, runnableWithResult.getStatus().getSeverity());
+ Assert.assertNotNull(TableCreationInSysMLModelTest.rootModel);
+
+ }
+
+
+ @Test
+ public void testCreationHandlerStatusOnRootModel() {
+ ModelExplorerUtils.testHandlerStatusInModelExplorer(TableCreationInSysMLModelTest.view, AllTests.COMMAND_ID, TableCreationInSysMLModelTest.rootModel, false);
+ }
+
+}

Back to the top