use of org.obeonetwork.graal.parts.UserViewPropertiesEditionPart in project InformationSystem by ObeoNetwork.
the class UserViewUserViewPropertiesEditionComponent 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 UserView userView = (UserView) elt;
final UserViewPropertiesEditionPart userViewPart = (UserViewPropertiesEditionPart) editingPart;
// init values
if (isAccessible(GraalViewsRepository.UserView.Properties.description))
userViewPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, userView.getDescription()));
if (isAccessible(GraalViewsRepository.UserView.Properties.name))
userViewPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, userView.getName()));
if (isAccessible(GraalViewsRepository.UserView.Properties.outgoingTransitions)) {
outgoingTransitionsSettings = new ReferencesTableSettings(userView, GraalPackage.eINSTANCE.getNode_OutgoingTransitions());
userViewPart.initOutgoingTransitions(outgoingTransitionsSettings);
}
if (isAccessible(GraalViewsRepository.UserView.Properties.incomingTransitions)) {
incomingTransitionsSettings = new ReferencesTableSettings(userView, GraalPackage.eINSTANCE.getNode_IncomingTransitions());
userViewPart.initIncomingTransitions(incomingTransitionsSettings);
}
if (isAccessible(GraalViewsRepository.UserView.Properties.outgoingTransitions)) {
userViewPart.addFilterToOutgoingTransitions(new EObjectFilter(GraalPackage.Literals.TRANSITION));
// Start of user code for additional businessfilters for outgoingTransitions
// End of user code
}
if (isAccessible(GraalViewsRepository.UserView.Properties.incomingTransitions)) {
userViewPart.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);
}
Aggregations