void (TestFramework descriptor) { ReadAction.nonBlocking(() -> { boolean result = descriptor.isLibraryAttached(myTargetModule); SwingUtilities.invokeLater(() -> { if (result) { myFixLibraryPanel.setVisible(false); } else { myFixLibraryPanel.setVisible(true); String text = JavaBundle.message("intention.create.test.dialog.library.not.found", descriptor.getName()); myFixLibraryLabel.setText(text); myFixLibraryButton.setVisible( descriptor instanceof JvmTestFramework && ((JvmTestFramework)descriptor).getFrameworkLibraryDescriptor() != null || descriptor.getLibraryPath() != null); } }); }) .submit(AppExecutorUtil.getAppExecutorService()); @NlsSafe String libraryDefaultSuperClass = descriptor.getDefaultSuperClass(); @NlsSafe String lastSelectedSuperClass = getLastSelectedSuperClassName(descriptor); @NlsSafe String superClass = lastSelectedSuperClass != null ? lastSelectedSuperClass : libraryDefaultSuperClass; if (isSuperclassSelectedManually()) { if (superClass != null) { String currentSuperClass = mySuperClassField.getText(); mySuperClassField.appendItem(superClass); mySuperClassField.setText(currentSuperClass); } } else { mySuperClassField.appendItem(StringUtil.notNullize(superClass)); mySuperClassField.getChildComponent().setSelectedItem(superClass == null ? "" : superClass); } mySelectedFramework = descriptor; }