Enhancement
Major
Detail
Major
Detail
Detail
#26770
Model Editor: Error during further editing after deleting element
The reason is that a GraphPart does not remove its dependency to the graph when it is deleted.
The graph in the model editor is a tl:DefaultGraphModel which is itself a tl:SharedObjectData.
- The tl:DefaultGraphModel contains a mapping from subject object to the corresponding tl:GraphPart. This gives the developer quick access to the graph object using the tl:GraphModel and the subject object.
See the API getNode(businessObject) or getGraphPart(businessObject) in tl:DefaultGraphModel.
- The tl:SharedObjectData has a mapping to easily determine the referrers of certain properties (e.g. OWNER, LABEL_TYPE, PARENT, etc.) of a tl:SharedObjectData.
This mechanism is used to determine all nodes of a graph. In tl:DefaultGraphModel, in the API getNodes() are determined by {{#!java filterNodes(getReferrers(DefaultGraphPart.class, DefaultGraphPart.GRAPH))
}}}
retrieves all tl:GraphPart's that have the current graph (tl:GraphModel) as a value in their DefaultGraphPart.GRAPH property.
The set of referrers is cached and will not be updated, especially for the DefaultGraphPart. GRAPH property, if a tl:GraphPart is deleted from the graph.
Test
- Create a new module M.
- In M` create type `A with subtype B.
- Then delete B via detail view or in the graph itself.
- Drag the foreign type (e.g. Person) into the diagram.
- There must be no error message "Object already deleted".