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

feat(#268): remove the crutch related to InnerClasses attributes #301

Merged
Merged
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 @@ -113,26 +113,14 @@ private XmirEntry format(final XmirEntry entry) {
* The crutch should be removed after the original problem that requires
* the crutch is fixed.
* You can read more about the problem here: https://github.com/objectionary/eo/issues/3189
* @todo #226:30min Remove the crutch related to InnerClass.
* The crutch is used to fix the problem with incorrect XMIR generated by jeo-maven-plugin.
* It removes the name attribute from the InnerClass elements.
* The crutch should be removed after the original problem is fixed:
* https://github.com/objectionary/jeo-maven-plugin/issues/605
*/
private static XML format(final XML input) {
final Directives lines = new Directives()
.xpath(
"//o[@name='descriptor' or @name='visible' or (@base and not(@line) and not(@abstract))]"
).attr("line", "999");
final Directives inner = new Directives()
.xpath("//o[@name='InnerClass']")
.attr("base", "InnerClass")
.xpath("//o[@name='InnerClass']/@name")
.remove();
return new XMLDocument(
new Xembler(inner).applyQuietly(
new Xembler(lines).applyQuietly(input.node())
)
new Xembler(lines).applyQuietly(input.node())
);
}
}
Loading