@Nullable private static PsiFile findFileToOpen(@NotNull List<PsiFile> files){
  PsiFile bestFile=null;
  FolderConfiguration bestConfig=null;
  for (  PsiFile file : files) {
    PsiDirectory qualifiedDirectory=file.getParent();
    assert qualifiedDirectory != null : "Resource file's parent directory cannot be null";
    FolderConfiguration config=FolderConfiguration.getConfigForFolder(qualifiedDirectory.getName());
    if (bestConfig == null || config == null || config.compareTo(bestConfig) < 0) {
      bestConfig=config;
      bestFile=file;
    }
  }
  return bestFile;
}

@ Nullable private static PsiFile findFileToOpen ( @ NotNull List < PsiFile > files ) { PsiFile bestFile = null ; FolderConfiguration bestConfig = null ; for ( PsiFile file : files ) { PsiDirectory qualifiedDirectory = file . getParent ( ) ; assert qualifiedDirectory != null : "Resource file's parent directory cannot be null" ; FolderConfiguration config = FolderConfiguration . getConfigForFolder ( qualifiedDirectory . getName ( ) ) ; if ( bestConfig == null || config == null || config . compareTo ( bestConfig ) < 0 ) { bestConfig = config ; bestFile = file ; } } return bestFile ; }
returns the best configuration of a particular resource given a set of multiple configurations of the same resource .
