Search in sources :

Example 1 with ResourceDescriptions2

use of com.avaloq.tools.ddk.xtext.extensions.ResourceDescriptions2 in project dsl-devkit by dsldevkit.

the class MonitoredClusteringBuilderState method setResourceDescriptionsData.

/**
 * Set the resource descriptions data, unless cancellation has been requested.
 *
 * @param newData
 *          the new resource descriptions data
 * @param monitor
 *          the monitor to check for cancellation
 */
protected void setResourceDescriptionsData(final ResourceDescriptionsData newData, final IProgressMonitor monitor) {
    checkForCancellation(monitor);
    rawData = newData;
    if (newData instanceof IResourceDescriptions2) {
        myData = (IResourceDescriptions2) newData;
    } else {
        myData = new ResourceDescriptions2(newData);
    }
    super.setResourceDescriptionsData(newData);
    if (isLoaded && newData instanceof AbstractResourceDescriptionsData) {
        ((AbstractResourceDescriptionsData) newData).commitChanges();
    }
    isLoaded = true;
}
Also used : ResourceDescriptions2(com.avaloq.tools.ddk.xtext.extensions.ResourceDescriptions2) IResourceDescriptions2(com.avaloq.tools.ddk.xtext.resource.extensions.IResourceDescriptions2) AbstractResourceDescriptionsData(com.avaloq.tools.ddk.xtext.extensions.AbstractResourceDescriptionsData) IResourceDescriptions2(com.avaloq.tools.ddk.xtext.resource.extensions.IResourceDescriptions2)

Aggregations

AbstractResourceDescriptionsData (com.avaloq.tools.ddk.xtext.extensions.AbstractResourceDescriptionsData)1 ResourceDescriptions2 (com.avaloq.tools.ddk.xtext.extensions.ResourceDescriptions2)1 IResourceDescriptions2 (com.avaloq.tools.ddk.xtext.resource.extensions.IResourceDescriptions2)1