Merging Code

BusinessWorks Plug-in Development Kit regenerates the source code, and merges the added business logic to the source code when editing a plug-in.

Before editing the plug-in, ensure that you add your own code between the //begin-custom-code tag and the //end-custom-code tag. Otherwise, the added business logic is deleted when regenerating the source code.

Note: The custom tags are settled. You cannot add new custom tags and the code in the new custom tag cannot be merged.
For example, if you add your logic as follows, the added code is deleted after regenerating the code.
public EObject createInstance() {
        Get activity = Example2Factory.eINSTANCE.createGet();
        activity.setAttrName("b");
        return activity;

You have to add your logic between the //begin-custom-code tag and the //end-custom-code tag as follows:

 public EObject createInstance() {
        Get activity = Example2Factory.eINSTANCE.createGet();
        // begin-custom-code
        activity.setAttrName("b");
        // end-custom-code
        return activity;