Search in sources :

Example 1 with AppliEvent

use of org.obeonetwork.graal.AppliEvent in project InformationSystem by ObeoNetwork.

the class AppliEventAppliEventPropertiesEditionComponent 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 AppliEvent appliEvent = (AppliEvent) elt;
        final AppliEventPropertiesEditionPart appliEventPart = (AppliEventPropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(GraalViewsRepository.AppliEvent.Properties.description))
            appliEventPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, appliEvent.getDescription()));
        if (isAccessible(GraalViewsRepository.AppliEvent.Properties.name))
            appliEventPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, appliEvent.getName()));
        if (isAccessible(GraalViewsRepository.AppliEvent.Properties.outgoingTransitions)) {
            outgoingTransitionsSettings = new ReferencesTableSettings(appliEvent, GraalPackage.eINSTANCE.getNode_OutgoingTransitions());
            appliEventPart.initOutgoingTransitions(outgoingTransitionsSettings);
        }
        if (isAccessible(GraalViewsRepository.AppliEvent.Properties.incomingTransitions)) {
            incomingTransitionsSettings = new ReferencesTableSettings(appliEvent, GraalPackage.eINSTANCE.getNode_IncomingTransitions());
            appliEventPart.initIncomingTransitions(incomingTransitionsSettings);
        }
        if (isAccessible(GraalViewsRepository.AppliEvent.Properties.outgoingTransitions)) {
            appliEventPart.addFilterToOutgoingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
        // Start of user code for additional businessfilters for outgoingTransitions
        // End of user code
        }
        if (isAccessible(GraalViewsRepository.AppliEvent.Properties.incomingTransitions)) {
            appliEventPart.addFilterToIncomingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
        // Start of user code for additional businessfilters for incomingTransitions
        // 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) ReferencesTableSettings(org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings) AppliEvent(org.obeonetwork.graal.AppliEvent) AppliEventPropertiesEditionPart(org.obeonetwork.graal.parts.AppliEventPropertiesEditionPart)

Aggregations

EObjectFilter (org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter)1 ReferencesTableSettings (org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings)1 AppliEvent (org.obeonetwork.graal.AppliEvent)1 AppliEventPropertiesEditionPart (org.obeonetwork.graal.parts.AppliEventPropertiesEditionPart)1