diff options
author | jmisinco | 2012-01-04 20:24:50 +0000 |
---|---|---|
committer | Roberto E. Escobar | 2012-01-04 20:24:50 +0000 |
commit | 8e3a6f247c7c465f38337095cb4f7e9d969da58c (patch) | |
tree | a0ad824a198280ed1cad377200ff679822842dd4 | |
parent | e455d1fe412f748e036a8049457f85f9410fc2f7 (diff) | |
download | org.eclipse.osee-8e3a6f247c7c465f38337095cb4f7e9d969da58c.tar.gz org.eclipse.osee-8e3a6f247c7c465f38337095cb4f7e9d969da58c.tar.xz org.eclipse.osee-8e3a6f247c7c465f38337095cb4f7e9d969da58c.zip |
refactor: Improve error message for test trace files not found
2 files changed, 6 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/jobs/FindTraceUnitJob.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/jobs/FindTraceUnitJob.java index 705b9476b95..9120476128b 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/jobs/FindTraceUnitJob.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/jobs/FindTraceUnitJob.java @@ -55,9 +55,7 @@ public class FindTraceUnitJob extends Job { @Override public IStatus run(IProgressMonitor monitor) throws Exception { - if (branch != null) { - FindTraceUnitFromResource.search(branch, resources); - } + FindTraceUnitFromResource.search(branch, resources); return Status.OK_STATUS; } }; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java index bef0384ad4e..80764224e97 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java @@ -105,7 +105,10 @@ public final class FindTraceUnitFromResource { for (ResourceIdentifier resource : items) { try { if (GUID.isValid(resource.getGuid())) { - artifacts.add(ArtifactQuery.checkArtifactFromId(resource.getGuid(), branch)); + Artifact checkArtifactFromId = ArtifactQuery.checkArtifactFromId(resource.getGuid(), branch); + if (checkArtifactFromId != null) { + artifacts.add(checkArtifactFromId); + } } else { artifacts.addAll(ArtifactQuery.getArtifactListFromTypeAndName(artifactType, resource.getName(), branch)); @@ -121,7 +124,7 @@ public final class FindTraceUnitFromResource { openArtifacts(artifacts); } else { AWorkbench.popup("Find Trace Unit from Resource", - String.format("Unable to find trace for: %s", Arrays.deepToString(resources))); + String.format("Unable to find trace for: %s on branch [%s]", Arrays.deepToString(resources), branch)); } } else { AWorkbench.popup("Find Trace Unit from Resource", |