Search in sources :

Example 1 with RegionPropertiesEditionPart

use of org.obeonetwork.dsl.statemachine.parts.RegionPropertiesEditionPart in project InformationSystem by ObeoNetwork.

the class RegionRegionPropertiesEditionComponent 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 Region region = (Region) elt;
        final RegionPropertiesEditionPart regionPart = (RegionPropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(StatemachineViewsRepository.Region.Properties.description))
            regionPart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, region.getDescription()));
        if (isAccessible(StatemachineViewsRepository.Region.Properties.keywords))
            regionPart.setKeywords(region.getKeywords());
        if (isAccessible(StatemachineViewsRepository.Region.Properties.name))
            regionPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, region.getName()));
    // init filters
    // init values for referenced views
    // init filters for referenced views
    }
    setInitializing(false);
}
Also used : Region(org.obeonetwork.dsl.statemachine.Region) RegionPropertiesEditionPart(org.obeonetwork.dsl.statemachine.parts.RegionPropertiesEditionPart)

Aggregations

Region (org.obeonetwork.dsl.statemachine.Region)1 RegionPropertiesEditionPart (org.obeonetwork.dsl.statemachine.parts.RegionPropertiesEditionPart)1