Search in sources :

Example 1 with WirePropertiesEditionPart

use of org.obeonetwork.dsl.soa.parts.WirePropertiesEditionPart in project InformationSystem by ObeoNetwork.

the class WireWirePropertiesEditionComponent 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 Wire wire = (Wire) elt;
        final WirePropertiesEditionPart wirePart = (WirePropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(SoaViewsRepository.Wire.Properties.source)) {
            // init part
            sourceSettings = new EObjectFlatComboSettings(wire, SoaPackage.eINSTANCE.getWire_Source());
            wirePart.initSource(sourceSettings);
            // set the button mode
            wirePart.setSourceButtonMode(ButtonsModeEnum.BROWSE);
        }
        if (isAccessible(SoaViewsRepository.Wire.Properties.dest)) {
            // init part
            destSettings = new EObjectFlatComboSettings(wire, SoaPackage.eINSTANCE.getWire_Dest());
            wirePart.initDest(destSettings);
            // set the button mode
            wirePart.setDestButtonMode(ButtonsModeEnum.BROWSE);
        }
        if (isAccessible(SoaViewsRepository.Wire.Properties.description))
            wirePart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, wire.getDescription()));
    // init filters
    // init values for referenced views
    // init filters for referenced views
    }
    setInitializing(false);
}
Also used : WirePropertiesEditionPart(org.obeonetwork.dsl.soa.parts.WirePropertiesEditionPart) EObjectFlatComboSettings(org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings) Wire(org.obeonetwork.dsl.soa.Wire)

Aggregations

EObjectFlatComboSettings (org.eclipse.emf.eef.runtime.ui.widgets.eobjflatcombo.EObjectFlatComboSettings)1 Wire (org.obeonetwork.dsl.soa.Wire)1 WirePropertiesEditionPart (org.obeonetwork.dsl.soa.parts.WirePropertiesEditionPart)1