1

I need to modify the code generated by Faktor-IPS. I've seen the extension property "org.faktorips.devtools.core.artefactbuilderset" and created a class extending the StandardBuilderSet.

I created my own builder (MetaattributPolicyCmptClassBuilder) and extended the default implementation by putting my implementation in the builder map as shown below:


    @Override
    protected LinkedHashMap<IBuilderKindId, IIpsArtefactBuilder> createBuilders() throws CoreException {
        LinkedHashMap<IBuilderKindId, IIpsArtefactBuilder> builders = super.createBuilders();
        
        builders.put(BuilderKindIds.POLICY_CMPT_TYPE_IMPLEMEMENTATION, new MetaattributPolicyCmptClassBuilder(false, this, getGeneratorModelContext(), getModelService()));
        
        return builders;
    }

    
}

I would expect my custom code (put in the list of builders in the example above) to be executed, but only the code of the standard builder set is executed. What is wrong or what else has to be done to get this to work?

hd42
  • 1,741
  • 15
  • 30
Thorsten
  • 93
  • 8
  • @SamuelLiew Could you please re-open the question? I (and hd42) edited the question to make it more clear. If it is not clear enough yet, could you please provide some hints what you would expect in addition? – Thorsten Dec 16 '20 at 07:28

1 Answers1

1

To let your project use your custom builder, set the builder set ID in the .ipsproject file using the XMl tag instead of the "org.faktorips.devtools.stdbuilder.ipsstdbuilderset"

hd42
  • 1,741
  • 15
  • 30