Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config')
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/.classpath7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/.project28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/META-INF/MANIFEST.MF26
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/about.html28
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/build.properties7
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.configuration21
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.nattableconfiguration46
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/plugin.xml38
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/pom.xml13
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/Activator.java68
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/axismanager/RequirementsWithPackagesRowAxisManager.java38
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixCellManager.java192
-rw-r--r--extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixPackageCellManager.java62
14 files changed, 581 insertions, 0 deletions
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/.classpath b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/.classpath
new file mode 100644
index 00000000000..b862a296d38
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.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.derivedFrom.config/.project b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/.project
new file mode 100644
index 00000000000..91d5083c62f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.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.derivedFrom.config/.settings/org.eclipse.jdt.core.prefs b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.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.derivedFrom.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.derivedFrom.config/META-INF/MANIFEST.MF b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..58255534d28
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/META-INF/MANIFEST.MF
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Papyrus Req - DerivedFrom Matrix
+Bundle-SymbolicName: org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config;singleton:=true
+Bundle-Version: 0.7.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.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
+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.derivedFrom.config,
+ org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.axismanager,
+ org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.celleditor,
+ org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.cellmanager
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/about.html b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.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.derivedFrom.config/build.properties b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/build.properties
new file mode 100644
index 00000000000..e0e105b23b5
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html
+src.includes = about.html
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.configuration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.configuration
new file mode 100644
index 00000000000..2fc21e663c3
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.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 - DerivedFrom Matrix" icon="platform:/plugin/org.eclipse.papyrus.requirements.common.ui/images/Papyrus_Req_logo_16x16.png" implementationID="DerivedFromMatrix">
+ <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.derivedFrom.config/config/DerivedFromMatrix.nattableconfiguration b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.nattableconfiguration
new file mode 100644
index 00000000000..b7162d5faba
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/config/DerivedFromMatrix.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 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">
+ <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.derivedFrom.config.axismanager.RequirementsWithPackagesRowAxisManager" 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.derivedFrom.config/plugin.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/plugin.xml
new file mode 100644
index 00000000000..c44ef8049c7
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/plugin.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.configuration">
+ <configuration
+ file="config/DerivedFromMatrix.nattableconfiguration"
+ type="DerivedFromMatrix">
+ </configuration>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.cellmanager">
+ <cellManager
+ id="org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.cellmanager.DerivedFromMatrixCellManager"
+ manager="org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.cellmanager.DerivedFromMatrixCellManager"
+ order="51">
+ </cellManager>
+ <cellManager
+ id="org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.cellmanager.DerivedFromMatrixPackageCellManager"
+ manager="org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.cellmanager.DerivedFromMatrixPackageCellManager"
+ order="50">
+ </cellManager>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.viewpoints.policy.custom">
+ <contribution
+ file="config/DerivedFromMatrix.configuration"
+ original="platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/builtin/default.configuration">
+ </contribution>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.nattable.axismanager">
+ <axisManager
+ id="org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.axismanager.RequirementsWithPackagesRowAxisManager"
+ manager="org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config.axismanager.RequirementsWithPackagesRowAxisManager">
+ </axisManager>
+ </extension>
+</plugin>
diff --git a/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/pom.xml b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/pom.xml
new file mode 100644
index 00000000000..c6daf633e01
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.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.derivedFrom.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.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/Activator.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/Activator.java
new file mode 100644
index 00000000000..c1d4567021f
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/Activator.java
@@ -0,0 +1,68 @@
+/*****************************************************************************
+ * 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.derivedFrom.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.derivedFrom.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.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/axismanager/RequirementsWithPackagesRowAxisManager.java b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/axismanager/RequirementsWithPackagesRowAxisManager.java
new file mode 100644
index 00000000000..c7bd0178dd3
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/axismanager/RequirementsWithPackagesRowAxisManager.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * 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.derivedFrom.config.axismanager;
+
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TreeFillingConfiguration;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.uml.nattable.manager.axis.UMLElementTreeAxisManagerForEventList;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+public class RequirementsWithPackagesRowAxisManager extends UMLElementTreeAxisManagerForEventList {
+
+ @Override
+ public boolean isAllowedContents(Object objectToTest, Object semanticParent, TreeFillingConfiguration conf,
+ int depth) {
+ if (objectToTest instanceof NamedElement) {
+ if (UMLUtil.getStereotypeApplication((Element) objectToTest, Requirement.class) != null) {
+ return true;
+ } else if (objectToTest instanceof org.eclipse.uml2.uml.Package) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
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
new file mode 100644
index 00000000000..778ecff07ea
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixCellManager.java
@@ -0,0 +1,192 @@
+/*****************************************************************************
+ * 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.derivedFrom.config.cellmanager;
+
+import java.util.Iterator;
+
+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.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+//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.derivedFrom.config.Activator;
+import org.eclipse.papyrus.sysml.requirements.Requirement;
+import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
+import org.eclipse.uml2.uml.Abstraction;
+import org.eclipse.uml2.uml.DirectedRelationship;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+@SuppressWarnings("deprecation")
+public class DerivedFromMatrixCellManager extends AbstractCellManager {
+ public static final String CELL_MANAGER_ID = Activator.PLUGIN_ID + ".cellmanager.DerivedFromMatrixCellManager";
+
+ @Override
+ public boolean handles(Object columnElement, Object rowElement) {
+ // Supports Requirement x Requirement
+ 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 type = conf.getType();
+ if (!type.equals("DerivedFromMatrix")) {
+ return false;
+ }
+ }
+
+ if (column instanceof Element && row instanceof Element) {
+ Element colUMLElement = (Element) column;
+ Element rowUMLElement = (Element) row;
+ if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null
+ && UMLUtil.getStereotypeApplication(rowUMLElement, Requirement.class) != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ protected Object doGetValue(Object columnElement, Object rowElement, INattableModelManager tableManager) {
+ Object column = AxisUtils.getRepresentedElement(columnElement);
+ Object row = AxisUtils.getRepresentedElement(rowElement);
+ if (column instanceof Element && row instanceof Element) {
+ Element colUMLElement = (Element) column;
+ Element rowUMLElement = (Element) row;
+ if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null
+ && UMLUtil.getStereotypeApplication(rowUMLElement, Requirement.class) != null) {
+ Requirement requirementInRow = UMLUtil.getStereotypeApplication(rowUMLElement, Requirement.class);
+ @SuppressWarnings("unchecked")
+ EList<EObject> list = (EList<EObject>) UMLUtil.getTaggedValue(colUMLElement,
+ I_SysMLStereotype.REQUIREMENT_STEREOTYPE, I_SysMLStereotype.REQUIREMENT_DERIVEDFROM_ATT);
+ // Find if the requirement in the row is in the list of
+ // requirements that derive the requirement (in the column)
+ for (EObject requirementThatDerivedRequirementInColumn : list) {
+ if (requirementThatDerivedRequirementInColumn.equals(requirementInRow)) {
+ 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);
+ EObject eObjectInRow = (EObject) row;
+
+ if (column instanceof Element) {
+ Element colUMLElement = (Element) column;
+ Element rowUMLElement = (Element) row;
+ if (Boolean.FALSE.equals(newValue)) {
+ if (UMLUtil.getStereotypeApplication(colUMLElement, Requirement.class) != null) {
+ Stereotype reqStereotype = colUMLElement
+ .getAppliedStereotype(I_SysMLStereotype.REQUIREMENT_STEREOTYPE);
+ Object listOfObjectsThatSatisfyRequirement = colUMLElement.getValue(reqStereotype, "derivedFrom");
+
+ 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
+ DirectedRelationship toDestroy = null;
+ for (EObject eObjectThatSatisfiesRequirement : list) {
+ if (toDestroy == null) {
+ EObject baseClass = UMLUtil.getBaseElement(eObjectThatSatisfiesRequirement);
+ if (eObjectInRow.equals(baseClass)) {
+ EList<DirectedRelationship> directedRelationships = colUMLElement
+ .getSourceDirectedRelationships();
+
+ Iterator<DirectedRelationship> iter = directedRelationships.iterator();
+ while (iter.hasNext() && toDestroy == null) {
+ DirectedRelationship relationship = iter.next();
+ if (relationship instanceof Abstraction) {
+ if (relationship.getAppliedStereotype(
+ I_SysMLStereotype.DERIVEREQT_STEREOTYPE) != null) {
+ EList<Element> sources = relationship.getSources();
+ EList<Element> targets = relationship.getTargets();
+ if (sources.contains(column) && targets.contains(rowUMLElement)) {
+ toDestroy = relationship;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (toDestroy != null) {
+ DestroyElementRequest req = new DestroyElementRequest(toDestroy, false);
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(toDestroy);
+ ICommand cmd = provider.getEditCommand(req);
+ if (cmd != null && cmd.canExecute()) {
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(cmd));
+ }
+ }
+ }
+ }
+ } else if (Boolean.TRUE.equals(newValue)
+ || (newValue instanceof Abstraction && ((Abstraction) newValue).eContainer() == null)) {
+ Element container = rowUMLElement.getNearestPackage();
+ // derivedReqt is owned by the most concrete requirement package
+ IElementEditService provider = ElementEditServiceUtils.getCommandProvider(container);
+ CreateRelationshipRequest request = new CreateRelationshipRequest(domain, container, (EObject) column,
+ rowUMLElement, SysMLElementTypes.DERIVE_REQT);
+ request.setContainer(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 (column instanceof Element && row instanceof Element) {
+ return UMLUtil.getStereotypeApplication((Element) column, Requirement.class) != null
+ && UMLUtil.getStereotypeApplication((Element) row, Requirement.class) != null;
+ }
+ return false;
+ }
+}
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
new file mode 100644
index 00000000000..bd0accd910b
--- /dev/null
+++ b/extraplugins/requirements/org.eclipse.papyrus.requirements.sysml.matrix.derivedFrom.config/src/org/eclipse/papyrus/requirements/sysml/matrix/derivedFrom/config/cellmanager/DerivedFromMatrixPackageCellManager.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * 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.derivedFrom.config.cellmanager;
+
+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.matrix.common.Activator;
+import org.eclipse.uml2.uml.Element;
+
+public class DerivedFromMatrixPackageCellManager extends AbstractCellManager {
+ public static final String CELL_MANAGER_ID = Activator.PLUGIN_ID
+ + ".cellmanager.DerivedFromMatrixPackageCellManager";
+
+ @Override
+ public boolean handles(Object columnElement, Object rowElement) {
+ 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 type = conf.getType();
+ if (!type.equals("DerivedFromMatrix")) {
+ return false;
+ }
+ }
+
+ if (column instanceof Element && row instanceof Element) {
+ Element colUMLElement = (Element) column;
+ Element rowUMLElement = (Element) row;
+ if (colUMLElement instanceof org.eclipse.uml2.uml.Package
+ || rowUMLElement instanceof org.eclipse.uml2.uml.Package) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ @Override
+ protected Object doGetValue(Object columnElement, Object rowElement, INattableModelManager tableManager) {
+ return "N/A";// "Packages are just for grouping requirements but are
+ // shown in the matrix for grouping requirements"
+ }
+
+}

Back to the top