Search in sources :

Example 1 with CreateInstanceOperationHandler

use of org.eclipse.sirius.components.emf.compatibility.modeloperations.CreateInstanceOperationHandler in project sirius-components by eclipse-sirius.

the class CreateInstanceOperationHandlerTests method initialize.

@BeforeEach
public void initialize() {
    this.operationTestContext = new OperationTestContext();
    AdapterFactoryEditingDomain editingDomain = new EditingDomainFactory().create();
    EditingContext editingContext = new EditingContext(UUID.randomUUID().toString(), editingDomain);
    this.operationTestContext.getVariables().put(IEditingContext.EDITING_CONTEXT, editingContext);
    this.createInstanceOperation = ToolFactory.eINSTANCE.createCreateInstance();
    this.createInstanceOperationHandler = new CreateInstanceOperationHandler(this.operationTestContext.getObjectService(), this.operationTestContext.getRepresentationMetadataSearchService(), this.operationTestContext.getIdentifierProvider(), this.operationTestContext.getInterpreter(), new EPackageService(), new ChildModelOperationHandler(List.of()), this.createInstanceOperation);
}
Also used : AdapterFactoryEditingDomain(org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain) IEditingContext(org.eclipse.sirius.components.core.api.IEditingContext) EditingContext(org.eclipse.sirius.components.emf.services.EditingContext) EPackageService(org.eclipse.sirius.components.emf.compatibility.EPackageService) CreateInstanceOperationHandler(org.eclipse.sirius.components.emf.compatibility.modeloperations.CreateInstanceOperationHandler) EditingDomainFactory(org.eclipse.sirius.components.emf.services.EditingDomainFactory) ChildModelOperationHandler(org.eclipse.sirius.components.emf.compatibility.modeloperations.ChildModelOperationHandler) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

AdapterFactoryEditingDomain (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain)1 IEditingContext (org.eclipse.sirius.components.core.api.IEditingContext)1 EPackageService (org.eclipse.sirius.components.emf.compatibility.EPackageService)1 ChildModelOperationHandler (org.eclipse.sirius.components.emf.compatibility.modeloperations.ChildModelOperationHandler)1 CreateInstanceOperationHandler (org.eclipse.sirius.components.emf.compatibility.modeloperations.CreateInstanceOperationHandler)1 EditingContext (org.eclipse.sirius.components.emf.services.EditingContext)1 EditingDomainFactory (org.eclipse.sirius.components.emf.services.EditingDomainFactory)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1