diff --git a/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java b/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java index d3047fe3166c..95918f3c1db8 100644 --- a/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationInspection.java @@ -24,6 +24,7 @@ import com.intellij.codeInspection.reference.RefMethod; import com.intellij.codeInspection.reference.RefVisitor; import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspection; import com.intellij.codeInspection.unusedSymbol.UnusedSymbolLocalInspectionBase; +import com.intellij.openapi.ui.VerticalFlowLayout; import com.intellij.ui.components.JBTabbedPane; import com.intellij.util.ui.JBUI; import org.jetbrains.annotations.NotNull; @@ -188,16 +189,13 @@ public class UnusedDeclarationInspection extends UnusedDeclarationInspectionBase gc.gridy++; add(myNonJavaCheckbox, gc); - final JButton configureClassPatternsButton = EntryPointsManagerImpl.createConfigureClassPatternsButton(); gc.fill = GridBagConstraints.NONE; gc.gridy++; - add(configureClassPatternsButton, gc); - - JButton configureAnnotations = EntryPointsManagerImpl.createConfigureAnnotationsButton(); - gc.gridy++; gc.weighty = 1; - - add(configureAnnotations, gc); + final JPanel btnPanel = new JPanel(new VerticalFlowLayout()); + btnPanel.add(EntryPointsManagerImpl.createConfigureClassPatternsButton()); + btnPanel.add(EntryPointsManagerImpl.createConfigureAnnotationsButton()); + add(btnPanel, gc); } } diff --git a/java/java-impl/src/com/intellij/codeInspection/ex/EntryPointsManagerImpl.java b/java/java-impl/src/com/intellij/codeInspection/ex/EntryPointsManagerImpl.java index 547a3780e8c5..4cb335be28e9 100644 --- a/java/java-impl/src/com/intellij/codeInspection/ex/EntryPointsManagerImpl.java +++ b/java/java-impl/src/com/intellij/codeInspection/ex/EntryPointsManagerImpl.java @@ -79,6 +79,7 @@ public class EntryPointsManagerImpl extends EntryPointsManagerBase implements Pe public static JButton createConfigureAnnotationsButton() { final JButton configureAnnotations = new JButton("Configure annotations..."); + configureAnnotations.setHorizontalAlignment(SwingConstants.LEFT); configureAnnotations.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -89,11 +90,12 @@ public class EntryPointsManagerImpl extends EntryPointsManagerBase implements Pe } public static JButton createConfigureClassPatternsButton() { - final JButton configureAnnotations = new JButton("Configure class patterns..."); - configureAnnotations.addActionListener(new ActionListener() { + final JButton configureClassPatterns = new JButton("Configure class patterns..."); + configureClassPatterns.setHorizontalAlignment(SwingConstants.LEFT); + configureClassPatterns.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - final EntryPointsManagerBase entryPointsManagerBase = getInstance(ProjectUtil.guessCurrentProject(configureAnnotations)); + final EntryPointsManagerBase entryPointsManagerBase = getInstance(ProjectUtil.guessCurrentProject(configureClassPatterns)); final ArrayList list = new ArrayList<>(); for (ClassPattern pattern : entryPointsManagerBase.getPatterns()) { list.add(new ClassPattern(pattern)); @@ -121,6 +123,6 @@ public class EntryPointsManagerImpl extends EntryPointsManagerBase implements Pe }.show(); } }); - return configureAnnotations; + return configureClassPatterns; } } \ No newline at end of file