- MigrateModel.changeComponentType(graph, elementToComponent(graph, resource), newComponentType);
+ Resource component = elementToComponent(graph, resource);
+ MigrateModel.changeComponentType(graph, component, newComponentType);
+
+ Layer0 L0 = Layer0.getInstance(graph);
+ Resource composite = graph.getPossibleObject(component, L0.PartOf);
+ if (composite == null)
+ return;
+ ModelingResources MOD = ModelingResources.getInstance(graph);
+ Resource diagram = graph.getPossibleObject(composite, MOD.CompositeToDiagram);
+ if (diagram == null)
+ return;
+ SWTUtils.asyncExec(menu, () -> DiagramEditor.reinitializeDiagram(diagram));