Show in Frame No Frame
Up Previous Next Title Page Index Contents Search

2.5 Deleting types

The Type Manager is a tool for exporting modeling language specifications, and deleting no longer needed parts of metamodels. Here we focus on deleting types, which requires system administrator rights: exporting types is available to all users and is covered in the MetaEdit+ Workbench User’s Guide.

Deletion of metamodels or parts of metamodels — types — that you do not need reduces the size of your repository and thus improves speed, in particular the time taken to open a project. This permanent removal is in addition to the removal of types that can be done from the Types Browser with Remove Type...: removing a type in that way only removes it from most system dialogs, and it remains in the repository, and can be salvaged at any time. Type deletion with Type Manager, on the other hand, is a once and for all deletion operation, and as such we advise taking a backup of your repository before performing type deletion.

The Type Manager can be opened from the main Launcher by choosing Metamodel | Type Manager. The Type Manager shows all the Graph types and their component types in currently open areas. You can see the Graph types on the left, and expand the display with the check box underneath the list to show all the subtypes of those Graph types. The Type Manager works on the principle that the user can be sure what Graph types he needs, but may be mistaken in thinking that a given Object or Property type is not needed: that type may in fact be used in some complex way from another type that he does want.

In the list on the left in the Type Manager you choose all the Graph types that you want (initially all are chosen), and press the ‘→’ button. MetaEdit+ calculates the dependencies between types: this involves loading all those types, so will take a while the first time. The list on the right then shows all the types in the open areas, with a check mark if they are required by the Graph types you have selected on the left. Types in the list on the right that have no check mark will be deleted when you press the Delete Unselected Types button.

Before deleting types, make sure that the Graph types unchecked in the left list are also unchecked in the right list. If a Graph type that you thought would be deleted is still checked in the right list, you can choose Show Type Users... from its pop-up menu in the right list, and will see which types you have chosen to keep still refer to it. Most often, they will refer to it by explosion or decomposition links, and you may want to remove these links from the chosen types, to allow this unwanted Graph type to be deleted.

You can use the Type Manager freely to look at types and their dependencies, without deleting anything. When you want to delete, you should make sure that you have all projects open, and you must be the only logged in user.

All instance Graphs whose types are to be deleted will be removed, and explode or decompose links to those Graphs will be removed. Under normal circumstances, this will ensure that there are no instances left in the repository of types that are to be deleted. You are however responsible for making sure that no other instances of types to be deleted exist. This problem occurs most often with object types previously in a Graph type, but now removed: as no Graph type refers to that object type, it would be deleted, but it may still have instances in Graphs made when that object type was legal.

The types will then be deleted in two phases, with a transaction commit at the end of each phase. You will then be prompted to exit and restart MetaEdit+, to ensure that no references to the deleted types are present in your image, and to perform a repository Garbage Collect (Section 2.3.2), which will reclaim the space occupied by the deleted types.



Show in Frame No Frame
Up Previous Next Title Page Index Contents Search