Search in sources :

Example 1 with InternalCriterionPropertiesEditionPart

use of org.obeonetwork.dsl.entity.parts.InternalCriterionPropertiesEditionPart in project InformationSystem by ObeoNetwork.

the class InternalCriterionInternalCriterionPropertiesEditionComponent 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 InternalCriterion internalCriterion = (InternalCriterion) elt;
        final InternalCriterionPropertiesEditionPart internalCriterionPart = (InternalCriterionPropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(EntityViewsRepository.InternalCriterion.Properties.target)) {
            // init part
            targetSettings = new EObjectFlatComboSettings(internalCriterion, EntityPackage.eINSTANCE.getInternalCriterion_Target());
            internalCriterionPart.initTarget(targetSettings);
            // set the button mode
            internalCriterionPart.setTargetButtonMode(ButtonsModeEnum.BROWSE);
        }
        if (isAccessible(EntityViewsRepository.InternalCriterion.Properties.description))
            internalCriterionPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, internalCriterion.getDescription()));
    // init filters
    // init values for referenced views
    // init filters for referenced views
    }
    setInitializing(false);
}
Also used : InternalCriterionPropertiesEditionPart(org.obeonetwork.dsl.entity.parts.InternalCriterionPropertiesEditionPart) InternalCriterion(org.obeonetwork.dsl.entity.InternalCriterion) EObjectFlatComboSettings(org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings)

Aggregations

EObjectFlatComboSettings (org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings)1 InternalCriterion (org.obeonetwork.dsl.entity.InternalCriterion)1 InternalCriterionPropertiesEditionPart (org.obeonetwork.dsl.entity.parts.InternalCriterionPropertiesEditionPart)1