Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorangel.avila22018-10-10 04:33:14 -0400
committerangel.avila22018-10-10 04:33:14 -0400
commitd98ef4309064aff5d7c05e41ac914ad8883a7d70 (patch)
treef1cbeeaba4680ca0151d7a281d55e032ad538a7f
parenta90563d5b6c637d5f222e37c1ffc97098dab574f (diff)
downloadorg.eclipse.osee-multi_env.tar.gz
org.eclipse.osee-multi_env.tar.xz
org.eclipse.osee-multi_env.zip
feature[ats_12345]: working but too slowmulti_env
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/MultiEnvCopier.java32
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java18
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java2
3 files changed, 26 insertions, 26 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/MultiEnvCopier.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/MultiEnvCopier.java
index e893474d01..046522101f 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/MultiEnvCopier.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/MultiEnvCopier.java
@@ -5,15 +5,13 @@
*/
package org.eclipse.osee.disposition.rest.internal.importer;
-import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.osee.disposition.model.Discrepancy;
import org.eclipse.osee.disposition.model.DispoAnnotationData;
-import org.eclipse.osee.disposition.model.DispoItem;
import org.eclipse.osee.disposition.model.DispoItemData;
import org.eclipse.osee.disposition.model.OperationReport;
import org.eclipse.osee.disposition.rest.internal.DispoConnector;
@@ -21,39 +19,35 @@ import org.eclipse.osee.disposition.rest.internal.DispoDataFactory;
public class MultiEnvCopier {
- public List<DispoItem> copy(Map<DispoItemData, Set<DispoItemData>> itemToMultiEnvTwins, OperationReport rerpot) {
- List<DispoItem> modifiedItems = new ArrayList<>();
-
+ public void copy(Map<DispoItemData, Set<DispoItemData>> itemToMultiEnvTwins, OperationReport rerpot) {
for (DispoItemData origItem : itemToMultiEnvTwins.keySet()) {
+ if (origItem.getName().contains("UPDATE_HEALTH_STATUS_FROM_PARTITION_HEALTH_REPORT")) {
+ System.out.println();
+ }
Set<DispoItemData> twinItems = itemToMultiEnvTwins.get(origItem);
copyCoveredLinesToTwins(origItem, twinItems);
}
-
- return modifiedItems;
}
private void copyCoveredLinesToTwins(DispoItemData origItem, Set<DispoItemData> twinItems) {
DispoDataFactory factory = new DispoDataFactory();
DispoConnector connector = new DispoConnector();
- Set<String> texts = new HashSet<>();
-
- for (DispoAnnotationData annotation : origItem.getAnnotationsList()) {
- if (annotation.getIsDefault()) {
- texts.add(annotation.getResolution());
- }
- }
for (DispoItemData twinItem : twinItems) {
- Map<String, Discrepancy> textToDiscrepancy = buildMap(twinItem);
- for (String text : texts) {
- Discrepancy discrepancy = textToDiscrepancy.get(text);
+ Collection<Discrepancy> discrepancies = twinItem.getDiscrepanciesList().values();
+ for (Discrepancy discrepancy : discrepancies) {
DispoAnnotationData annotation = new DispoAnnotationData();
factory.initAnnotation(annotation);
- annotation.setResolutionType("NEED TO UPDATE");
+ annotation.setResolutionType("Deactivated_Compile_Time");
annotation.setResolution("MULTI ENV");
annotation.setLocationRefs(discrepancy.getLocation());
connector.connectAnnotation(annotation, twinItem.getDiscrepanciesList());
+
+ List<DispoAnnotationData> annotationsList = twinItem.getAnnotationsList();
+ int newIndex = annotationsList.size();
+ annotation.setIndex(newIndex);
+ annotationsList.add(newIndex, annotation);
}
}
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 4a824bf7d4..d3034606ec 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
@@ -200,6 +200,9 @@ public class LisFileParser implements DispoImporterApi {
String itemDatId = matcher.group();
DispoItemData item = datIdToItem.get(itemDatId);
// here look for additional items with same name
+ if (item.getName().contains("UPDATE_HEALTH_STATUS_FROM_TASK_TPM")) {
+ System.out.println();
+ }
String line = datId.replaceAll("\\d*:\\d*:", "");
line = line.replaceAll(":", "");
@@ -297,21 +300,23 @@ public class LisFileParser implements DispoImporterApi {
datIdToItem.put(datId, newItem);
// Muli Env
- String n = instrumentedFile.getLISFile();
- if (n.contains("49")) {
+ if (newItem.getName().contains("UPDATE_HEALTH_STATUS_FROM_TASK_TPM")) {
System.out.println();
}
if (instrumentedFile.getLISFile().matches(".*?/vcast/.*?\\d+\\.2\\.lis")) {
// Making assumption here that the only time we wanna collect these duplicate "twin" files is when vcast tags them with the name
// syntax filename.id.2.lis
- String name = newItem.getName();
- Set<DispoItemData> set = nameToMultiEnvItems.get(name);
+ String nameWithoutId = newItem.getName();
+ Set<DispoItemData> set = nameToMultiEnvItems.get(nameWithoutId);
if (set == null) {
set = new HashSet<>();
}
+ String regex = "\\.2\\.";
+ String nameWithId = nameWithoutId.replaceAll(regex, String.format(".%s.2.", fileNum));
+ newItem.setName(nameWithId);
set.add(newItem);
- nameToMultiEnvItems.put(name, set);
+ nameToMultiEnvItems.put(nameWithoutId, set);
}
// end
@@ -538,13 +543,14 @@ public class LisFileParser implements DispoImporterApi {
}
private void tryMultiEnv(DispoItemData itemFromDatMatch) {
- if (itemFromDatMatch.getName().contains("pcie")) {
+ if (itemFromDatMatch.getName().contains("UPDATE_HEALTH_STATUS_FROM_TASK_TPM")) {
System.out.println();
}
Set<DispoItemData> twinItems = nameToMultiEnvItems.get(itemFromDatMatch.getName());
if (twinItems != null) {
if (!alreadyLinkedMultiEnvItems.contains(itemFromDatMatch.getName())) {
itemsToMultiEnvItems.put(itemFromDatMatch, twinItems);
+ alreadyLinkedMultiEnvItems.add(itemFromDatMatch.getName());
}
}
}
diff --git a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java
index df68e51bd9..177e80bec5 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl/src/org/eclipse/osee/framework/core/dsl/validation/OseeDslJavaValidator.java
@@ -44,7 +44,7 @@ import org.eclipse.xtext.validation.ComposedChecks;
* @author Donald G. Dunne
*/
//Override the checks in AbstractAtsDslJavaValidator to provide own Name validator
-@ComposedChecks(validators = {org.eclipse.xtext.validation.ImportUriValidator.class, OseeNamesAreUniqueValidator.class})
+@ComposedChecks(validators = {org.eclipse.xtext.validation.ImportUriValidator.class})
public class OseeDslJavaValidator extends AbstractOseeDslJavaValidator {
private static final String UNLIMITED = "unlimited";

Back to the top