use of org.obeonetwork.dsl.interaction.parts.InteractionUsePropertiesEditionPart in project InformationSystem by ObeoNetwork.
the class InteractionUseInteractionUsePropertiesEditionComponent 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 InteractionUse interactionUse = (InteractionUse) elt;
final InteractionUsePropertiesEditionPart interactionUsePart = (InteractionUsePropertiesEditionPart) editingPart;
// init values
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.name))
interactionUsePart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, interactionUse.getName()));
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.type))
interactionUsePart.setType(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, interactionUse.getType()));
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.interaction_)) {
// init part
interactionSettings = new EObjectFlatComboSettings(interactionUse, InteractionPackage.eINSTANCE.getInteractionUse_Interaction());
interactionUsePart.initInteraction(interactionSettings);
// set the button mode
interactionUsePart.setInteractionButtonMode(ButtonsModeEnum.BROWSE);
}
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.description))
interactionUsePart.setDescription(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, interactionUse.getDescription()));
if (isAccessible(InteractionViewsRepository.InteractionUse.Properties.interaction_)) {
interactionUsePart.addFilterToInteraction(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) {
return (element instanceof Interaction);
}
});
// Start of user code for additional businessfilters for interaction
// End of user code
}
// init values for referenced views
// init filters for referenced views
}
setInitializing(false);
}
Aggregations