use of org.obeonetwork.dsl.cinematic.flow.FlowAction in project InformationSystem by ObeoNetwork.
the class DecisionStateDecisionStatePropertiesEditionComponent 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 DecisionState decisionState = (DecisionState) elt;
final DecisionStatePropertiesEditionPart decisionStatePart = (DecisionStatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(FlowViewsRepository.DecisionState.Properties.description))
decisionStatePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, decisionState.getDescription()));
if (isAccessible(FlowViewsRepository.DecisionState.Properties.actions)) {
actionsSettings = new ReferencesTableSettings(decisionState, FlowPackage.eINSTANCE.getFlowState_Actions());
decisionStatePart.initActions(actionsSettings);
}
if (isAccessible(FlowViewsRepository.DecisionState.Properties.name))
decisionStatePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, decisionState.getName()));
if (isAccessible(FlowViewsRepository.DecisionState.Properties.actions)) {
decisionStatePart.addFilterToActions(new ViewerFilter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public boolean select(Viewer viewer, Object parentElement, Object element) {
// $NON-NLS-1$
return (element instanceof String && element.equals("")) || (element instanceof FlowAction);
}
});
// Start of user code for additional businessfilters for actions
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
use of org.obeonetwork.dsl.cinematic.flow.FlowAction 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);
}
Aggregations