Search in sources :

Example 1 with SortedListModel

use of com.intellij.ui.SortedListModel in project intellij-community by JetBrains.

the class CodeStyleGenerationConfigurable method createComponent.

public JComponent createComponent() {
    myVisibilityPanel.add(myJavaVisibilityPanel, BorderLayout.CENTER);
    GridBagConstraints gc = new GridBagConstraints(0, GridBagConstraints.RELATIVE, 1, 1, 1, 1, GridBagConstraints.NORTHEAST, GridBagConstraints.BOTH, new JBInsets(0, 0, 0, 0), 0, 0);
    final Condition<PsiClass> isApplicable = aClass -> aClass.isAnnotationType();
    //noinspection Convert2Diamond
    myRepeatAnnotationsModel = new SortedListModel<String>(Comparator.naturalOrder());
    myOverridePanel.add(SpecialAnnotationsUtil.createSpecialAnnotationsListControl("Annotations to Copy", false, isApplicable, myRepeatAnnotationsModel), gc);
    return myPanel;
}
Also used : JBInsets(com.intellij.util.ui.JBInsets) CommenterForm(com.intellij.application.options.codeStyle.CommenterForm) SpecialAnnotationsUtil(com.intellij.codeInspection.util.SpecialAnnotationsUtil) JBCheckBox(com.intellij.ui.components.JBCheckBox) StringUtil(com.intellij.openapi.util.text.StringUtil) Configurable(com.intellij.openapi.options.Configurable) RefactoringBundle(com.intellij.refactoring.RefactoringBundle) DaemonCodeAnalyzer(com.intellij.codeInsight.daemon.DaemonCodeAnalyzer) java.awt(java.awt) PsiClass(com.intellij.psi.PsiClass) ProjectManager(com.intellij.openapi.project.ProjectManager) IdeBorderFactory(com.intellij.ui.IdeBorderFactory) SortedListModel(com.intellij.ui.SortedListModel) JavaVisibilityPanel(com.intellij.refactoring.ui.JavaVisibilityPanel) Project(com.intellij.openapi.project.Project) ConfigurationException(com.intellij.openapi.options.ConfigurationException) CodeStyleSettings(com.intellij.psi.codeStyle.CodeStyleSettings) Comparator(java.util.Comparator) JavaLanguage(com.intellij.lang.java.JavaLanguage) ApplicationBundle(com.intellij.openapi.application.ApplicationBundle) Condition(com.intellij.openapi.util.Condition) javax.swing(javax.swing) PsiClass(com.intellij.psi.PsiClass) JBInsets(com.intellij.util.ui.JBInsets)

Aggregations

CommenterForm (com.intellij.application.options.codeStyle.CommenterForm)1 DaemonCodeAnalyzer (com.intellij.codeInsight.daemon.DaemonCodeAnalyzer)1 SpecialAnnotationsUtil (com.intellij.codeInspection.util.SpecialAnnotationsUtil)1 JavaLanguage (com.intellij.lang.java.JavaLanguage)1 ApplicationBundle (com.intellij.openapi.application.ApplicationBundle)1 Configurable (com.intellij.openapi.options.Configurable)1 ConfigurationException (com.intellij.openapi.options.ConfigurationException)1 Project (com.intellij.openapi.project.Project)1 ProjectManager (com.intellij.openapi.project.ProjectManager)1 Condition (com.intellij.openapi.util.Condition)1 StringUtil (com.intellij.openapi.util.text.StringUtil)1 PsiClass (com.intellij.psi.PsiClass)1 CodeStyleSettings (com.intellij.psi.codeStyle.CodeStyleSettings)1 RefactoringBundle (com.intellij.refactoring.RefactoringBundle)1 JavaVisibilityPanel (com.intellij.refactoring.ui.JavaVisibilityPanel)1 IdeBorderFactory (com.intellij.ui.IdeBorderFactory)1 SortedListModel (com.intellij.ui.SortedListModel)1 JBCheckBox (com.intellij.ui.components.JBCheckBox)1 JBInsets (com.intellij.util.ui.JBInsets)1 java.awt (java.awt)1