@NotNull
 public List<OrderEntry> getOrderEntriesForFile(@NotNull VirtualFile file) {
   VirtualFile dir = file.isDirectory() ? file : file.getParent();
   if (dir == null) return Collections.emptyList();
   final DirectoryInfo info = getInfoForDirectory(dir);
   if (info == null) return Collections.emptyList();
   return Collections.unmodifiableList(info.getOrderEntries());
 }
Пример #2
0
 @SuppressWarnings({"unchecked"})
 public void addOrderEntries(
     final List<OrderEntry> orderEntries,
     final DirectoryInfo parentInfo,
     final List<OrderEntry> oldParentEntries) {
   moduleOrderEntries = null;
   if (this.orderEntries == null) {
     this.orderEntries = orderEntries;
   } else if (parentInfo != null && oldParentEntries == this.orderEntries) {
     this.orderEntries = parentInfo.getOrderEntries();
   } else {
     List<OrderEntry> tmp = new OrderedSet<OrderEntry>(TObjectHashingStrategy.CANONICAL);
     tmp.addAll(this.orderEntries);
     tmp.addAll(orderEntries);
     this.orderEntries = tmp;
   }
 }
 @Nullable
 public JpsModuleSourceRootType<?> getSourceRootType(@NotNull DirectoryInfo directoryInfo) {
   return myRootTypes.get(directoryInfo.getSourceRootTypeId());
 }