Deleting Objects From the Repository

This section details the necessary steps to delete an object. You can delete a module, interface, operation, parameter, struct, or element. After deletion, the object is gone. There is not a recycle bin in the Contract Repository, so if you inadvertently delete an object you must create a new one to replace it.

You cannot automatically delete an object that is dependent on (or used by) another object. If you attempt to delete an object that is in use in the Contract Repository, you receive an Alert message. The Alert message shows where the object is being used. When you click OK, the Alert window closes. So, before you close the Alert window, you may want to note where the object is being used. You cannot delete the object until you remove the dependency.

A module is the only object that does not have any dependencies.

Deleting Instructions

To delete an object:

  1. Select the object to be deleted from the main window.

  2. Choose Edit -> Delete from the menu bar

    Or

    Click on the Delete toolbar button.

  3. To confirm that you want to delete the object, the dialog box, "Do you really want to delete <name of the object>?" displays.

    Figure 3-27 Delete Module Window

  4. Click OK to delete. Click Cancel to return to the previous window.

  5. If there is a dependency, the Alert window displays. If you still want to delete the object, refer to the Alert window shown in Figure 3-28 for the dependencies.

    Figure 3-28 Alert Window with Dependency Information

  6. In this example, the object, ADDRESS element, cannot be deleted because it is referenced by (or is dependent on) the OPEN_ACCT operation. If you wish to delete the object, you must remove the dependency by modifying the OPEN_ACCT operation. In this case, you would need to remove the ADDRESS element from OPEN_ACCT before proceeding with the delete. If you have to remove a parameter, modify the operation and delete it using the Modify Operation window.

    For additional information, refer to the Modifying Objects section in this chapter.