Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java')
-rw-r--r--plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java
index d8d0971de27..34c7a126c01 100644
--- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java
+++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexer.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.orcs.core.internal.types.impl;
+import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Collection;
import java.util.Collections;
@@ -82,6 +83,7 @@ public class OrcsTypesIndexer {
InputStream inputStream = null;
try {
inputStream = source.getContent();
+ inputStream = upConvertTo17(inputStream);
resource = OseeDslResourceUtil.loadModel(source.getLocation().toASCIIString(), inputStream);
} finally {
Lib.close(inputStream);
@@ -130,6 +132,14 @@ public class OrcsTypesIndexer {
return index;
}
+ private InputStream upConvertTo17(InputStream inputStream) throws Exception {
+ String typesStr = Lib.inputStreamToString(inputStream);
+ typesStr = typesStr.replaceAll("branchGuid \"AyH_fAj8lhQGmQw2iBAA\"", "branchUuid 423");
+ typesStr = typesStr.replaceAll("branchGuid \"AyH_e5wAblOqTdLkxqQA\"", "branchUuid 714");
+ typesStr = typesStr.replaceAll("branchGuid \"GyoL_rFqqBYbOcuGYzQA\"", "branchUuid 4312");
+ return new ByteArrayInputStream(typesStr.getBytes("UTF-8"));
+ }
+
private void indexSuperTypes(ArtifactTypeIndex artifactTypeIndex, IArtifactType token, XArtifactType dslType) throws OseeCoreException {
Set<IArtifactType> tokenSuperTypes = Sets.newLinkedHashSet();
for (XArtifactType superTypes : dslType.getSuperArtifactTypes()) {
@@ -228,9 +238,11 @@ public class OrcsTypesIndexer {
private IOseeBranch getAttributeBranch(XAttributeTypeRef xAttributeTypeRef) {
IOseeBranch branchToken = CoreBranches.SYSTEM_ROOT;
- String branchGuid = xAttributeTypeRef.getBranchGuid();
- if (branchGuid != null) {
- branchToken = TokenFactory.createBranch(branchGuid, branchGuid);
+ if (Strings.isValid(xAttributeTypeRef.getBranchUuid())) {
+ long branchUuid = Long.valueOf(xAttributeTypeRef.getBranchUuid());
+ if (branchUuid > 0) {
+ branchToken = TokenFactory.createBranch(branchUuid, String.valueOf(branchUuid));
+ }
}
return branchToken;
}

Back to the top