Commit cf0a76b8 authored by Vivek Nigam's avatar Vivek Nigam
Browse files

<mira/safetycases> Safety Aspects



* Extracted variable
* changed to Yellow
* There is red code in it, but this seems to be from the master, i.e., I
do not think I changed that code.

Issue-Ref: 3418
Signed-off-by: Vivek Nigam's avatarVivek Nigam <nigam@fortiss.org>
parent fa2a3d63
......@@ -4,7 +4,7 @@ ConnectTheAwayEntity.java e77f604dc27f771f954f89420115a6964b9acb79 GREEN
ContextIsPrivate.java 4c50e601bb1e621943e4b17cb76bde870f6c3ea1 GREEN
DeleteAwayEntityReference.java ba9781d6c041be1c0a552a3f08271d99329347de GREEN
DeleteReference.java 07dec16de78fecc25664c2e8c4fe014230478ff2 GREEN
DeleteRequirementReference.java 6edaabf1137e77f32f00e01b5d5bf528a7f21335 RED
DeleteRequirementReference.java 6edaabf1137e77f32f00e01b5d5bf528a7f21335 YELLOW
ElementIsInstantiated.java 825edcd59646ece551f1d25ddf9aca3985abb16d GREEN
GenerateModuleConnections.java f406788dade34f78bc7d28538254799a7189d6f7 GREEN
GoToReferencedAF3Element.java 55655b084f1b10cb1f715ea77a2912b1370400da GREEN
......@@ -21,7 +21,7 @@ MakeAChoice.java fa998355a64ac4ee8aebe5161d44c0dcf90c6e21 GREEN
ReferenceGeneratedCode.java 4a77c98164eb5c9973d4324d23f8d3a58dea0252 GREEN
ReferenceMode.java 0e9f5c130968a692d5f3147c1614223a3c0857fe GREEN
ReferencePlatform.java d6f4c8606678e1e55c69ac23e9e2300d2cb9d764 GREEN
ReferenceRequirement.java 3d83ef6ccf3fa255183d78ff629ee1f7c22a9056 RED
ReferenceRequirement.java bef051b63bc2ebf918f6186984978fc04fc3427f YELLOW
ReferenceState.java 2b199d24aa66861726d6624dec3b63535f40fe30 GREEN
ReferenceTestCoverage.java 71949e8f46a257eaa680b52115fd3ff6513e71c5 GREEN
ReferenceTestSuite.java 3cb1da360d5459c8ec6ca791ec9da572fd6323ff GREEN
......
......@@ -39,6 +39,7 @@ import org.fortiss.af3.safetycases.model.Goal;
import org.fortiss.af3.safetycases.model.Solution;
import org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator;
import org.fortiss.af3.safetycases.ui.action.ConnectGoalToSafetyRequirementAction;
import org.fortiss.tooling.base.model.element.IModelElement;
import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.ui.extension.IContextMenuContributor;
import org.fortiss.tooling.kernel.ui.extension.data.ContextMenuContextProvider;
......@@ -142,11 +143,10 @@ public class ReferenceRequirement implements IContextMenuContributor {
selectedSolution.setName("Solution: " + sr.getName());
}
for(ExternalRelation er : sr.getExternalRelation()) {
// TODO(HP) the if condition is too long. Extract a variable.
if(er.getExternalRelationSpecification().getSpecificationOf() != null &&
er.getExternalRelationSpecification().getSpecificationOf() instanceof Component) {
selectedSolution.setAf3Element(er.getExternalRelationSpecification()
.getSpecificationOf());
IModelElement erSpecification =
er.getExternalRelationSpecification().getSpecificationOf();
if(erSpecification != null && erSpecification instanceof Component) {
selectedSolution.setAf3Element(erSpecification);
}
}
}
......
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