void () { ShowContentAction action = new ShowContentAction(toolWindow, toolWindow.getComponent(), toolWindow.getContentManager()); DataContext dataContext = DataManager.getInstance().getDataContext(toolWindow.getComponent()); KeyEvent fakeKeyEvent = new KeyEvent(toolWindow.getComponent(), ActionEvent.ACTION_PERFORMED, System.currentTimeMillis(), 0, 0, '\0'); AnActionEvent event = AnActionEvent.createFromInputEvent(fakeKeyEvent, ActionPlaces.UNKNOWN, null, dataContext); action.actionPerformed(event); }