use of org.eclipse.sirius.business.api.dialect.command.CreateRepresentationCommand in project Palladio-Editors-Sirius by PalladioSimulator.
the class SiriusCustomUtil method createRepresentation.
public static DRepresentation createRepresentation(Session session, String representationName, RepresentationDescription description, EObject semantic, IProgressMonitor monitor) {
TransactionalEditingDomain domain = session.getTransactionalEditingDomain();
final CreateRepresentationCommand createRepresentationCommand = new CreateRepresentationCommand(session, description, semantic, representationName, SubMonitor.convert(monitor));
domain.getCommandStack().execute(createRepresentationCommand);
return createRepresentationCommand.getCreatedRepresentation();
}
Aggregations