Search in sources :

Example 1 with CreateRepresentationCommand

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();
}
Also used : TransactionalEditingDomain(org.eclipse.emf.transaction.TransactionalEditingDomain) CreateRepresentationCommand(org.eclipse.sirius.business.api.dialect.command.CreateRepresentationCommand)

Aggregations

TransactionalEditingDomain (org.eclipse.emf.transaction.TransactionalEditingDomain)1 CreateRepresentationCommand (org.eclipse.sirius.business.api.dialect.command.CreateRepresentationCommand)1