: RecursiveExecutor.INSTANCE;
NbGradleProject.PROJECT_PROCESSOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
@Override
public void execute(CancellationToken cancelToken) {
final PropertiesSnapshot snapshot = XmlPropertyFormat.readFromXml(propertiesFile);
setterExecutor.execute(new Runnable() {
@Override
public void run() {
for (PropertySetter<?> setter: setters) {
setter.set(snapshot);
}
// TODO: This might overwrite concurrently set
// properties which is unexpected by the user. This
// is unlikely to happen but should be fixed anyway.
Set<Map.Entry<String, PropertySource<PredefinedTask>>> builtInTasks
= snapshot.getBuiltInTasks().entrySet();
for (Map.Entry<String, PropertySource<PredefinedTask>> taskEntry: builtInTasks) {
MutableProperty<PredefinedTask> property
= properties.tryGetBuiltInTask(taskEntry.getKey());
if (property == null) {
LOGGER.log(Level.SEVERE, "Cannot set property for built-in task: {0}", taskEntry.getKey());
}
else {
property.setValueFromSource(taskEntry.getValue());
}
}
List<AuxConfig> newAuxConfigs = new LinkedList<>();
for (AuxConfigSource config: snapshot.getAuxProperties()) {
newAuxConfigs.add(new AuxConfig(config.getKey(), config.getSource().getValue()));
}
properties.setAllAuxConfigs(newAuxConfigs);
if (onDone != null) {