@IpsEnumId removed by IPS-Generator, even though I annotated method with @customziedAnnotations ADDED

39 Views Asked by At

I'd like to annotate a getter-method with @IpsEnumId(enumType = MyEnum.class).

As I know from Annotations are removed by Faktor-IPS Code Generator, I tried to add a Java-Doc-Line @customizedAnnotations ADDED. But that does not work. My annotation line disappears after a rebuild.

What can I do?

1

There are 1 best solutions below

0
On

All annotations starting with @Ips are treated by the code generator as its own and are not affected by @customizedAnnotations. You can tell Faktor-IPS to always keep an annotation you manually added in the .ipsproject file with the line <Property name="retainAnnotations" value="IpsEnumId"/> in the <IpsArtefactBuilderSetConfig> section.