private static void collectExplicitlyAddedModules(Project project,
                                                    JavaParameters javaParameters,
                                                    Set<PsiJavaModule> explicitModules) {
    ParametersList parametersList = javaParameters.getVMParametersList();
    List<String> parameters = parametersList.getParameters();
    int additionalModulesIdx = parameters.indexOf("--add-modules") + 1;
    String addedModules =
      additionalModulesIdx > 0 && additionalModulesIdx < parameters.size() ? parameters.get(additionalModulesIdx) : null;
    if (addedModules != null) {
      JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project);
      for (String additionalModule : addedModules.split(",")) {
        ContainerUtil.addIfNotNull(explicitModules, psiFacade.findModule(additionalModule.trim(), GlobalSearchScope.allScope(project)));
      }
    }
  }
private static void collectExplicitlyAddedModules(Project project,
                                                    JavaParameters javaParameters,
                                                    Set<PsiJavaModule> explicitModules)