use of org.obeonetwork.dsl.statemachine.parts.StatePropertiesEditionPart in project InformationSystem by ObeoNetwork.
the class StateStatePropertiesEditionComponent 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 State state = (State) elt;
final StatePropertiesEditionPart statePart = (StatePropertiesEditionPart) editingPart;
// init values
if (isAccessible(StatemachineViewsRepository.State.Properties.description))
statePart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, state.getDescription()));
if (isAccessible(StatemachineViewsRepository.State.Properties.keywords))
statePart.setKeywords(state.getKeywords());
if (isAccessible(StatemachineViewsRepository.State.Properties.incomingTransitions)) {
incomingTransitionsSettings = new ReferencesTableSettings(state, StateMachinePackage.eINSTANCE.getAbstractState_IncomingTransitions());
statePart.initIncomingTransitions(incomingTransitionsSettings);
}
if (isAccessible(StatemachineViewsRepository.State.Properties.outcomingTransitions)) {
outcomingTransitionsSettings = new ReferencesTableSettings(state, StateMachinePackage.eINSTANCE.getAbstractState_OutcomingTransitions());
statePart.initOutcomingTransitions(outcomingTransitionsSettings);
}
if (isAccessible(StatemachineViewsRepository.State.Properties.name))
statePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, state.getName()));
if (isAccessible(StatemachineViewsRepository.State.Properties.incomingTransitions)) {
statePart.addFilterToIncomingTransitions(new EObjectFilter(StateMachinePackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for incomingTransitions
// End of user code
}
if (isAccessible(StatemachineViewsRepository.State.Properties.outcomingTransitions)) {
statePart.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);
}
Aggregations