use of org.eclipse.sirius.components.emf.compatibility.AQLInterpreterFactory in project sirius-components by eclipse-sirius.
the class FormRendererTests method testEcoreModel.
@Test
public void testEcoreModel() {
ViewExtensionDescription viewExtensionDescription = this.createSiriusProperties();
AQLInterpreterFactory interpreterFactory = new AQLInterpreterFactory() {
@Override
public AQLInterpreter create(ViewExtensionDescription viewExtensionDescription) {
return new AQLInterpreter(List.of(), List.of(EcorePackage.eINSTANCE));
}
};
IObjectService objectService = new IObjectService.NoOp();
IRepresentationMetadataSearchService representationMetadataSearchService = new IRepresentationMetadataSearchService.NoOp();
IIdentifierProvider identifierProvider = new IIdentifierProvider.NoOp() {
@Override
public String getIdentifier(Object element) {
return UUID.randomUUID().toString();
}
};
IdentifiedElementLabelProvider identifiedElementLabelProvider = new IdentifiedElementLabelProvider();
ISemanticCandidatesProviderFactory semanticCandidatesProviderFactory = SemanticCandidatesProvider::new;
IModelOperationHandlerSwitchProvider modelOperationHandlerSwitchProvider = interpeter -> new ModelOperationHandlerSwitch(objectService, representationMetadataSearchService, identifierProvider, List.of(), interpeter);
ViewExtensionDescriptionConverter converter = new ViewExtensionDescriptionConverter(objectService, interpreterFactory, identifierProvider, semanticCandidatesProviderFactory, modelOperationHandlerSwitchProvider, identifiedElementLabelProvider);
FormDescription description = converter.convert(viewExtensionDescription);
this.checkResult(description);
}
Aggregations