mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
disable language switcher together with the expression editor
This commit is contained in:
+12
-9
@@ -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<ListPopup>(popup);
|
||||
return true;
|
||||
}
|
||||
ListPopup popup = createLanguagePopup();
|
||||
popup.showUnderneathOf(myChooseFactory);
|
||||
myPopup = new WeakReference<ListPopup>(popup);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}.installOn(myChooseFactory);
|
||||
}
|
||||
|
||||
+3
-3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user