-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tagging-repos' into 'dev'
Tagging Repository Closes #3665 See merge request monticore/monticore!908
- Loading branch information
Showing
21 changed files
with
564 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
monticore-generator/src/main/resources/tagging/itagger/GetTags.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<#-- (c) https://github.com/MontiCore/monticore --> | ||
${tc.signature("clazzname")} | ||
return ${clazzname}.getInstance().getTags(model, astTagUnit); | ||
return ${clazzname}.getInstance().getTags(model, astTagUnits); |
3 changes: 3 additions & 0 deletions
3
monticore-generator/src/main/resources/tagging/itagger/GetTagsFromRepo.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<#-- (c) https://github.com/MontiCore/monticore --> | ||
${tc.signature("clazzname")} | ||
return ${clazzname}.getInstance().getTags(model, TagRepository.getLoadedTagUnits()); |
13 changes: 13 additions & 0 deletions
13
monticore-generator/src/main/resources/tagging/tagger/AddTagSymbol.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<#-- (c) https://github.com/MontiCore/monticore --> | ||
${tc.signature("prodname", "grammarname", "package")} | ||
<#-- isSymbol: true for symbols --> | ||
astTagUnit.addTags( | ||
TagsMill.targetElementBuilder() | ||
.addModelElementIdentifier( | ||
TagsMill.defaultIdentBuilder().setMCQualifiedName( | ||
TagsMill.mCQualifiedNameBuilder().setPartsList(de.se_rwth.commons.Splitters.QUALIFIED_NAME_DELIMITERS.splitToList(symbol.getFullName())).build() | ||
).build() | ||
) | ||
.addTag(astTag) | ||
.build() | ||
); |
4 changes: 1 addition & 3 deletions
4
monticore-generator/src/main/resources/tagging/tagger/GetArtifactScope.ftl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
<#-- (c) https://github.com/MontiCore/monticore --> | ||
${tc.signature("millname")} | ||
// While we could use instanceof, we instead use the semantic knowledge, that artifact scopes are subscopes of a global scope | ||
List globalChildren = ${millname}.globalScope().getSubScopes(); | ||
while (!(globalChildren.contains(s))) { | ||
while (!(s instanceof de.monticore.symboltable.IArtifactScope)) { | ||
s = s.getEnclosingScope(); | ||
} | ||
return s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.