Skip to content

Commit

Permalink
ASTDiff: Single JavaDoc tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pouryafard75 committed Dec 11, 2024
1 parent 34b1180 commit 346da4c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,19 @@ private void processJavaDocs(Tree srcTree, Tree dstTree, UMLJavadoc srcUMLJavaDo
optimizationData.getSubtreeMappings().addMapping(srcTag, dstTag);
Tree srcTagName = findFirstByType(srcTag, Constants.TAG_NAME);
Tree dstTagName = findFirstByType(dstTag, Constants.TAG_NAME);
if (srcTagName != null && dstTagName != null)
if (srcTagName != null && dstTagName != null) {
if (srcTagName.isIsoStructuralTo(dstTagName))
optimizationData.getSubtreeMappings().addMapping(srcTagName, dstTagName);
}
else if (diff.getCommonTags().size() == 1) {
Tree srcTxtElement = findFirstByType(srcTag, Constants.TEXT_ELEMENT);
Tree dstTextElement = findFirstByType(dstTag, Constants.TEXT_ELEMENT);
if (srcTxtElement != null && dstTextElement != null) {
if (srcTxtElement.isIsoStructuralTo(dstTextElement))
optimizationData.getSubtreeMappings().addMapping(srcTxtElement, dstTextElement);
}
}

}
}
}
Expand Down

0 comments on commit 346da4c

Please sign in to comment.