Module (@NotNull VirtualFile parent, @NotNull CharSequence fileName) { FileType fileType = myFileTypeRegistry.getFileTypeByFileName(fileName); if (myFileTypes.contains(fileType) && myProjectFileIndex.isInSourceContent(parent)) { return myProjectFileIndex.getModuleForFile(parent); } return null; }