Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Guss2018-06-04 13:48:00 -0400
committerRyan Brooks2018-07-10 14:05:22 -0400
commitf1bfdf16c70e54ed360395dea3e85001bb8ff762 (patch)
tree7bdf195e3d3a380cc8ec9558ad1ab0a59f8d38f7
parent4abb46a66563d9ffb5a9c7f5bac92b0c99e19f42 (diff)
downloadorg.eclipse.osee-f1bfdf16c70e54ed360395dea3e85001bb8ff762.tar.gz
org.eclipse.osee-f1bfdf16c70e54ed360395dea3e85001bb8ff762.tar.xz
org.eclipse.osee-f1bfdf16c70e54ed360395dea3e85001bb8ff762.zip
bug[ats_TW9630]: Markings in PUBLISH not correct
Change-Id: Id49b2f2693564e7423b4e9e83ac4a43d7b11c6d3 Signed-off-by: Dominic Guss <Dominic.Guss@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java22
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java8
2 files changed, 24 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
index 0b9c9d737e..aa7cd8e4c7 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java
@@ -34,6 +34,7 @@ import org.eclipse.osee.framework.core.data.AttributeId;
import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.AttributeTypeToken;
import org.eclipse.osee.framework.core.data.BranchId;
+import org.eclipse.osee.framework.core.data.IArtifactType;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.data.IRelationType;
import org.eclipse.osee.framework.core.data.RelationTypeSide;
@@ -395,7 +396,7 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
return getRelatedArtifacts(Default_Hierarchical__Child, deletionFlag);
}
- public final List<Artifact> getDescendants(DeletionFlag includeDeleted) throws OseeCoreException {
+ public final List<Artifact> getDescendants(DeletionFlag includeDeleted) {
List<Artifact> descendants = new LinkedList<>();
getDescendants(descendants, includeDeleted);
return descendants;
@@ -410,13 +411,28 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
return descendants;
}
- private void getDescendants(Collection<Artifact> descendants, DeletionFlag includeDeleted) throws OseeCoreException {
+ public final List<Artifact> getDescendants(IArtifactType[] excludedArtifacts) {
+ List<Artifact> descendants = new LinkedList<>();
+ getDescendants(descendants, excludedArtifacts, DeletionFlag.EXCLUDE_DELETED);
+ return descendants;
+ }
+
+ private void getDescendants(Collection<Artifact> descendants, DeletionFlag includeDeleted) {
for (Artifact child : getChildren(includeDeleted)) {
descendants.add(child);
child.getDescendants(descendants, includeDeleted);
}
}
+ private void getDescendants(Collection<Artifact> descendants, IArtifactType[] excludedArtifacts, DeletionFlag includeDeleted) {
+ for (Artifact child : getChildren(includeDeleted)) {
+ if (!child.isOfType(excludedArtifacts)) {
+ descendants.add(child);
+ child.getDescendants(descendants, excludedArtifacts, includeDeleted);
+ }
+ }
+ }
+
public List<Artifact> getDescendantsWithArtTypes(Collection<ArtifactType> descendantTypes) throws OseeCoreException {
List<Artifact> descendants = new LinkedList<>();
for (Artifact child : getChildren()) {
@@ -1777,4 +1793,4 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
public ArtifactToken getHashableToken() {
return ArtifactToken.valueOf(getId(), getBranch());
}
-} \ No newline at end of file
+}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java
index 442990bc9b..7d7a698146 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java
@@ -165,7 +165,7 @@ public class WordTemplateProcessor {
private CharSequence paragraphNumber = null;
private final DataRightInput request;
private final DataRightProvider provider;
- private IArtifactType[] excludeArtifactTypes;
+ private IArtifactType[] excludeArtifactTypes = {};
private HashMap<ApplicabilityId, ApplicabilityToken> applicabilityTokens;
private HashMap<ArtifactId, ArtifactId> artifactsToExclude;
@@ -667,9 +667,11 @@ public class WordTemplateProcessor {
if (recurseChildren || (renderer.getBooleanOption(
RECURSE_ON_LOAD) && !renderer.getBooleanOption("Orig Publish As Diff"))) {
for (Artifact art : artifacts) {
- allArtifacts.add(art);
+ if (!art.isOfType(excludeArtifactTypes)) {
+ allArtifacts.add(art);
+ }
if (!art.isHistorical()) {
- allArtifacts.addAll(art.getDescendants());
+ allArtifacts.addAll(art.getDescendants(excludeArtifactTypes));
}
}
} else {

Back to the top