void (JavaParameters params, JavaRunConfigurationModule module) { if (JavaSdkUtil.isJdkAtLeast(params.getJdk(), JavaSdkVersion.JDK_1_9)) { DumbService dumbService = DumbService.getInstance(module.getProject()); PsiJavaModule mainModule = ReadAction.compute(() -> dumbService.computeWithAlternativeResolveEnabled( () -> JavaModuleGraphUtil.findDescriptorByElement(module.findClass(params.getMainClass())))); if (mainModule != null) { boolean inLibrary = mainModule instanceof PsiCompiledElement || mainModule instanceof LightJavaModule; if (!inLibrary || ReadAction.compute(() -> JavaModuleGraphUtil.findNonAutomaticDescriptorByModule(module.getModule(), false)) != null) { params.setModuleName(ReadAction.compute(() -> mainModule.getName())); dumbService.runReadActionInSmartMode(() -> JavaParametersUtil.putDependenciesOnModulePath(params, mainModule, false)); } } } }