Search in sources :

Example 1 with AppliAction

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

the class AppliActionAppliActionPropertiesEditionComponent 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 AppliAction appliAction = (AppliAction) elt;
        final AppliActionPropertiesEditionPart appliActionPart = (AppliActionPropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(GraalViewsRepository.AppliAction.Properties.description))
            appliActionPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, appliAction.getDescription()));
        if (isAccessible(GraalViewsRepository.AppliAction.Properties.name))
            appliActionPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, appliAction.getName()));
        if (isAccessible(GraalViewsRepository.AppliAction.Properties.outgoingTransitions)) {
            outgoingTransitionsSettings = new ReferencesTableSettings(appliAction, GraalPackage.eINSTANCE.getNode_OutgoingTransitions());
            appliActionPart.initOutgoingTransitions(outgoingTransitionsSettings);
        }
        if (isAccessible(GraalViewsRepository.AppliAction.Properties.incomingTransitions)) {
            incomingTransitionsSettings = new ReferencesTableSettings(appliAction, GraalPackage.eINSTANCE.getNode_IncomingTransitions());
            appliActionPart.initIncomingTransitions(incomingTransitionsSettings);
        }
        if (isAccessible(GraalViewsRepository.AppliAction.Properties.outgoingTransitions)) {
            appliActionPart.addFilterToOutgoingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
        // Start of user code for additional businessfilters for outgoingTransitions
        // End of user code
        }
        if (isAccessible(GraalViewsRepository.AppliAction.Properties.incomingTransitions)) {
            appliActionPart.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) AppliAction(org.obeonetwork.graal.AppliAction) AppliActionPropertiesEditionPart(org.obeonetwork.graal.parts.AppliActionPropertiesEditionPart) 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 AppliAction (org.obeonetwork.graal.AppliAction)1 AppliActionPropertiesEditionPart (org.obeonetwork.graal.parts.AppliActionPropertiesEditionPart)1