I write a plugin that add a new field to the class, now I want add code too my
plugin when adding this field ,also add their annotations , because if thier
annotation isnt added ,The marshalling process doesnt add this new field .
I,m successful about @XmlElementRefs but no about @XmlType.
I add this code to my plugin but it adds a new @XmlType ,
that I dont need new @XmlType , I need to add a new Item to
proporder of available @XmlType .
my code is here :
private void addPropOrder(CPropertyInfo p, ClassOutline classOutline, JFieldVar
$field) {
XmlTypeWriter xtw = classOutline.implClass.annotate2(XmlTypeWriter.class);
if (p instanceof CReferencePropertyInfo) {
xtw.propOrder($field.name());
}
}
and result of this code is :
@XmlType(name = "ProcessSpecificationType", propOrder = {
"documentation",
"attributeSubstitution",
"externalRoles",
"signal",
"variable",
"packageOrBusinessDocumentOrBusinessTransactionHead"
})
@XmlType(propOrder = {
"choiceOrGroupSemanticallyPreservedPackageOrBusinessDocumentOrBusinessTransactio\
nHead"
})
that I nedd this result :
@XmlType(name = "ProcessSpecificationType", propOrder = {
"documentation",
"attributeSubstitution",
"externalRoles",
"signal",
"variable",
"packageOrBusinessDocumentOrBusinessTransactionHead",
"choiceOrGroupSemanticallyPreservedPackageOrBusinessDocumentOrBusinessTransactio\
nHead"
})