use of org.eclipse.gmf.runtime.diagram.core.commands.AddCommand in project statecharts by Yakindu.
the class CompartmentLayoutEditPolicy method createAddCommand.
@Override
protected Command createAddCommand(EditPart child, EditPart after) {
int index = getHost().getChildren().indexOf(after);
TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
AddCommand command = new CompartmentAddCommand(editingDomain, new EObjectAdapter((View) getHost().getModel()), new EObjectAdapter((View) child.getModel()), index);
return new ICommandProxy(command);
}
Aggregations