Skip to content

Commit

Permalink
feat(objectionary#268): remove the crutch related to InnerClasses att…
Browse files Browse the repository at this point in the history
…ributes
  • Loading branch information
volodya-lombrozo committed Jun 7, 2024
1 parent 5d1f0ad commit 5252996
Showing 1 changed file with 1 addition and 13 deletions.
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())
);
}
}

0 comments on commit 5252996

Please sign in to comment.