IPreferenceStore store = preferenceStoreAccess.getContextPreferenceStore(project);
String pathString = store.getString(PPPreferenceConstants.PUPPET_PROJECT_PATH);
String environment = store.getString(PPPreferenceConstants.PUPPET_ENVIRONMENT);
// if no path at all specified, the PPSearchPath enforces a default of "*"
PPSearchPath searchPath = PPSearchPath.fromString(pathString, null);
// if environment is still empty
if(environment != null)
environment = environment.trim();
if(environment == null || environment.length() == 0)
environment = "production";
// System.err.printf("Project %s uses env=%s and path=%s\n", project.getName(), environment, pathString);
// return a resolved search path
return searchPath.evaluate(environment);
}