Search in sources :

Example 1 with OperationPropertiesEditionPart

use of org.obeonetwork.dsl.soa.parts.OperationPropertiesEditionPart in project InformationSystem by ObeoNetwork.

the class OperationOperationPropertiesEditionComponent method initPart.

/**
 * {@inheritDoc}
 *
 * @see org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent#initPart(java.lang.Object, int, org.eclipse.emf.ecore.EObject,
 *      org.eclipse.emf.ecore.resource.ResourceSet)
 */
public void initPart(Object key, int kind, EObject elt, ResourceSet allResource) {
    setInitializing(true);
    if (editingPart != null && key == partKey) {
        editingPart.setContext(elt, allResource);
        final Operation operation = (Operation) elt;
        final OperationPropertiesEditionPart operationPart = (OperationPropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(SoaViewsRepository.Operation.Properties.name))
            operationPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, operation.getName()));
        if (isAccessible(SoaViewsRepository.Operation.Properties.kind)) {
            operationPart.initKind(EEFUtils.choiceOfValues(operation, SoaPackage.eINSTANCE.getOperation_Kind()), operation.getKind());
        }
        if (isAccessible(SoaViewsRepository.Operation.Properties.public_)) {
            operationPart.setPublic_(operation.isPublic());
        }
        if (isAccessible(SoaViewsRepository.Operation.Properties.description))
            operationPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, operation.getDescription()));
    // init filters
    // init values for referenced views
    // init filters for referenced views
    }
    setInitializing(false);
}
Also used : Operation(org.obeonetwork.dsl.soa.Operation) OperationPropertiesEditionPart(org.obeonetwork.dsl.soa.parts.OperationPropertiesEditionPart)

Aggregations

Operation (org.obeonetwork.dsl.soa.Operation)1 OperationPropertiesEditionPart (org.obeonetwork.dsl.soa.parts.OperationPropertiesEditionPart)1