protected boolean matchesModule(final VirtualFile file, final ProjectFileIndex fileIndex) {
    final Module module = fileIndex.getModuleForFile(file);
    if (module != null) {
      if (myModulePattern != null && myModulePattern.matcher(module.getName()).matches()) return true;
      if (myModuleGroupPattern != null) {
        final String[] groupPath = ModuleManager.getInstance(module.getProject()).getModuleGroupPath(module);
        if (groupPath != null) {
          for (String node : groupPath) {
            if (myModuleGroupPattern.matcher(node).matches()) return true;
          }
        }
      }
    }
    return myModulePattern == null && myModuleGroupPattern == null;
  }
protected boolean matchesModule(final VirtualFile file, final ProjectFileIndex fileIndex)