highsource / jaxb2-basics

Useful plugins and tools for JAXB2.
BSD 2-Clause "Simplified" License
109 stars 54 forks source link

Boolean getters plugin #65

Closed highsource closed 11 months ago

highsource commented 8 years ago

http://jira.highsource.org/browse/JIIB-21

AndreasIgelCC commented 1 year ago

Is that plugin meant for fixing the common problem of public Boolean is Getters in JAXB-Gneration?

AndreasIgelCC commented 7 months ago

Is that plugin meant for fixing the common problem of public Boolean is Getters in JAXB-Gneration?

Hi @mattrpav and @highsource, you may have access to that jira-description. Does that close the failure of generated Getters of Booleans starting with "is"?

laurentschoelens commented 7 months ago

Hi @AndreasIgelCC The jira is sadly offline so we lose all data in it. My guess was this issue was related to taking the XJC plugins in org.andromda.thirdparty.jaxb2_commons inside jaxb2-basics.

One of the plugin was BooleanGetter plugin : which generate getXXX instead of isXXX method for boolean

Wiki documentation of that plugin is here

This plugin is available in v4.x of jaxb-tools, starting with 4.0.2

Do you need them in jaxb2-basics for jaxb2 ?

AndreasIgelCC commented 7 months ago

Currently we fix that with a search/replace script after generation of Java-Files. The generation of "public Boolean isField()" is an error, because default XML-Parsers get problems afterwards with that. So if you are able to fix that in jaxb2-basics too, that would be great! Or do I understand you correctly, when using jaxb-tools instead of jaxb2-basics we would be fine?

laurentschoelens commented 7 months ago

For jaxb 2.x, you could use the following :

<dependency>
    <groupId>org.andromda.thirdparty.jaxb2_commons</groupId>
    <artifactId>booleangetter</artifactId>
    <version>1.0</version>
</dependency>

For jaxb 4, you can use the org.jvnet.jaxb:jaxb-plugins from jaxb-tools. Tell me if you need more info about it

AndreasIgelCC commented 7 months ago

Thank you for the response and the hints. I will take that into project team and having a check on it.

laurentschoelens commented 7 months ago

Feel free to comment again when your investigations are done 😄

laurentschoelens commented 7 months ago

https://github.com/highsource/jaxb-tools/issues/460 will be backported in jaxb-tools v2 so will be available too with up-to-date versions when v2.x will be released