void (@NotNull ToolWindow toolWindow) { List<AnAction> titleActions = new ArrayList<>(); createTitleActions(titleActions); if (!titleActions.isEmpty()) { toolWindow.setTitleActions(titleActions); } List<AnAction> tabActions = new ArrayList<>(); createTabActions(tabActions); if (!tabActions.isEmpty()) { ((ToolWindowEx)toolWindow).setTabActions(tabActions.toArray(AnAction[]::new)); } }