Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASTDiff #820

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ private void processFieldDeclarationByEnumConstantDiff(Tree srcTree, Tree dstTre
UMLAnonymousClassDiff anonymousClassDiff = umlEnumConstantDiff.getAnonymousClassDiff().get();
new AnonymousClassDiffMatcher(optimizationData, anonymousClassDiff).match(srcTree, dstTree, mappingStore);
}
new CommentMatcher(optimizationData, umlEnumConstantDiff.getCommentListDiff()).match(srcTree, dstTree, mappingStore);
}
}
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
Original file line number Diff line number Diff line change
Expand Up @@ -2253,6 +2253,17 @@
"secondPos" : 2895,
"firstEndPos" : 3426,
"secondEndPos" : 3035
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
"firstLabel" : "Makes sure the session is updated before calling the",
"secondLabel" : "Makes sure ",
"firstParentType" : "TagElement",
"secondParentType" : "TagElement",
"firstPos" : 3331,
"secondPos" : 2895,
"firstEndPos" : 3383,
"secondEndPos" : 2906
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
Expand Down Expand Up @@ -2484,6 +2495,17 @@
"secondPos" : 3203,
"firstEndPos" : 3681,
"secondEndPos" : 3343
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
"firstLabel" : "Makes sure the session is updated before calling the",
"secondLabel" : "Makes sure ",
"firstParentType" : "TagElement",
"secondParentType" : "TagElement",
"firstPos" : 3586,
"secondPos" : 3203,
"firstEndPos" : 3638,
"secondEndPos" : 3214
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
Expand Down Expand Up @@ -2770,6 +2792,17 @@
"secondPos" : 3528,
"firstEndPos" : 3955,
"secondEndPos" : 3671
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
"firstLabel" : "Makes sure the context is stored before calling the",
"secondLabel" : "Makes sure ",
"firstParentType" : "TagElement",
"secondParentType" : "TagElement",
"firstPos" : 3858,
"secondPos" : 3528,
"firstEndPos" : 3909,
"secondEndPos" : 3539
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
Expand Down Expand Up @@ -3012,6 +3045,17 @@
"secondPos" : 3860,
"firstEndPos" : 4271,
"secondEndPos" : 4053
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
"firstLabel" : "Makes sure the context is stored before calling <code>getOutputStream().close()</code> or",
"secondLabel" : "Makes sure ",
"firstParentType" : "TagElement",
"secondParentType" : "TagElement",
"firstPos" : 4136,
"secondPos" : 3860,
"firstEndPos" : 4225,
"secondEndPos" : 3871
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
Expand Down Expand Up @@ -3232,6 +3276,17 @@
"secondPos" : 4244,
"firstEndPos" : 4585,
"secondEndPos" : 4417
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
"firstLabel" : "Makes sure the context is stored before calling <code>getWriter().close()</code> or",
"secondLabel" : "Makes sure ",
"firstParentType" : "TagElement",
"secondParentType" : "TagElement",
"firstPos" : 4462,
"secondPos" : 4244,
"firstEndPos" : 4545,
"secondEndPos" : 4255
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
Expand Down Expand Up @@ -3452,6 +3507,17 @@
"secondPos" : 4580,
"firstEndPos" : 4844,
"secondEndPos" : 4722
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
"firstLabel" : "Makes sure the context is stored before calling the",
"secondLabel" : "Makes sure ",
"firstParentType" : "TagElement",
"secondParentType" : "TagElement",
"firstPos" : 4748,
"secondPos" : 4580,
"firstEndPos" : 4799,
"secondEndPos" : 4591
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1494,6 +1494,17 @@
"secondPos" : 2210,
"firstEndPos" : 2307,
"secondEndPos" : 2255
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
"firstLabel" : "Whether we're past the special first call to this.next() from",
"secondLabel" : "Whether loadInitialSchema() has been called. ",
"firstParentType" : "TagElement",
"secondParentType" : "TagElement",
"firstPos" : 2210,
"secondPos" : 2210,
"firstEndPos" : 2271,
"secondEndPos" : 2255
}, {
"firstType" : "Modifier",
"secondType" : "Modifier",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6400,6 +6400,17 @@
"secondPos" : 8466,
"firstEndPos" : 5882,
"secondEndPos" : 8822
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
"firstLabel" : "Serialization method. Suppresses serialization of redundant information that's already",
"secondLabel" : "Serialization method used by java serialization.",
"firstParentType" : "TagElement",
"secondParentType" : "TagElement",
"firstPos" : 5765,
"secondPos" : 8466,
"firstEndPos" : 5851,
"secondEndPos" : 8514
}, {
"firstType" : "TextElement",
"secondType" : "TextElement",
Expand Down
Loading