Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen J. Molaro2019-09-09 21:29:54 +0000
committerStephen J. Molaro2019-09-10 17:49:50 +0000
commitb267ac5cadef997cd29357ce30ba28a0bb10f525 (patch)
treec7b0547036dc4c4814d31594dfec1f92008e82a3
parent3d9272143ff528b961ef97f2ff2d2e76201e454c (diff)
downloadorg.eclipse.osee-b267ac5cadef997cd29357ce30ba28a0bb10f525.tar.gz
org.eclipse.osee-b267ac5cadef997cd29357ce30ba28a0bb10f525.tar.xz
org.eclipse.osee-b267ac5cadef997cd29357ce30ba28a0bb10f525.zip
bug[TW14983]: Allow Dispo to import files with .P[ATH] extension
Change-Id: If3258e45422245a0ca1f38d1353af998dd48f78a Signed-off-by: Stephen J. Molaro <stephen.j.molaro@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java23
1 files changed, 21 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
index f67a7e83cb5..7e8b8d4d23a 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
@@ -460,13 +460,32 @@ public class LisFileParser implements DispoImporterApi {
File resultsFile = new File(resultPathAbs);
if (!resultsFile.exists()) {
boolean fileExists = findAndProcessResultFile(resultsFile, resultPath, report);
-
if (!fileExists) {
- report.addEntry("SQL", String.format("Could not find DAT file [%s]", resultPathAbs), WARNING);
+ if (!onProcessResultsFail(result, report, "PATH")) {
+ report.addEntry("SQL", String.format("Could not find DAT file [%s]", resultPathAbs), WARNING);
+ }
+ }
+ } else {
+ process(report, resultPath, resultsFile);
+ }
+ }
+
+ private boolean onProcessResultsFail(VCastResult result, OperationReport report, String pathExtension) throws Exception {
+ String resultPath = result.getPath() + "." + pathExtension;
+ String resultPathAbs = vCastDir + File.separator + resultPath;
+ File resultsFile = new File(resultPathAbs);
+ boolean fileExists = false;
+ if (!resultsFile.exists()) {
+ fileExists = findAndProcessResultFile(resultsFile, resultPath, report);
+ if (pathExtension.length() > 1 && !fileExists) {
+ fileExists = onProcessResultsFail(result, report, pathExtension.substring(0, pathExtension.length() - 1));
}
} else {
process(report, resultPath, resultsFile);
+ fileExists = true;
}
+
+ return fileExists;
}
private boolean findAndProcessResultFile(File resultsFile, String resultPath, OperationReport report) {

Back to the top