ComboBox<XExpression> (CollectionComboBoxModel<XExpression> model, int width) { AnAction addToWatchesAction = new DumbAwareAction(ActionsBundle.actionText(XDebuggerActions.ADD_TO_WATCH), null, AllIcons.Debugger.AddToWatch) { @Override public void actionPerformed(@NotNull AnActionEvent e) { myEvaluateComboBox.saveTextInHistory(); addWatchExpression(getExpression(), -1, false); DebuggerEvaluationStatisticsCollector.WATCH_FROM_INLINE_ADD.log(e); } @Override public void update(@NotNull AnActionEvent e) { e.getPresentation().setEnabled(!XDebuggerUtilImpl.isEmptyExpression(getExpression())); } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.BGT; } }; ActionToolbarImpl toolbar = (ActionToolbarImpl)ActionManager.getInstance() .createActionToolbar("DebuggerVariablesEvaluate", new DefaultActionGroup(addToWatchesAction), true); addToWatchesActionRef.set(addToWatchesAction); toolbar.setOpaque(false); toolbar.setReservePlaceAutoPopupIcon(false); toolbar.setTargetComponent(tree); XDebuggerEmbeddedComboBox<XExpression> comboBox = new XDebuggerEmbeddedComboBox<>(model, width); comboBox.setExtension(toolbar); return comboBox; }