コード例 #1
0
ファイル: DefaultIndex.java プロジェクト: ratlsun/view_sonar
 Set<Dependency> getDependenciesBetweenProjects() {
   Set<Dependency> result = Sets.newLinkedHashSet();
   for (Dependency dependency : dependencies) {
     if (ResourceUtils.isSet(dependency.getFrom()) || ResourceUtils.isSet(dependency.getTo())) {
       result.add(dependency);
     }
   }
   return result;
 }
コード例 #2
0
ファイル: DefaultIndex.java プロジェクト: ratlsun/view_sonar
  boolean registerDependency(Dependency dependency) {
    Bucket fromBucket = doIndex(dependency.getFrom());
    Bucket toBucket = doIndex(dependency.getTo());

    if (fromBucket != null
        && !fromBucket.isExcluded()
        && toBucket != null
        && !toBucket.isExcluded()) {
      dependencies.add(dependency);
      registerOutgoingDependency(dependency);
      registerIncomingDependency(dependency);
      return true;
    }
    return false;
  }