예제 #1
0
 private static void addSourceOrLibrary(EList<MindRootSrc> allsrc, MindRootSrc rs) {
   if (rs == null) return;
   if (allsrc.add(rs))
     for (MindRootSrc drs : rs.getDependencies()) {
       addSourceOrLibrary(allsrc, drs);
     }
 }
예제 #2
0
 @Override
 public EList<MindLibOrProject> getUses() {
   BasicEList<MindLibOrProject> ret = new BasicEList<MindLibOrProject>();
   for (MindPathEntry mpe : mindpathentries) {
     MindObject resolvedObject = mpe.getResolvedBy();
     if (resolvedObject == null) continue;
     MindLibOrProject mp = null;
     if (resolvedObject instanceof MindRootSrc) {
       MindRootSrc s = (MindRootSrc) resolvedObject;
       mp = s.getProject();
     } else if (resolvedObject instanceof MindPackage) {
       MindPackage mdPacakage = (MindPackage) resolvedObject;
       MindRootSrc s = mdPacakage.getRootsrc();
       if (s == null) continue;
       mp = s.getProject();
     } else if (resolvedObject instanceof MindProject) {
       mp = (MindProject) resolvedObject;
     }
     if (mp == null || ret.contains(mp)) continue;
     ret.add(mp);
   }
   return ret;
 }