Search in sources :

Example 1 with FlowEventPropertiesEditionPart

use of org.obeonetwork.dsl.cinematic.flow.parts.FlowEventPropertiesEditionPart in project InformationSystem by ObeoNetwork.

the class FlowEventFlowEventPropertiesEditionComponent 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 FlowEvent flowEvent = (FlowEvent) elt;
        final FlowEventPropertiesEditionPart flowEventPart = (FlowEventPropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(FlowViewsRepository.FlowEvent.Properties.description))
            flowEventPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, flowEvent.getDescription()));
        if (isAccessible(FlowViewsRepository.FlowEvent.Properties.name))
            flowEventPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, flowEvent.getName()));
        if (isAccessible(FlowViewsRepository.FlowEvent.Properties.binds)) {
            bindsSettings = new ReferencesTableSettings(flowEvent, FlowPackage.eINSTANCE.getFlowEvent_Binds());
            flowEventPart.initBinds(bindsSettings);
        }
        if (isAccessible(FlowViewsRepository.FlowEvent.Properties.binds)) {
            flowEventPart.addFilterToBinds(new EObjectFilter(ViewPackage.Literals.VIEW_EVENT));
        // Start of user code for additional businessfilters for binds
        // End of user code
        }
    // init values for referenced views
    // init filters for referenced views
    }
    setInitializing(false);
}
Also used : EObjectFilter(org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter) FlowEvent(org.obeonetwork.dsl.cinematic.flow.FlowEvent) FlowEventPropertiesEditionPart(org.obeonetwork.dsl.cinematic.flow.parts.FlowEventPropertiesEditionPart) ReferencesTableSettings(org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings)

Aggregations

EObjectFilter (org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter)1 ReferencesTableSettings (org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings)1 FlowEvent (org.obeonetwork.dsl.cinematic.flow.FlowEvent)1 FlowEventPropertiesEditionPart (org.obeonetwork.dsl.cinematic.flow.parts.FlowEventPropertiesEditionPart)1