private void createUIComponents() {
        mainClass = new LabeledComponent<>();
        mainClass.setComponent(ClassEditorField.createClassField(project, () -> moduleSelector.getModule(), (declaration, place) -> {
            if (declaration instanceof KtLightClass aClass) {
              if (ConfigurationUtil.MAIN_CLASS.value(aClass)
                    && (PsiMethodUtil.findMainMethod(aClass) != null || place.getParent() != null)
                    && moduleSelector.findClass(((PsiClass)declaration).getQualifiedName()) != null) {
                    return JavaCodeFragment.VisibilityChecker.Visibility.VISIBLE;
                }
            }
            return JavaCodeFragment.VisibilityChecker.Visibility.NOT_VISIBLE;
        },  createApplicationClassBrowser(project, () -> moduleSelector.getModule(), moduleChooser)));
    }
private void createUIComponents()