Search in sources :

Example 1 with NamespacePropertiesEditionPart

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

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

Aggregations

Namespace (org.obeonetwork.dsl.environment.Namespace)1 NamespacePropertiesEditionPart (org.obeonetwork.dsl.environment.parts.NamespacePropertiesEditionPart)1