@Override public Sharability getSharability(URI uri) { Path queriedPath = tryConvertToPath(uri); if (queriedPath == null) { return Sharability.UNKNOWN; } NbGradleModel model = project.currentModel().getValue(); Path rootProjectDir = model.getSettingsDir(); if (isInBuildDir(model, queriedPath)) { return Sharability.NOT_SHARABLE; } if (isInDirectory(SettingsFiles.getSettingsDir(rootProjectDir), queriedPath)) { return Sharability.NOT_SHARABLE; } if (isInDirectory(SettingsFiles.getPrivateSettingsDir(rootProjectDir), queriedPath)) { return Sharability.NOT_SHARABLE; } Path projectDir = model.getProjectDir().toPath(); if (isInDirectory(projectDir, queriedPath)) { return Sharability.SHARABLE; } return Sharability.UNKNOWN; }
public ProjectProperties getPropertiesForProfile( ProfileDef profileDef, boolean useInheritance, PropertiesLoadListener onLoadTask) { if (useInheritance) { return ProjectPropertiesManager.getPropertySourceForProject(this, profileDef) .load(onLoadTask); } else { File profileFile = SettingsFiles.getProfileFile(this, profileDef); return ProjectPropertiesManager.getFilePropertySource(this, profileFile).load(onLoadTask); } }