Search in sources :

Example 1 with LiteralPropertiesEditionPart

use of org.obeonetwork.dsl.environment.parts.LiteralPropertiesEditionPart in project InformationSystem by ObeoNetwork.

the class LiteralLiteralPropertiesEditionComponent 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 Literal literal = (Literal) elt;
        final LiteralPropertiesEditionPart literalPart = (LiteralPropertiesEditionPart) editingPart;
        // init values
        if (isAccessible(EnvironmentViewsRepository.Literal.Properties.name))
            literalPart.setName(EEFConverterUtil.convertToString(EcorePackage.Literals.ESTRING, literal.getName()));
        if (isAccessible(EnvironmentViewsRepository.Literal.Properties.description))
            literalPart.setDescription(EcoreUtil.convertToString(EcorePackage.Literals.ESTRING, literal.getDescription()));
    // init filters
    // init values for referenced views
    // init filters for referenced views
    }
    setInitializing(false);
}
Also used : Literal(org.obeonetwork.dsl.environment.Literal) LiteralPropertiesEditionPart(org.obeonetwork.dsl.environment.parts.LiteralPropertiesEditionPart)

Aggregations

Literal (org.obeonetwork.dsl.environment.Literal)1 LiteralPropertiesEditionPart (org.obeonetwork.dsl.environment.parts.LiteralPropertiesEditionPart)1