PY-16973 call "#updateActionsImmediately()" to make sure action tool bar has all...
authorIlya.Kazakevich <Ilya.Kazakevich@jetbrains.com>
Tue, 22 Sep 2015 14:52:32 +0000 (17:52 +0300)
committerIlya.Kazakevich <Ilya.Kazakevich@jetbrains.com>
Tue, 22 Sep 2015 14:52:32 +0000 (17:52 +0300)
python/src/com/jetbrains/toolWindowWithActions/PanelWithActions.java

index 0e6dd48e3d44484e369b99e7d847977b96ebb83b..a219f8c3aafcf8e8ae3072df9f2d63b380e7b4d1 100644 (file)
@@ -71,6 +71,8 @@ final class PanelWithActions extends JPanel {
 
     final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.EDITOR_TOOLBAR, toolbarActions, false);
     toolbar.setTargetComponent(dataComponent);
+    // This method forces toolbar to add action buttons to its panel to make #getComponents() and #getPreferredSize() work correctly
+    toolbar.updateActionsImmediately();
 
     // TODO: Move GUI and alignment out of here.
     final JComponent toolbarComponent = toolbar.getComponent();