mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
go to action action: open settings dialog from the welcome screen (relates IDEA-132152)
This commit is contained in:
@@ -201,7 +201,7 @@ public class GotoActionAction extends GotoActionBase implements DumbAware {
|
||||
ActionManager.getInstance(),
|
||||
e == null ? 0 : e.getModifiers());
|
||||
|
||||
if (ActionUtil.lastUpdateAndCheckDumb(action, event, true)) {
|
||||
if (ActionUtil.lastUpdateAndCheckDumb(action, event, false)) {
|
||||
if (action instanceof ActionGroup) {
|
||||
ListPopup popup = JBPopupFactory.getInstance().createActionGroupPopup(presentation.getText(),
|
||||
(ActionGroup)action, context,
|
||||
|
||||
@@ -17,13 +17,17 @@ package com.intellij.ide.actions;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.ActionPlaces;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
||||
import com.intellij.openapi.options.ShowSettingsUtil;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.ProjectManager;
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
@@ -33,7 +37,7 @@ public class ShowSettingsAction extends AnAction implements DumbAware {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(AnActionEvent e) {
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
if (SystemInfo.isMac && ActionPlaces.isMainMenuOrActionSearch(e.getPlace())) {
|
||||
// It's called from Preferences in App menu.
|
||||
e.getPresentation().setVisible(false);
|
||||
@@ -43,7 +47,7 @@ public class ShowSettingsAction extends AnAction implements DumbAware {
|
||||
}
|
||||
}
|
||||
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
|
||||
if (project == null) {
|
||||
project = ProjectManager.getInstance().getDefaultProject();
|
||||
|
||||
Reference in New Issue
Block a user