Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauricio Alferez2016-06-05 17:09:54 -0400
committerPatrick Tessier2016-06-06 10:00:04 -0400
commit25fef8bb58e278eb2b7d776b25b32ed7432fa50b (patch)
treecf144009909f0585b6fa88a9533f06987d1f221a
parentf644f4332850b0561fcc8ac3870106add9adac2c (diff)
downloadorg.eclipse.papyrus-25fef8bb58e278eb2b7d776b25b32ed7432fa50b.tar.gz
org.eclipse.papyrus-25fef8bb58e278eb2b7d776b25b32ed7432fa50b.tar.xz
org.eclipse.papyrus-25fef8bb58e278eb2b7d776b25b32ed7432fa50b.zip
Bug 495487 - [BMM] Provide a traceability table to link business
elements and SysML requirements - I created a tracedTo table with requirements in the columns and all elements excluding requirement and relationships in the rows. Therefore, the table will be used not only for connecting BMM to SysML but also, it can be used to connect requirements to any other type of element. Change-Id: I0e4e0930ddc23855a04be4fb7d5f5b961f7d084f Signed-off-by: Mauricio Alferez <mauricio.alferez@cea.fr>
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/bundle.properties2
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/META-INF/MANIFEST.MF30
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/build.properties10
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/bundle.properties3
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/config/TracedToMatrix.configuration21
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/config/TracedToMatrix.nattableconfiguration46
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/plugin.xml34
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/Activator.java64
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/celleditor/TracedToMatrixCellEditorConfiguration.java104
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/cellmanager/TracedToMatrixCellManager.java148
-rw-r--r--features/papyrus-extra-features/org.eclipse.papyrus.requirements.feature/feature.xml6
-rw-r--r--releng/extra/pom.xml1
17 files changed, 551 insertions, 1 deletions
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/bundle.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/bundle.properties
index 221018fd6ff..b470d1202cd 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/bundle.properties
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/bundle.properties
@@ -1,3 +1,3 @@
#Properties file for org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config
Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = Papyrus for Requirements - SysML SatisfiedBy Matrix (Incubation) \ No newline at end of file
+Bundle-Name = Papyrus for Requirements - SatisfiedBy Matrix (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.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.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.project
new file mode 100644
index 00000000000..d2827b87f82
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config</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/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..295926d9641
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/.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.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..befbb69f861
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/META-INF/MANIFEST.MF
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.uml.nattable,
+ org.eclipse.papyrus.sysml.nattable,
+ org.eclipse.papyrus.requirements.sysml.common,
+ org.eclipse.papyrus.infra.emf.gmf,
+ org.eclipse.papyrus.requirements.sysml.matrix.common,
+ org.eclipse.uml2.uml,
+ org.eclipse.papyrus.infra.nattable.model,
+ org.eclipse.papyrus.uml.tools.utils,
+ org.eclipse.papyrus.sysml.service.types
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Bundle-ActivationPolicy: lazy
+Import-Package: org.eclipse.papyrus.commands.wrappers,
+ org.eclipse.papyrus.sysml.requirements
+Export-Package: org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config;uses:="org.osgi.framework,org.eclipse.ui.plugin",
+ org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.celleditor;uses:="org.eclipse.papyrus.infra.nattable.model.nattable,org.eclipse.nebula.widgets.nattable.config,org.eclipse.papyrus.infra.nattable.celleditor.config",
+ org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.cellmanager;
+ uses:="org.eclipse.emf.common.command,
+ org.eclipse.papyrus.infra.nattable.manager.cell,
+ org.eclipse.papyrus.infra.nattable.manager.table,
+ org.eclipse.emf.transaction"
+Bundle-Localization: bundle
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/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/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/build.properties
new file mode 100644
index 00000000000..5a6e917c8d5
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ config/,\
+ bundle.properties
+src.includes = about.html,\
+ config/
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/bundle.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/bundle.properties
new file mode 100644
index 00000000000..f3607ad2dd1
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus for Requirements - TracedTo Matrix (Incubation) \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/config/TracedToMatrix.configuration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/config/TracedToMatrix.configuration
new file mode 100644
index 00000000000..5d14f46c946
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/config/TracedToMatrix.configuration
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration:PapyrusConfiguration 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" xmi:id="_ko07IErbEeSdQKzSRatBjg">
+ <viewpoints xsi:type="configuration:PapyrusViewpoint" xmi:id="_xogdoErbEeSdQKzSRatBjg" name="Default Papyrus Viewpoint">
+ <modelKinds xsi:type="configuration:PapyrusSyncTable" xmi:id="_lTE0gHDwEeWh-MssWmCB_A" name="Papyrus Req - TracedTo Matrix" icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png" implementationID="TracedToMatrix">
+ <profiles href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements"/>
+ <modelRules xmi:id="_lTE0gXDwEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </modelRules>
+ <modelRules xmi:id="_lTE0gnDwEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ <stereotypes href="http://www.eclipse.org/papyrus/0.7.0/SysML#//requirements/Requirement"/>
+ </modelRules>
+ <owningRules xmi:id="_lTE0g3DwEeWh-MssWmCB_A">
+ <element href="http://www.eclipse.org/uml2/5.0.0/UML#//Package"/>
+ </owningRules>
+ <categories href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wNb49xhEeOqHvRyiN87hA"/>
+ </modelKinds>
+ </viewpoints>
+ <defaultStakeholder href="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration#_7wLmkdxhEeOqHvRyiN87hA"/>
+ <metamodel href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
+</configuration:PapyrusConfiguration>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/config/TracedToMatrix.nattableconfiguration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/config/TracedToMatrix.nattableconfiguration
new file mode 100644
index 00000000000..2ca7407ed4c
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/config/TracedToMatrix.nattableconfiguration
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nattableconfiguration:TableConfiguration 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: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:nattablelabelprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattablecontentprovider" xmlns:nattablestyle="http://www.eclipse.org/papyrus/nattable/model/table/nattablestyle" xmlns:nattabletester="http://www.eclipse.org/papyrus/nattable/model/table/nattabletester" description="This table is a matrix that shows if a requirement traces to business elements" name="TracedToMatrix" type="RequirementsBooleanMatrix" iconPath="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+ <styles xsi:type="nattablestyle:TableDisplayStyle" displayStyle="HIERARCHIC_SINGLE_TREE_COLUMN"/>
+ <styles xsi:type="nattablestyle:BooleanValueStyle" name="expandAll" booleanValue="true"/>
+ <styles xsi:type="nattablestyle:IntListValueStyle" name="hiddenCategoriesByDepth">
+ <intListValue>0</intListValue>
+ <intListValue>1</intListValue>
+ <intListValue>2</intListValue>
+ <intListValue>3</intListValue>
+ </styles>
+ <creationTester xsi:type="nattabletester:JavaTableTester" tester="org.eclipse.papyrus.requirements.sysml.matrix.common.tester.RequirementTableTester.java"/>
+ <rowHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration" indexStyle="NUMERIC" displayIndex="false">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:FeatureLabelProviderConfiguration" displayType="false" displayMultiplicity="false"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" depth="1" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" depth="2" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:TreeFillingConfiguration" depth="3" labelProvider="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.1" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.treefilling.feature.labelprovider">
+ <axisUsedAsAxisProvider xsi:type="nattableaxis:EStructuralFeatureAxis">
+ <element xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/>
+ </axisUsedAsAxisProvider>
+ </ownedAxisConfigurations>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.requirements.sysml.matrix.common.axismanager.NamedElementsWithoutRequirementsAndDependenciesAxisManager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@rowHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@rowHeaderAxisConfiguration/@ownedAxisConfigurations.0 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.1 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.2 //@rowHeaderAxisConfiguration/@ownedAxisConfigurations.3"/>
+ </rowHeaderAxisConfiguration>
+ <columnHeaderAxisConfiguration xsi:type="nattableaxisconfiguration:TableHeaderAxisConfiguration">
+ <ownedLabelConfigurations xsi:type="nattablelabelprovider:ObjectLabelProviderConfiguration"/>
+ <ownedAxisConfigurations xsi:type="nattableaxisconfiguration:EStructuralFeatureValueFillingConfiguration">
+ <listenFeature xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedMember"/>
+ </ownedAxisConfigurations>
+ <axisManagers xsi:type="nattableaxisconfiguration:AxisManagerRepresentation" axisManagerId="org.eclipse.papyrus.sysml.nattable.requirement.axis.manager" labelProviderContext="org.eclipse.papyrus.infra.nattable.header.labelprovider" headerLabelConfiguration="//@columnHeaderAxisConfiguration/@ownedLabelConfigurations.0" specificAxisConfigurations="//@columnHeaderAxisConfiguration/@ownedAxisConfigurations.0"/>
+ </columnHeaderAxisConfiguration>
+ <columnAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" name="DefaultColumnProvider"/>
+ <rowAxisProviders xsi:type="nattableaxisprovider:MasterObjectAxisProvider" name="DefaultRowProvider"/>
+</nattableconfiguration:TableConfiguration>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/plugin.xml
new file mode 100644
index 00000000000..2f137699e3c
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/plugin.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.configuration">
+ <configuration
+ file="config/TracedToMatrix.nattableconfiguration"
+ type="TracedToMatrix">
+ </configuration>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.cellmanager">
+ <cellManager
+ id="org.eclipse.papyrus.requirements.sysmlbmm.matrix.tracedTo.config.cellmanager.TracedToMatrixCellManager"
+ manager="org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.cellmanager.TracedToMatrixCellManager"
+ order="101">
+ </cellManager>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
+ <contribution
+ file="config/TracedToMatrix.configuration"
+ original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
+ </contribution>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.celleditor.configuration">
+ <cellAxisConfiguration
+ class="org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.celleditor.TracedToMatrixCellEditorConfiguration"
+ order="31">
+ </cellAxisConfiguration>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/pom.xml
new file mode 100644
index 00000000000..5c52da9a1fb
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/pom.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.extra.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/extra</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config</artifactId>
+ <version>0.7.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/Activator.java
new file mode 100644
index 00000000000..6cafd3e428d
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/Activator.java
@@ -0,0 +1,64 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config;
+
+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.requirements.sysml.matrix.tracedTo.config"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * 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;
+ }
+
+ /*
+ * (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/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/celleditor/TracedToMatrixCellEditorConfiguration.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/celleditor/TracedToMatrixCellEditorConfiguration.java
new file mode 100644
index 00000000000..b646990cf8b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/celleditor/TracedToMatrixCellEditorConfiguration.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.celleditor;
+
+import org.eclipse.nebula.widgets.nattable.config.CellConfigAttributes;
+import org.eclipse.nebula.widgets.nattable.config.IConfigRegistry;
+import org.eclipse.nebula.widgets.nattable.data.convert.DefaultBooleanDisplayConverter;
+import org.eclipse.nebula.widgets.nattable.edit.EditConfigAttributes;
+import org.eclipse.nebula.widgets.nattable.edit.editor.CheckBoxCellEditor;
+import org.eclipse.nebula.widgets.nattable.style.DisplayMode;
+import org.eclipse.papyrus.infra.nattable.celleditor.config.ICellAxisConfiguration;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.nattable.painter.CustomCheckBoxPainter;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.Activator;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class TracedToMatrixCellEditorConfiguration implements ICellAxisConfiguration {
+ /**
+ * the id of this editor
+ */
+ private static final String ID = Activator.PLUGIN_ID
+ + ".celleditor.TracedToMatrixCellEditorConfiguration.CheckBox";//$NON-NLS-1$
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.configuration.IPapyrusNatTableConfiguration#getConfigurationId()
+ *
+ * @return
+ */
+ @Override
+ public String getConfigurationId() {
+ return ID;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.configuration.IPapyrusNatTableConfiguration#getConfigurationDescription()
+ *
+ * @return
+ */
+ @Override
+ public String getConfigurationDescription() {
+ return "This configuration provides a CheckBox editor for a single Boolean that is not necessarily a EStructuralFeature as in SingleBooleanCellEditorConfiguration";//$NON-NLS-1$
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.ICellAxisConfiguration#handles(org.eclipse.papyrus.infra.nattable.model.nattable.Table,
+ * java.lang.Object)
+ *
+ * @param table
+ * @param axisElement
+ * @return
+ */
+ @Override
+ public boolean handles(Table table, Object axisElement) {
+ if (table.getTableConfiguration().getName().equals("TracedToMatrix")) {
+ Object repElement = AxisUtils.getRepresentedElement(axisElement);
+ Element colUMLElement = (Element) repElement;
+ if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
+ Stereotype reqStereotype = colUMLElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ if (reqStereotype != null) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.infra.nattable.celleditor.config.ICellAxisConfiguration#configureCellEditor(org.eclipse.nebula.widgets.nattable.config.IConfigRegistry,
+ * java.lang.Object, java.lang.String)
+ *
+ * @param configRegistry
+ * @param axis
+ * @param configLabel
+ */
+
+ @Override
+ public void configureCellEditor(IConfigRegistry configRegistry, Object axis, String configLabel) {
+ configRegistry.registerConfigAttribute(CellConfigAttributes.CELL_PAINTER, new CustomCheckBoxPainter(),
+ DisplayMode.NORMAL, configLabel);
+ configRegistry.registerConfigAttribute(EditConfigAttributes.CELL_EDITOR, new CheckBoxCellEditor(),
+ DisplayMode.NORMAL, configLabel);
+ configRegistry.registerConfigAttribute(CellConfigAttributes.DISPLAY_CONVERTER,
+ new DefaultBooleanDisplayConverter(), DisplayMode.EDIT, configLabel);
+ }
+
+}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/cellmanager/TracedToMatrixCellManager.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/cellmanager/TracedToMatrixCellManager.java
new file mode 100644
index 00000000000..88cd3169b48
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config/src/org/eclipse/papyrus/requirements/sysml/matrix/tracedTo/config/cellmanager/TracedToMatrixCellManager.java
@@ -0,0 +1,148 @@
+/*****************************************************************************
+ * Copyright (c) 2016 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:
+ *
+ * Mauricio Alferez (mauricio.alferez@cea.fr) CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.cellmanager;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+//import org.eclipse.papyrus.infra.emf.gmf.command.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager;
+import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.ITreeItemAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.TableConfiguration;
+import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.papyrus.requirements.sysml.matrix.common.helpers.Helper;
+import org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config.Activator;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+@SuppressWarnings("deprecation")
+public class TracedToMatrixCellManager extends AbstractCellManager {
+ public static final String CELL_MANAGER_ID = Activator.PLUGIN_ID + ".cellmanager.TracedToMatrixCellManager";
+
+ @Override
+ public boolean handles(Object columnElement, Object rowElement) {
+ // Supports Requirement x Element
+ Object column = AxisUtils.getRepresentedElement(columnElement);
+ Object row = AxisUtils.getRepresentedElement(rowElement);
+ if (rowElement instanceof ITreeItemAxis) {
+ ITreeItemAxis axis = (ITreeItemAxis) rowElement;
+ AxisManagerRepresentation manager = axis.getManager();
+ TableConfiguration conf = (TableConfiguration) manager.eContainer().eContainer();
+ String tableName = conf.getName();
+ if (!tableName.equals("TracedToMatrix")) {
+ return false;
+ }
+ }
+
+ if (column instanceof Element) {
+ Element colUMLElement = (Element) column;
+ if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
+ if (row instanceof Element) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected Object doGetValue(Object columnElement, Object rowElement, INattableModelManager tableManager) {
+ Object column = AxisUtils.getRepresentedElement(columnElement);
+ Object row = AxisUtils.getRepresentedElement(rowElement);
+ EObject eObjectInRow = (EObject) row;
+ if (column instanceof Element) {
+ Element colUMLElement = (Element) column;
+ if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
+ Stereotype reqStereotype = colUMLElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ Object listOfObjectsTracedToRequirement = colUMLElement.getValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_TRACEDTO_ATT);
+ if (listOfObjectsTracedToRequirement instanceof EList<?>) {
+ @SuppressWarnings("unchecked")
+ EList<EObject> list = (EList<EObject>) listOfObjectsTracedToRequirement;
+ for (EObject eObjectTracedToRequirement : list) {
+ if (eObjectInRow.equals(eObjectTracedToRequirement)) {
+ return true;
+ }
+ }
+ }
+
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void setValue(TransactionalEditingDomain domain, Object columnElement, Object rowElement, Object newValue,
+ INattableModelManager tableManager) {
+ Object column = AxisUtils.getRepresentedElement(columnElement);
+ Object row = AxisUtils.getRepresentedElement(rowElement);
+
+ if (column instanceof Element) {
+ Element colUMLElement = (Element) column;
+
+ if (Boolean.FALSE.equals(newValue)) {
+ if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
+ Helper.deleteRelationshipInIntersection(domain, row, colUMLElement,
+ I_SysMLStereotype.REQUIREMENT_STEREOTYPE, I_SysMLStereotype.REQUIREMENT_TRACEDTO_ATT,
+ "StandardProfile::Trace");
+ }
+ } else if (Boolean.TRUE.equals(newValue)
+ || (newValue instanceof Abstraction && ((Abstraction) newValue).eContainer() == null)) {
+ IElementType type = ElementTypeRegistry.getInstance().getType("org.eclipse.papyrus.uml.Trace");
+ if (row instanceof Element) {
+ Element container = ((Element) row).getNearestPackage();
+ CreateRelationshipRequest request = new CreateRelationshipRequest(domain, container, (EObject) row,
+ colUMLElement, type);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ ICommand cmd = provider.getEditCommand(request);
+ if (cmd != null && cmd.canExecute()) {
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(cmd));
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public Command getSetValueCommand(TransactionalEditingDomain domain, Object columnElement, Object rowElement,
+ Object newValue, INattableModelManager tableManager) {
+ return super.getSetValueCommand(domain, columnElement, rowElement, newValue, tableManager);
+ }
+
+ @Override
+ public boolean isCellEditable(Object columnElement, Object rowElement) {
+ Object column = AxisUtils.getRepresentedElement(columnElement);
+ Object row = AxisUtils.getRepresentedElement(rowElement);
+ if (row instanceof NamedElement && column instanceof Element) {
+ return UMLUtil.getStereotypeApplication((Element) column, Requirement.class) != null;
+ }
+ return false;
+ }
+}
diff --git a/features/papyrus-extra-features/org.eclipse.papyrus.requirements.feature/feature.xml b/features/papyrus-extra-features/org.eclipse.papyrus.requirements.feature/feature.xml
index b9bf11efffe..6c82e6d3fc0 100644
--- a/features/papyrus-extra-features/org.eclipse.papyrus.requirements.feature/feature.xml
+++ b/features/papyrus-extra-features/org.eclipse.papyrus.requirements.feature/feature.xml
@@ -270,4 +270,10 @@ http://www.eclipse.org/legal/epl-v10.html
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
diff --git a/releng/extra/pom.xml b/releng/extra/pom.xml
index 062a51d195e..17e2fc9359b 100644
--- a/releng/extra/pom.xml
+++ b/releng/extra/pom.xml
@@ -190,6 +190,7 @@
<module>../../extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config</module>
<module>../../extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config</module>
<module>../../extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config</module>
+ <module>../../extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.tracedTo.config</module>
<module>../../extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.verification</module>
<module>../../extraplugins/requirements/org.eclipse.papyrus.requirements.metrics.library</module>
<module>../../extraplugins/requirements/org.eclipse.papyrus.requirements.templates</module>

Back to the top