summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2017-12-18 16:04:05 -0500
committerDavid W. Miller2017-12-18 16:04:05 -0500
commit8cdce434d14c654c2240df67df51c6a63b4b0fcb (patch)
treec9f686c082da3c6668d5f2419357483cea22aa34
parent269f5c54032461638ee1a0850e998b8170c7c2b4 (diff)
downloadorg.eclipse.osee-8cdce434d14c654c2240df67df51c6a63b4b0fcb.tar.gz
org.eclipse.osee-8cdce434d14c654c2240df67df51c6a63b4b0fcb.tar.xz
org.eclipse.osee-8cdce434d14c654c2240df67df51c6a63b4b0fcb.zip
bug[ats_TW3601]: Fix Artifact Explorer relation side display
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java16
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java
index 65ea54dc05..f39ee5a46f 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/ArtifactExplorerLinkNode.java
@@ -12,10 +12,11 @@ package org.eclipse.osee.framework.ui.skynet.explorer;
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.osee.framework.core.data.RelationTypeSide;
import org.eclipse.osee.framework.core.enums.DeletionFlag;
+import org.eclipse.osee.framework.core.enums.RelationSide;
import org.eclipse.osee.framework.core.model.type.RelationType;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
-import org.eclipse.osee.framework.skynet.core.relation.RelationLink;
/**
* @author Robert A. Fisher
@@ -91,16 +92,9 @@ public class ArtifactExplorerLinkNode {
public List<Artifact> getOppositeArtifacts() {
List<Artifact> oppositeArtifacts = new ArrayList<>();
- for (RelationLink link : artifact.getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) {
- if (link.getRelationType().getName().equals(relationTypeName)) {
- if (link.getAArtifactId() == artifactId) {
- oppositeArtifacts.add(link.getArtifactB());
- } else {
- oppositeArtifacts.add(link.getArtifactA());
-
- }
- }
- }
+ RelationTypeSide relationSide =
+ new RelationTypeSide(relationType, parentIsOnSideA ? RelationSide.SIDE_B : RelationSide.SIDE_A);
+ oppositeArtifacts.addAll(artifact.getRelatedArtifacts(relationSide, DeletionFlag.EXCLUDE_DELETED));
return oppositeArtifacts;
}