return searchPath.toString();
}
private ValidationOptions getValidationOptions(Collection<File> moduleLocations,
Collection<File> importedModuleLocations) {
ValidationOptions options = new ValidationOptions();
options.setCheckLayout(checkLayout);
options.setCheckModuleSemantics(checkModuleSemantics);
options.setCheckReferences(checkReferences);
if(moduleLocations.size() == 1 && getModulesDir().equals(moduleLocations.iterator().next()))
options.setFileType(FileType.MODULE_ROOT);
else
options.setFileType(FileType.PUPPET_ROOT);
options.setPlatformURI(PuppetTarget.forComplianceLevel(complianceLevel, false).getPlatformURI());
options.setEncodingProvider(new IEncodingProvider() {
public String getEncoding(URI file) {
return UTF_8.name();
}
});
options.setSearchPath(getSearchPath(moduleLocations, importedModuleLocations));
options.setProblemsAdvisor(potentialProblemsAdvisor);
return options;
}