this.node = node;
this.oldNode = oldNode;
}
public ErlangProjectProperties getConfiguration(final IEclipsePreferences aNode) {
final ErlangProjectProperties result = new ErlangProjectProperties();
final String sourceDirsStr = aNode.get(ProjectPreferencesConstants.SOURCE_DIRS,
ProjectPreferencesConstants.DEFAULT_SOURCE_DIRS);
result.setSourceDirs(PathSerializer.unpackList(sourceDirsStr));
final String includeDirsStr = aNode.get(ProjectPreferencesConstants.INCLUDE_DIRS,
ProjectPreferencesConstants.DEFAULT_INCLUDE_DIRS);
result.setIncludeDirs(PathSerializer.unpackList(includeDirsStr));
final String outputDirStr = aNode.get(ProjectPreferencesConstants.OUTPUT_DIR,
ProjectPreferencesConstants.DEFAULT_OUTPUT_DIR);
final String outputStr = outputDirStr.replaceAll(";", "");
result.setOutputDir(new Path(outputStr));
result.setRequiredRuntimeVersion(RuntimeVersion.Serializer.parse(aNode.get(
ProjectPreferencesConstants.RUNTIME_VERSION, null)));
if (!result.getRequiredRuntimeVersion().isDefined()) {
result.setRequiredRuntimeVersion(ProjectPreferencesConstants.FALLBACK_RUNTIME_VERSION);
}
result.setExternalModulesFile(aNode.get(
ProjectPreferencesConstants.PROJECT_EXTERNAL_MODULES,
ProjectPreferencesConstants.DEFAULT_EXTERNAL_MODULES));
result.setExternalIncludesFile(aNode.get(
ProjectPreferencesConstants.EXTERNAL_INCLUDES,
ProjectPreferencesConstants.DEFAULT_EXTERNAL_INCLUDES));
return result;
}