Commit 6985bb99 authored by Ferdinand Alexander Mehlan's avatar Ferdinand Alexander Mehlan
Browse files

add missing brackets in template

parent 90e3cea9
Pipeline #66111 passed with stage
in 1 minute and 1 second
...@@ -63,7 +63,7 @@ public class ${tagTypeName}SymbolCreator implements TagSymbolCreator { ...@@ -63,7 +63,7 @@ public class ${tagTypeName}SymbolCreator implements TagSymbolCreator {
for (ASTTag element : unit.getTagBody().getTagList()) { for (ASTTag element : unit.getTagBody().getTagList()) {
element.getTagElementList().stream() element.getTagElementList().stream()
.filter(t -> t.getName().equals("${tagTypeName}")) .filter(t -> t.getName().equals("${tagTypeName}"))
.filter(t -> t.isPresentTagValue) .filter(t -> t.isPresentTagValue())
.map(t -> matchRegexPattern(t.getTagValueOpt().get())) .map(t -> matchRegexPattern(t.getTagValueOpt().get()))
.filter(r -> r != null) .filter(r -> r != null)
.forEachOrdered(m -> .forEachOrdered(m ->
......
...@@ -66,7 +66,7 @@ public class ${tagTypeName}SymbolCreator implements TagSymbolCreator { ...@@ -66,7 +66,7 @@ public class ${tagTypeName}SymbolCreator implements TagSymbolCreator {
for (ASTTag element : unit.getTagBody().getTagList()) { for (ASTTag element : unit.getTagBody().getTagList()) {
element.getTagElementList().stream() element.getTagElementList().stream()
.filter(t -> t.getName().equals("${tagTypeName}")) .filter(t -> t.getName().equals("${tagTypeName}"))
.filter(t -> t.isPresentTagValue) .filter(t -> t.isPresentTagValue())
.map(t -> checkContent(t.getTagValueOpt().get())) .map(t -> checkContent(t.getTagValueOpt().get()))
.filter(r -> r != null) .filter(r -> r != null)
<#if isUnit> <#if isUnit>
......
...@@ -147,6 +147,7 @@ public class GeneratorTest { ...@@ -147,6 +147,7 @@ public class GeneratorTest {
TagSchemaGenerator generator = new TagSchemaGenerator(setup); TagSchemaGenerator generator = new TagSchemaGenerator(setup);
Map<String, String> symbolScopeMap = new LinkedHashMap<>(); Map<String, String> symbolScopeMap = new LinkedHashMap<>();
symbolScopeMap.put("CDType", "NameScope"); symbolScopeMap.put("CDType", "NameScope");
symbolScopeMap.put("OCLFile", "NameScope");
generator.generate(Paths.get("OCL2JavaTags"), Paths.get("src/test/resources/tags"), symbolScopeMap); generator.generate(Paths.get("OCL2JavaTags"), Paths.get("src/test/resources/tags"), symbolScopeMap);
} }
......
...@@ -53,7 +53,7 @@ public class SymbolNameSymbolCreator implements TagSymbolCreator { ...@@ -53,7 +53,7 @@ public class SymbolNameSymbolCreator implements TagSymbolCreator {
for (ASTTag element : unit.getTagBody().getTagList()) { for (ASTTag element : unit.getTagBody().getTagList()) {
element.getTagElementList().stream() element.getTagElementList().stream()
.filter(t -> t.getName().equals("SymbolName")) .filter(t -> t.getName().equals("SymbolName"))
.filter(t -> !t.getTagValueOpt().isPresent()) .filter(t -> t.isPresentTagValue())
.map(t -> checkContent(t.getTagValueOpt().get())) .map(t -> checkContent(t.getTagValueOpt().get()))
.filter(r -> r != null) .filter(r -> r != null)
.forEachOrdered(v -> .forEachOrdered(v ->
...@@ -76,7 +76,7 @@ public class SymbolNameSymbolCreator implements TagSymbolCreator { ...@@ -76,7 +76,7 @@ public class SymbolNameSymbolCreator implements TagSymbolCreator {
Log.enableFailQuick(false); Log.enableFailQuick(false);
long errorCount = Log.getErrorCount(); long errorCount = Log.getErrorCount();
ast = parser.parseStringTagValue(s); ast = parser.parse_StringStringTagValue(s);
Log.enableFailQuick(enableFailQuick); Log.enableFailQuick(enableFailQuick);
if (Log.getErrorCount() > errorCount) { if (Log.getErrorCount() > errorCount) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment