private static CachedProperties loadPropertiesAlways(
final NbGradleProject project,
File propertiesFile) {
final CachedProperties result = new CachedProperties(new MemProjectProperties());
final PropertiesPersister persister = new XmlPropertiesPersister(propertiesFile);
PropertiesPersister.PERSISTER_PROCESSOR.execute(Cancellation.UNCANCELABLE_TOKEN, new CancelableTask() {
@Override
public void execute(CancellationToken cancelToken) {
persister.load(result, false, new Runnable() {
@Override
public void run() {
try {
result.signalPropertiesLoaded();
} finally {