

Domain-specific diagram editor building environments nowadays as a rule involve some usage of metamodels. However normally the metamodel alone is not sufficient to define an editor. Frequently the metamodel just defines the abstract syntax of the domain, mappings or transformations are required to define the editor functionality for diagram building. Another approach [8] is based on a fixed type metamodel describing the possible diagram elements, there an editor definition consists of an instance of this metamodel to be executed by an engine. However there typically a number of functionality extensions in a transformation language is required. The paper offers a new approach based on metamodel specialization – by just creating subclasses. First the permitted metamodel specialization based on standard UML class diagrams and OCL is precisely defined. A universal metamodel and an associated universal engine for the diagram editor domain is described, then it is shown how a specific editor definition can be obtained by specializing this metamodel. Examples of a flowchart editor and UML class diagram editor are given.