Commit 7083a196 authored by Liana Soima's avatar Liana Soima
Browse files

Edited Ecore Model



Added referenced AF3 Elements
Signed-off-by: Liana Soima's avatarLiana Soima <soima@fortiss.org>
Issue-Ref: 3986
parent b2eb0f58
......@@ -320,6 +320,9 @@
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.SCElementIsPrivate">
</contextMenuContribution>
<contextMenuContribution
contributor="org.fortiss.af3.safetycases.ui.commands.SCElementIsImpacted">
</contextMenuContribution>
</extension>
<extension
point="org.eclipse.ui.views">
......
......@@ -36,6 +36,7 @@ import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.c
import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.createSafetyExitConnector;
import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.createSolution;
import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.createStrategy;
import static org.fortiss.af3.safetycases.utils.SafetyCasesModelElementFactory.createChange;
import org.fortiss.af3.requirementspatterns.model.PatternsDatabase;
import org.fortiss.af3.requirementspatterns.model.SafetyClaimPattern;
......@@ -47,6 +48,7 @@ import org.fortiss.af3.safetycases.model.AwayContext;
import org.fortiss.af3.safetycases.model.AwayContractModule;
import org.fortiss.af3.safetycases.model.AwayGoal;
import org.fortiss.af3.safetycases.model.AwaySolution;
import org.fortiss.af3.safetycases.model.Change;
import org.fortiss.af3.safetycases.model.Context;
import org.fortiss.af3.safetycases.model.EntryConnector;
import org.fortiss.af3.safetycases.model.ExitConnector;
......@@ -138,6 +140,8 @@ public class PrototypeProvider extends PrototypeProviderBase {
AwayContractModule awayContractModule = createAwayContractModule();
registerPrimaryPrototype("Away Contract Module", awayContractModule,
CATEGORY_NAME_SAFETY_CASES);
Change change = createChange();
registerPrimaryPrototype("Change", change, CATEGORY_NAME_SAFETY_CASES);
}
/** Defines prototypes for {@link PatternsDatabase}s. */
......
......@@ -30,6 +30,8 @@ import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getRootEl
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.graphics.Point;
......@@ -37,11 +39,6 @@ import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.safetyargumentationpackage.model.SafetyArgumentationPackage;
import org.fortiss.af3.safetycases.model.ArgumentElement;
import org.fortiss.af3.safetycases.model.ArgumentModule;
......@@ -269,6 +266,7 @@ public class Utils {
existingReferences.addAll(argElem.getReferencedRequirements());
existingReferences.addAll(argElem.getReferencedStates());
return existingReferences;
}
/** This method returns the DIRECT children of the parent */
public static List<? extends EObject> getChildren(EObject parentElement) {
......
......@@ -18,10 +18,13 @@ Require-Bundle: org.eclipse.core.runtime,
org.fortiss.af3.expression;visibility:=reexport,
org.fortiss.af3.platform;visibility:=reexport,
org.fortiss.af3.project;visibility:=reexport,
org.fortiss.af3.safetycases;visibility:=reexport,
org.fortiss.af3.state;visibility:=reexport,
org.fortiss.tooling.kernel;visibility:=reexport,
org.fortiss.af3.timing;visibility:=reexport,
org.fortiss.af3.allocation;visibility:=reexport,
org.eclipse.jface;bundle-version="3.9.1"
org.eclipse.jface;bundle-version="3.9.1",
org.fortiss.af3.mode;bundle-version="2.16.0";visibility:=reexport
Export-Package: org.fortiss.af3.requirementspatterns.model,
org.fortiss.af3.requirementspatterns.model.impl,
org.fortiss.af3.requirementspatterns.model.util,
......
......@@ -6,17 +6,24 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="toBeSupportedByContract"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EEnum platform:/resource/org.fortiss.af3.mira/model/mira.ecore#//SafetyRequirementType"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedByAwayGoals"
upperBound="-1" eType="#//AwayGoal"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Solution" eSuperTypes="#//SpinalElement #//ArgumentModuleInterface">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="status" eType="#//EvidenceStatus"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="safetyRequirement" eType="ecore:EClass platform:/resource/org.fortiss.af3.mira/model/mira.ecore#//Requirement"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedByAwaySolutions"
upperBound="-1" eType="#//AwaySolution"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Strategy" eSuperTypes="#//DecomposableSpinalElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="toBeSupportedByContract"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Assumption" eSuperTypes="#//ContextualElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Context" eSuperTypes="#//ContextualElement #//ArgumentModuleInterface"/>
<eClassifiers xsi:type="ecore:EClass" name="Context" eSuperTypes="#//ContextualElement #//ArgumentModuleInterface">
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedByAwayContexts"
upperBound="-1" eType="#//AwayContext"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Justification" eSuperTypes="#//ContextualElement"/>
<eClassifiers xsi:type="ecore:EClass" name="InContextOf" eSuperTypes="#//SafetyCasesConnection"/>
<eClassifiers xsi:type="ecore:EClass" name="SafetyCase" eSuperTypes="platform:/resource/org.fortiss.tooling.base/model/base.ecore#//base/HierarchicElementBase platform:/resource/org.fortiss.tooling.base/model/base.ecore#//element/IHierarchicElement">
......@@ -301,6 +308,18 @@
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat" defaultValueLiteral="0.0"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="weight" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat"
defaultValueLiteral="1.0"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedStates" upperBound="-1"
eType="ecore:EClass platform:/resource/org.fortiss.af3.state/model/state.ecore#//State"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedPTA" upperBound="-1"
eType="ecore:EClass platform:/resource/org.fortiss.af3.platform/model/platform.ecore#//IPlatformArchitectureElement"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedModes" upperBound="-1"
eType="ecore:EClass platform:/resource/org.fortiss.af3.mode/model/mode.ecore#//Mode"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedDeployments"
upperBound="-1" eType="ecore:EClass platform:/resource/org.fortiss.af3.allocation/model/allocation.ecore#//AllocationTable"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedComponents" upperBound="-1"
eType="ecore:EClass platform:/resource/org.fortiss.af3.component/model/component.ecore#//Component"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencedRequirements"
upperBound="-1" eType="ecore:EClass platform:/resource/org.fortiss.af3.mira/model/mira.ecore#//Requirement"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AwayContractModule" eSuperTypes="#//ContractModule #//AwayArgumentElement #//DecomposableSpinalElement"/>
<eClassifiers xsi:type="ecore:EEnum" name="EvidenceStatus">
......
......@@ -5,7 +5,7 @@
editorDirectory="/org.fortiss.af3.safetycases.editor/generated-src" modelPluginID="org.fortiss.af3.safetycases"
modelName="Model" testsDirectory="/org.fortiss.af3.safetycases.tests/generated-src"
importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false"
usedGenPackages="platform:/resource/org.fortiss.tooling.base/model/base.genmodel#//model platform:/resource/org.fortiss.af3.mira/model/mira.genmodel#//model platform:/resource/org.fortiss.af3.component/model/component.genmodel#//model platform:/resource/org.fortiss.af3.expression/model/expression.genmodel#//model platform:/resource/org.fortiss.af3.project/model/project.genmodel#//model requirementspatterns.genmodel#//model platform:/resource/org.fortiss.tooling.kernel/model/kernel.genmodel#//model">
usedGenPackages="platform:/resource/org.fortiss.tooling.base/model/base.genmodel#//model platform:/resource/org.fortiss.af3.mira/model/mira.genmodel#//model platform:/resource/org.fortiss.af3.allocation/model/allocation.genmodel#//model platform:/resource/org.fortiss.af3.component/model/component.genmodel#//model platform:/resource/org.fortiss.af3.expression/model/expression.genmodel#//model platform:/resource/org.fortiss.af3.mode/model/mode.genmodel#//model platform:/resource/org.fortiss.af3.platform/model/platform.genmodel#//model platform:/resource/org.fortiss.af3.project/model/project.genmodel#//model requirementspatterns.genmodel#//model platform:/resource/org.fortiss.af3.state/model/state.genmodel#//model platform:/resource/org.fortiss.tooling.kernel/model/kernel.genmodel#//model platform:/resource/org.fortiss.af3.timing/model/timing.genmodel#//model">
<foreignModel>safetycases.ecore</foreignModel>
<genPackages prefix="SafetyCases" basePackage="org.fortiss.af3.safetycases" disposableProviderFactory="true"
ecorePackage="safetycases.ecore#/">
......@@ -47,16 +47,20 @@
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//Goal/safetyRequirement"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//Goal/toBeSupportedByContract"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//Goal/type"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//Goal/referencedByAwayGoals"/>
</genClasses>
<genClasses ecoreClass="safetycases.ecore#//Solution">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//Solution/status"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//Solution/safetyRequirement"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//Solution/referencedByAwaySolutions"/>
</genClasses>
<genClasses ecoreClass="safetycases.ecore#//Strategy">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//Strategy/toBeSupportedByContract"/>
</genClasses>
<genClasses ecoreClass="safetycases.ecore#//Assumption"/>
<genClasses ecoreClass="safetycases.ecore#//Context"/>
<genClasses ecoreClass="safetycases.ecore#//Context">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//Context/referencedByAwayContexts"/>
</genClasses>
<genClasses ecoreClass="safetycases.ecore#//Justification"/>
<genClasses ecoreClass="safetycases.ecore#//InContextOf"/>
<genClasses ecoreClass="safetycases.ecore#//SafetyCase">
......@@ -204,6 +208,12 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//ArgumentElement/defeatersOutruled"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//ArgumentElement/securityAssessmentWeight"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//ArgumentElement/weight"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//ArgumentElement/referencedStates"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//ArgumentElement/referencedPTA"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//ArgumentElement/referencedModes"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//ArgumentElement/referencedDeployments"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//ArgumentElement/referencedComponents"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference safetycases.ecore#//ArgumentElement/referencedRequirements"/>
<genOperations ecoreOperation="safetycases.ecore#//ArgumentElement/getContainerSafetyCase"
body="return (SafetyCase)getContainer().eContainer();"/>
<genOperations ecoreOperation="safetycases.ecore#//ArgumentElement/getModule"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment