diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebuggerEditorBase.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebuggerEditorBase.java index 7ebd4066a39b..c79eaa252577 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebuggerEditorBase.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebuggerEditorBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,16 +82,19 @@ public abstract class XDebuggerEditorBase { new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent e, int clickCount) { - ListPopup oldPopup = SoftReference.dereference(myPopup); - if (oldPopup != null && !oldPopup.isDisposed()) { - oldPopup.cancel(); - myPopup = null; + if (myChooseFactory.isEnabled()) { + ListPopup oldPopup = SoftReference.dereference(myPopup); + if (oldPopup != null && !oldPopup.isDisposed()) { + oldPopup.cancel(); + myPopup = null; + return true; + } + ListPopup popup = createLanguagePopup(); + popup.showUnderneathOf(myChooseFactory); + myPopup = new WeakReference(popup); return true; } - ListPopup popup = createLanguagePopup(); - popup.showUnderneathOf(myChooseFactory); - myPopup = new WeakReference(popup); - return true; + return false; } }.installOn(myChooseFactory); } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebuggerExpressionComboBox.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebuggerExpressionComboBox.java index 3d418d2fcdcd..3d394a79d34a 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebuggerExpressionComboBox.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/XDebuggerExpressionComboBox.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.ComboBox; import com.intellij.ui.EditorComboBoxEditor; import com.intellij.ui.EditorComboBoxRenderer; +import com.intellij.util.ui.UIUtil; import com.intellij.xdebugger.XExpression; import com.intellij.xdebugger.XSourcePosition; import com.intellij.xdebugger.evaluation.EvaluationMode; @@ -33,7 +34,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; -import javax.swing.plaf.basic.ComboPopup; import java.awt.*; /** @@ -80,7 +80,7 @@ public class XDebuggerExpressionComboBox extends XDebuggerEditorBase { public void setEnabled(boolean enable) { if (enable == myComboBox.isEnabled()) return; - myComboBox.setEnabled(enable); + UIUtil.setEnabled(myComponent, enable, true); //myComboBox.setEditable(enable); if (enable) {