use of com.avaloq.tools.ddk.xtext.builder.layered.NullResourceDescriptionsData in project dsl-devkit by dsldevkit.
the class MonitoredClusteringBuilderState method platformChanged.
/**
* {@inheritDoc} Schedules a full clean build if the target platform changes.
*/
@Override
public void platformChanged(final IResourceDescriptionsData newPlatform, final Collection<Delta> deltas, final boolean mustRebuild) {
if (newPlatform == null) {
// Hmmm... context deactivated. Events for removing the project from the index will be generated anyway, so no build necessary.
// TODO: check!
setResourceDescriptionsData(new NullResourceDescriptionsData());
return;
}
// Deltas?
if (isLoaded()) {
// AbstractXtextTargetPlatformManager if it was the initial load?
if (newPlatform instanceof AbstractResourceDescriptionsData) {
((AbstractResourceDescriptionsData) newPlatform).beginChanges();
}
setResourceDescriptionsData((ResourceDescriptionsData) newPlatform);
ResourceDescriptionChangeEvent event = new ResourceDescriptionChangeEvent(deltas);
notifyListeners(event);
}
if (mustRebuild) {
buildTrigger.scheduleFullBuild();
}
}
Aggregations