Search in sources :

Example 16 with EObjectFilter

use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.

the class FlowActionFlowActionPropertiesEditionComponent 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 FlowAction flowAction = (FlowAction) elt;
        final FlowActionPropertiesEditionPart flowActionPart = (FlowActionPropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(FlowViewsRepository.FlowAction.Properties.description))
            flowActionPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, flowAction.getDescription()));
        if (isAccessible(FlowViewsRepository.FlowAction.Properties.name))
            flowActionPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, flowAction.getName()));
        if (isAccessible(FlowViewsRepository.FlowAction.Properties.calls)) {
            callsSettings = new ReferencesTableSettings(flowAction, FlowPackage.eINSTANCE.getFlowAction_Calls());
            flowActionPart.initCalls(callsSettings);
        }
        if (isAccessible(FlowViewsRepository.FlowAction.Properties.operations)) {
            operationsSettings = new ReferencesTableSettings(flowAction, FlowPackage.eINSTANCE.getFlowAction_Operations());
            flowActionPart.initOperations(operationsSettings);
        }
        if (isAccessible(FlowViewsRepository.FlowAction.Properties.calls)) {
            flowActionPart.addFilterToCalls(new EObjectFilter(ViewPackage.Literals.VIEW_ACTION));
        // Start of user code for additional businessfilters for calls
        // End of user code
        }
        if (isAccessible(FlowViewsRepository.FlowAction.Properties.operations)) {
            flowActionPart.addFilterToOperations(new EObjectFilter(EnvironmentPackage.Literals.ACTION));
        // Start of user code for additional businessfilters for operations
        // 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) FlowAction(org.obeonetwork.dsl.cinematic.flow.FlowAction) FlowActionPropertiesEditionPart(org.obeonetwork.dsl.cinematic.flow.parts.FlowActionPropertiesEditionPart)

Example 17 with EObjectFilter

use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.

the class InitialStateInitialStatePropertiesEditionComponent 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 InitialState initialState = (InitialState) elt;
        final InitialStatePropertiesEditionPart initialStatePart = (InitialStatePropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(StatemachineViewsRepository.InitialState.Properties.description))
            initialStatePart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, initialState.getDescription()));
        if (isAccessible(StatemachineViewsRepository.InitialState.Properties.keywords))
            initialStatePart.setKeywords(initialState.getKeywords());
        if (isAccessible(StatemachineViewsRepository.InitialState.Properties.incomingTransitions)) {
            incomingTransitionsSettings = new ReferencesTableSettings(initialState, StateMachinePackage.eINSTANCE.getAbstractState_IncomingTransitions());
            initialStatePart.initIncomingTransitions(incomingTransitionsSettings);
        }
        if (isAccessible(StatemachineViewsRepository.InitialState.Properties.outcomingTransitions)) {
            outcomingTransitionsSettings = new ReferencesTableSettings(initialState, StateMachinePackage.eINSTANCE.getAbstractState_OutcomingTransitions());
            initialStatePart.initOutcomingTransitions(outcomingTransitionsSettings);
        }
        if (isAccessible(StatemachineViewsRepository.InitialState.Properties.incomingTransitions)) {
            initialStatePart.addFilterToIncomingTransitions(new EObjectFilter(StateMachinePackage.Literals.TRANSITION));
        // Start of user code for additional businessfilters for incomingTransitions
        // End of user code
        }
        if (isAccessible(StatemachineViewsRepository.InitialState.Properties.outcomingTransitions)) {
            initialStatePart.addFilterToOutcomingTransitions(new EObjectFilter(StateMachinePackage.Literals.TRANSITION));
        // Start of user code for additional businessfilters for outcomingTransitions
        // 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) InitialState(org.obeonetwork.dsl.statemachine.InitialState) InitialStatePropertiesEditionPart(org.obeonetwork.dsl.statemachine.parts.InitialStatePropertiesEditionPart)

Example 18 with EObjectFilter

use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter 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)

Example 19 with EObjectFilter

use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.

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

Example 20 with EObjectFilter

use of org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter in project InformationSystem by ObeoNetwork.

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

Aggregations

EObjectFilter (org.eclipse.emf.eef.runtime.impl.filters.EObjectFilter)23 ReferencesTableSettings (org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings)23 EObject (org.eclipse.emf.ecore.EObject)6 EObjectFlatComboSettings (org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings)6 Viewer (org.eclipse.jface.viewers.Viewer)6 ViewerFilter (org.eclipse.jface.viewers.ViewerFilter)6 FlowAction (org.obeonetwork.dsl.cinematic.flow.FlowAction)2 Task (org.obeonetwork.graal.Task)2 CinematicRoot (org.obeonetwork.dsl.cinematic.CinematicRoot)1 FlowEvent (org.obeonetwork.dsl.cinematic.flow.FlowEvent)1 FlowState (org.obeonetwork.dsl.cinematic.flow.FlowState)1 Transition (org.obeonetwork.dsl.cinematic.flow.Transition)1 ViewState (org.obeonetwork.dsl.cinematic.flow.ViewState)1 FlowActionPropertiesEditionPart (org.obeonetwork.dsl.cinematic.flow.parts.FlowActionPropertiesEditionPart)1 FlowEventPropertiesEditionPart (org.obeonetwork.dsl.cinematic.flow.parts.FlowEventPropertiesEditionPart)1 TransitionPropertiesEditionPart (org.obeonetwork.dsl.cinematic.flow.parts.TransitionPropertiesEditionPart)1 ViewStatePropertiesEditionPart (org.obeonetwork.dsl.cinematic.flow.parts.ViewStatePropertiesEditionPart)1 ToolkitsPropertiesEditionPart (org.obeonetwork.dsl.cinematic.parts.ToolkitsPropertiesEditionPart)1 Entity (org.obeonetwork.dsl.entity.Entity)1 EntityPropertiesEditionPart (org.obeonetwork.dsl.entity.parts.EntityPropertiesEditionPart)1