@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 static Path getRootDirectory(NbGradleProject project) {
   NbGradleModel model = project.currentModel().getValue();
   return model.getSettingsDir();
 }