mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'master' of git@git.labs.intellij.net:idea/community
This commit is contained in:
@@ -146,7 +146,7 @@ public class LanguageConsoleImpl implements Disposable, TypeSafeDataProvider {
|
||||
myHistoryViewer.getComponent().setPreferredSize(new Dimension(0, 0));
|
||||
myConsoleEditor.getSettings().setAdditionalLinesCount(2);
|
||||
myConsoleEditor.setHighlighter(EditorHighlighterFactory.getInstance().createEditorHighlighter(myProject, myFile.getVirtualFile()));
|
||||
myHistoryViewer.setCaretVisible(false);
|
||||
myHistoryViewer.setCaretEnabled(false);
|
||||
myConsoleEditor.setHorizontalScrollbarVisible(true);
|
||||
final VisibleAreaListener areaListener = new VisibleAreaListener() {
|
||||
public void visibleAreaChanged(VisibleAreaEvent e) {
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.intellij.openapi.actionSystem.Presentation;
|
||||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.openapi.ui.popup.ListPopup;
|
||||
import com.intellij.openapi.util.IconLoader;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -81,7 +82,11 @@ public abstract class ComboBoxAction extends AnAction implements CustomComponent
|
||||
new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
if (!myForcePressed) {
|
||||
showPopup();
|
||||
IdeFocusManager.getGlobalInstance().doWhenFocusSettlesDown(new Runnable() {
|
||||
public void run() {
|
||||
showPopup();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,9 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable {
|
||||
final ActionCallback result = new ActionCallback();
|
||||
|
||||
if (!forced) {
|
||||
myFocusRequests.add(command);
|
||||
if (!myFocusRequests.contains(command)) {
|
||||
myFocusRequests.add(command);
|
||||
}
|
||||
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
@@ -191,7 +193,7 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable {
|
||||
}
|
||||
}).doWhenProcessed(new Runnable() {
|
||||
public void run() {
|
||||
resetCommand(command, true);
|
||||
resetCommand(command, false);
|
||||
|
||||
if (forced) {
|
||||
myForcedFocusRequestsAlarm.addRequest(new EdtRunnable() {
|
||||
@@ -220,6 +222,7 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable {
|
||||
|
||||
if (!forced && !isUnforcedRequestAllowed()) {
|
||||
if (cmd.equals(lastRequest)) {
|
||||
resetCommand(cmd, false);
|
||||
result.setDone();
|
||||
}
|
||||
else {
|
||||
@@ -240,6 +243,9 @@ public class FocusManagerImpl extends IdeFocusManager implements Disposable {
|
||||
if (doNotExecuteBecauseAppIsInactive) {
|
||||
if (myCallbackOnActivation != null) {
|
||||
myCallbackOnActivation.setRejected();
|
||||
if (myFocusCommandOnAppActivation != null) {
|
||||
resetCommand(myFocusCommandOnAppActivation, true);
|
||||
}
|
||||
}
|
||||
|
||||
myFocusCommandOnAppActivation = cmd;
|
||||
|
||||
@@ -139,7 +139,6 @@ public class PopupFactoryImpl extends JBPopupFactory {
|
||||
final int maxRowCount,
|
||||
final Condition<AnAction> preselectActionCondition) {
|
||||
final Component component = PlatformDataKeys.CONTEXT_COMPONENT.getData(dataContext);
|
||||
LOG.assertTrue(component != null);
|
||||
|
||||
final ActionStepBuilder builder = new ActionStepBuilder(dataContext, showNumbers, useAlphaAsNumbers, showDisabledActions, honorActionMnemonics);
|
||||
builder.buildGroup(actionGroup);
|
||||
@@ -389,7 +388,7 @@ public class PopupFactoryImpl extends JBPopupFactory {
|
||||
|
||||
public Icon getIcon() {
|
||||
return myIcon;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isPrependWithSeparator() {
|
||||
return myPrependWithSeparator;
|
||||
@@ -469,7 +468,10 @@ public class PopupFactoryImpl extends JBPopupFactory {
|
||||
public PopupStep onChosen(final ActionItem actionChoice, final boolean finalChoice) {
|
||||
if (!actionChoice.isEnabled()) return FINAL_CHOICE;
|
||||
final AnAction action = actionChoice.getAction();
|
||||
final DataContext dataContext = DataManager.getInstance().getDataContext(myContext);
|
||||
DataManager mgr = DataManager.getInstance();
|
||||
|
||||
final DataContext dataContext = myContext != null ? mgr.getDataContext(myContext) : mgr.getDataContext();
|
||||
|
||||
if (action instanceof ActionGroup && (!finalChoice || !((ActionGroup)action).canBePerformed())) {
|
||||
return JBPopupFactory.getInstance().createActionsStep((ActionGroup)action, dataContext, myEnableMnemonics, false, null, myContext, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user