Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauricio Alferez2016-05-18 09:42:27 +0000
committerGerrit Code Review @ Eclipse.org2016-05-18 12:02:24 +0000
commitf1933675f0e471a64b53943d683d034cc5daa7c2 (patch)
tree9c4d9d671c1d44361ac7e8968ee2e35a955fbdaa
parent5747e9c848b0434f5c56152b6a6da298dc7e9283 (diff)
downloadorg.eclipse.papyrus-f1933675f0e471a64b53943d683d034cc5daa7c2.tar.gz
org.eclipse.papyrus-f1933675f0e471a64b53943d683d034cc5daa7c2.tar.xz
org.eclipse.papyrus-f1933675f0e471a64b53943d683d034cc5daa7c2.zip
Bug 493796 - [Extra][Requirements] Table for "refine" relationship
- I also changed the table type for all the matrices to RequirementsBooleanMatrix. In that way, users do not have to change the "handles" method of BooleanMatrixCellEditor anymore. - I also changed from explicit references of requirements properties, to the use of the static attributes in the I_SysMLStereotype interface. Change-Id: I9ae47af40267c49b2b748fb92d5117f650b5cc7d Signed-off-by: Mauricio Alferez <mauricio.alferez@cea.fr>
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/celleditor/BooleanMatrixCellEditorConfiguration.java4
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/cellmanager/SameStereotypeCellManager.java4
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.nattableconfiguration2
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixCellManager.java6
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixPackageCellManager.java4
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/META-INF/MANIFEST.MF26
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/build.properties8
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/config/RefinedByMatrix.configuration21
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/config/RefinedByMatrix.nattableconfiguration46
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/plugin.xml34
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/Activator.java64
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/celleditor/RefinedByMatrixCellEditorConfiguration.java104
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/cellmanager/RefinedByMatrixCellManager.java136
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/config/SatisfyMatrix.nattableconfiguration2
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/celleditor/SatisfiedByCellEditorConfiguration.java2
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/cellmanager/SatisfyMatrixCellManager.java6
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/config/VerifiedByMatrix.nattableconfiguration2
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/celleditor/VerifiedByMatrixCellEditorConfiguration.java2
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/cellmanager/VerifiedByMatrixCellManager.java4
-rw-r--r--features/papyrus-extra-features/org.eclipse.papyrus.requirements.feature/feature.xml6
-rw-r--r--releng/extra/pom.xml1
26 files changed, 547 insertions, 20 deletions
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/celleditor/BooleanMatrixCellEditorConfiguration.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/celleditor/BooleanMatrixCellEditorConfiguration.java
index 6b9ed85403c..7fe2341489d 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/celleditor/BooleanMatrixCellEditorConfiguration.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/celleditor/BooleanMatrixCellEditorConfiguration.java
@@ -69,9 +69,7 @@ public class BooleanMatrixCellEditorConfiguration implements ICellAxisConfigurat
*/
@Override
public boolean handles(Table table, Object axisElement) {
- if (table.getTableConfiguration().getType().equals("VerifiedByMatrix")||
- table.getTableConfiguration().getType().equals("SatisfyMatrix")||
- table.getTableConfiguration().getType().equals("DerivedFromMatrix")) {
+ if (table.getTableConfiguration().getType().equals("RequirementsBooleanMatrix")) {
Object repElement = AxisUtils.getRepresentedElement(axisElement);
Element colUMLElement = (Element) repElement;
if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/cellmanager/SameStereotypeCellManager.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/cellmanager/SameStereotypeCellManager.java
index 2349111af99..c03c5d0cdf5 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/cellmanager/SameStereotypeCellManager.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.common/src/org/eclipse/papyrus/requirements/sysml/matrix/common/cellmanager/SameStereotypeCellManager.java
@@ -42,8 +42,8 @@ public class SameStereotypeCellManager extends AbstractCellManager {
ITreeItemAxis axis = (ITreeItemAxis) rowElement;
AxisManagerRepresentation manager = axis.getManager();
TableConfiguration conf = (TableConfiguration) manager.eContainer().eContainer();
- String type = conf.getType();
- if (!type.equals("SatisfyMatrix") && !type.equals("VerifiedByMatrix")) {
+ String tableName = conf.getName();
+ if (!tableName.equals("SatisfyMatrix") && !tableName.equals("VerifiedByMatrix")) {
return false;
}
}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.nattableconfiguration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.nattableconfiguration
index b7162d5faba..5123f33e423 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.nattableconfiguration
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.nattableconfiguration
@@ -1,5 +1,5 @@
<?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 is derivedFrom another requirement" name="DerivedFromMatrix" type="DerivedFromMatrix" iconPath="platform:/plugin/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/icons/table_SysML_Requirement.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+<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 is derivedFrom another requirement" name="DerivedFromMatrix" 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">
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixCellManager.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixCellManager.java
index 778ecff07ea..1b925ce85bd 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixCellManager.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixCellManager.java
@@ -57,8 +57,8 @@ public class DerivedFromMatrixCellManager extends AbstractCellManager {
ITreeItemAxis axis = (ITreeItemAxis) rowElement;
AxisManagerRepresentation manager = axis.getManager();
TableConfiguration conf = (TableConfiguration) manager.eContainer().eContainer();
- String type = conf.getType();
- if (!type.equals("DerivedFromMatrix")) {
+ String tableName = conf.getName();
+ if (!tableName.equals("DerivedFromMatrix")) {
return false;
}
}
@@ -113,7 +113,7 @@ public class DerivedFromMatrixCellManager extends AbstractCellManager {
if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
Stereotype reqStereotype = colUMLElement
.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
- Object listOfObjectsThatSatisfyRequirement = colUMLElement.getValue(reqStereotype, "derivedFrom");
+ Object listOfObjectsThatSatisfyRequirement = colUMLElement.getValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_DERIVEDFROM_ATT);
if (listOfObjectsThatSatisfyRequirement instanceof EList<?>) {
@SuppressWarnings("unchecked")
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixPackageCellManager.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixPackageCellManager.java
index bd0accd910b..4fe5a6807a2 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixPackageCellManager.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixPackageCellManager.java
@@ -35,8 +35,8 @@ public class DerivedFromMatrixPackageCellManager extends AbstractCellManager {
ITreeItemAxis axis = (ITreeItemAxis) rowElement;
AxisManagerRepresentation manager = axis.getManager();
TableConfiguration conf = (TableConfiguration) manager.eContainer().eContainer();
- String type = conf.getType();
- if (!type.equals("DerivedFromMatrix")) {
+ String tableName = conf.getName();
+ if (!tableName.equals("DerivedFromMatrix")) {
return false;
}
}
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.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.refinedBy.config/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/.project
new file mode 100644
index 00000000000..4716f907916
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.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.refinedBy.config/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.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.refinedBy.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.refinedBy.config/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..b08f6520052
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Papyrus Req - RefinedBy Matrix
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config.Activator
+Bundle-Vendor: Eclipse Modeling Project
+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,
+ org.eclipse.papyrus.requirements.sysml.traceability.commands
+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.refinedBy.config,
+ org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config.celleditor,
+ org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config.cellmanager
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.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.refinedBy.config/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/build.properties
new file mode 100644
index 00000000000..1079f9b4e71
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ config/
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/config/RefinedByMatrix.configuration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/config/RefinedByMatrix.configuration
new file mode 100644
index 00000000000..8b0e762ab9e
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/config/RefinedByMatrix.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 - RefinedBy Matrix" icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png" implementationID="RefinedByMatrix">
+ <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.refinedBy.config/config/RefinedByMatrix.nattableconfiguration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/config/RefinedByMatrix.nattableconfiguration
new file mode 100644
index 00000000000..1c4783f3e6c
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/config/RefinedByMatrix.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 is verified by an element" name="RefinedByMatrix" 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.refinedBy.config/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/plugin.xml
new file mode 100644
index 00000000000..e3641cdcc2e
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.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/RefinedByMatrix.nattableconfiguration"
+ type="RefinedByMatrix">
+ </configuration>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.cellmanager">
+ <cellManager
+ id="org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config.cellmanager.RefinedByMatrixCellManager"
+ manager="org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config.cellmanager.RefinedByMatrixCellManager"
+ order="101">
+ </cellManager>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
+ <contribution
+ file="config/RefinedByMatrix.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.refinedBy.config.celleditor.RefinedByMatrixCellEditorConfiguration"
+ order="31">
+ </cellAxisConfiguration>
+ </extension>
+
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/pom.xml
new file mode 100644
index 00000000000..dcf275dea1b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.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.refinedBy.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.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/Activator.java
new file mode 100644
index 00000000000..4187070a22f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/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.refinedBy.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.refinedBy.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.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/celleditor/RefinedByMatrixCellEditorConfiguration.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/celleditor/RefinedByMatrixCellEditorConfiguration.java
new file mode 100644
index 00000000000..65cada8593a
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/celleditor/RefinedByMatrixCellEditorConfiguration.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.refinedBy.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.refinedBy.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 RefinedByMatrixCellEditorConfiguration implements ICellAxisConfiguration {
+ /**
+ * the id of this editor
+ */
+ private static final String ID = Activator.PLUGIN_ID
+ + ".celleditor.RefinedByMatrixCellEditorConfiguration.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("RefinedByMatrix")) {
+ 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.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/cellmanager/RefinedByMatrixCellManager.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/cellmanager/RefinedByMatrixCellManager.java
new file mode 100644
index 00000000000..9c440e43844
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/refinedBy/config/cellmanager/RefinedByMatrixCellManager.java
@@ -0,0 +1,136 @@
+/*****************************************************************************
+ * 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.refinedBy.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.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.requirements.sysml.common.I_SysMLStereotype;
+import org.eclipse.papyrus.requirements.sysml.matrix.common.helpers.Helper;
+import org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.config.Activator;
+import org.eclipse.papyrus.requirements.sysml.traceability.commands.RefinementCreateCommand;
+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;
+
+public class RefinedByMatrixCellManager extends AbstractCellManager {
+ public static final String CELL_MANAGER_ID = Activator.PLUGIN_ID + ".cellmanager.RefinedByMatrixCellManager";
+
+ @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("RefinedByMatrix")) {
+ 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 listOfObjectsThatSatisfyRequirement = colUMLElement.getValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_REFINEDBY_ATT);
+ if (listOfObjectsThatSatisfyRequirement instanceof EList<?>) {
+ @SuppressWarnings("unchecked")
+ EList<EObject> list = (EList<EObject>) listOfObjectsThatSatisfyRequirement;
+ // check the list of elements that satisfy the requirement
+ // to see if the element in the current row
+ for (EObject eObjectThatSatisfiesRequirement : list) {
+ if (eObjectInRow.equals(eObjectThatSatisfiesRequirement)) {
+ 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_REFINEDBY_ATT,
+ "StandardProfile::Refine");
+ }
+ } else if (Boolean.TRUE.equals(newValue)
+ || (newValue instanceof Abstraction && ((Abstraction) newValue).eContainer() == null)) {
+ if (row instanceof Element) {
+ RefinementCreateCommand refinementCreateCommand = new RefinementCreateCommand(domain,
+ (NamedElement) (EObject) row, (NamedElement) colUMLElement);
+ refinementCreateCommand.execute();
+ }
+ }
+ }
+ }
+
+ @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/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/config/SatisfyMatrix.nattableconfiguration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/config/SatisfyMatrix.nattableconfiguration
index 155e875b8c5..97f8a0597ff 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/config/SatisfyMatrix.nattableconfiguration
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/config/SatisfyMatrix.nattableconfiguration
@@ -1,5 +1,5 @@
<?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 the element satisfies a requirement" name="SatisfyMatrix" type="SatisfyMatrix" iconPath="platform:/plugin/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/icons/table_SysML_Requirement.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+<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 the element satisfies a requirement" name="SatisfyMatrix" 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">
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/celleditor/SatisfiedByCellEditorConfiguration.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/celleditor/SatisfiedByCellEditorConfiguration.java
index 2545df37133..53e61615300 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/celleditor/SatisfiedByCellEditorConfiguration.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/celleditor/SatisfiedByCellEditorConfiguration.java
@@ -69,7 +69,7 @@ public class SatisfiedByCellEditorConfiguration implements ICellAxisConfiguratio
*/
@Override
public boolean handles(Table table, Object axisElement) {
- if(table.getTableConfiguration().getType().equals("SatisfyMatrix")){
+ if(table.getTableConfiguration().getName().equals("SatisfyMatrix")){
Object repElement = AxisUtils.getRepresentedElement(axisElement);
Element colUMLElement = (Element) repElement;
if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/cellmanager/SatisfyMatrixCellManager.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/cellmanager/SatisfyMatrixCellManager.java
index f5c1c1e2a65..d578d9eb560 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/cellmanager/SatisfyMatrixCellManager.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/satisfiedBy/config/cellmanager/SatisfyMatrixCellManager.java
@@ -55,8 +55,8 @@ public class SatisfyMatrixCellManager extends AbstractCellManager {
ITreeItemAxis axis = (ITreeItemAxis) rowElement;
AxisManagerRepresentation manager = axis.getManager();
TableConfiguration conf = (TableConfiguration) manager.eContainer().eContainer();
- String type = conf.getType();
- if (!type.equals("SatisfyMatrix")) {
+ String tableName = conf.getName();
+ if (!tableName.equals("SatisfyMatrix")) {
return false;
}
}
@@ -81,7 +81,7 @@ public class SatisfyMatrixCellManager extends AbstractCellManager {
Element colUMLElement = (Element) column;
if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
Stereotype reqStereotype = colUMLElement.getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
- Object listOfObjectsThatSatisfyRequirement = colUMLElement.getValue(reqStereotype, "satisfiedBy");
+ Object listOfObjectsThatSatisfyRequirement = colUMLElement.getValue(reqStereotype, I_SysMLStereotype.REQUIREMENT_SATISFIEDBY_ATT);
if (listOfObjectsThatSatisfyRequirement instanceof EList<?>) {
@SuppressWarnings("unchecked")
EList<EObject> list = (EList<EObject>) listOfObjectsThatSatisfyRequirement;
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/config/VerifiedByMatrix.nattableconfiguration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/config/VerifiedByMatrix.nattableconfiguration
index b6b0e27a2e3..00c10429b90 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/config/VerifiedByMatrix.nattableconfiguration
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/config/VerifiedByMatrix.nattableconfiguration
@@ -1,5 +1,5 @@
<?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 is verified by an element" name="VerifiedByMatrix" type="VerifiedByMatrix" iconPath="platform:/plugin/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config/icons/table_SysML_Requirement.png" defaultRowAxisProvider="//@rowAxisProviders.0" defaultColumnAxisProvider="//@columnAxisProviders.0">
+<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 is verified by an element" name="VerifiedByMatrix" 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">
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/celleditor/VerifiedByMatrixCellEditorConfiguration.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/celleditor/VerifiedByMatrixCellEditorConfiguration.java
index 8750c90e4a2..58782550705 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/celleditor/VerifiedByMatrixCellEditorConfiguration.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/celleditor/VerifiedByMatrixCellEditorConfiguration.java
@@ -69,7 +69,7 @@ public class VerifiedByMatrixCellEditorConfiguration implements ICellAxisConfigu
*/
@Override
public boolean handles(Table table, Object axisElement) {
- if (table.getTableConfiguration().getType().equals("VerifiedByMatrix")) {
+ if (table.getTableConfiguration().getName().equals("VerifiedByMatrix")) {
Object repElement = AxisUtils.getRepresentedElement(axisElement);
Element colUMLElement = (Element) repElement;
if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/cellmanager/VerifiedByMatrixCellManager.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/cellmanager/VerifiedByMatrixCellManager.java
index 27dab403da7..5a9509d4010 100644
--- a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/cellmanager/VerifiedByMatrixCellManager.java
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.verifiedBy.config/src/org/eclipse/papyrus/requirements/sysml/matrix/verifiedBy/config/cellmanager/VerifiedByMatrixCellManager.java
@@ -56,8 +56,8 @@ public class VerifiedByMatrixCellManager extends AbstractCellManager {
ITreeItemAxis axis = (ITreeItemAxis) rowElement;
AxisManagerRepresentation manager = axis.getManager();
TableConfiguration conf = (TableConfiguration) manager.eContainer().eContainer();
- String type = conf.getType();
- if (!type.equals("VerifiedByMatrix")) {
+ String tableName = conf.getName();
+ if (!tableName.equals("VerifiedByMatrix")) {
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 edfe09f559f..e1ac128a604 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
@@ -230,4 +230,10 @@ http://www.eclipse.org/legal/epl-v10.html
install-size="0"
version="0.0.0"/>
+ <plugin
+ id="org.eclipse.papyrus.requirements.sysml.matrix.refinedBy.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 fd19d32ffad..062a51d195e 100644
--- a/releng/extra/pom.xml
+++ b/releng/extra/pom.xml
@@ -189,6 +189,7 @@
<module>../../extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.satisfiedBy.config</module>
<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.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