force open project in new Window if we call it from Welcome Screen

This commit is contained in:
Konstantin Bulenkov
2015-10-20 17:03:46 +02:00
parent 920d5e8eb7
commit 1fe80cf329
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2011 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -15,10 +15,7 @@
*/
package com.intellij.ide;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.Presentation;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
@@ -48,7 +45,10 @@ public class ReopenProjectAction extends AnAction implements DumbAware {
@Override
public void actionPerformed(AnActionEvent e) {
final int modifiers = e.getModifiers();
final boolean forceOpenInNewFrame = (modifiers & InputEvent.CTRL_MASK) != 0 || (modifiers & InputEvent.SHIFT_MASK) != 0;
final boolean forceOpenInNewFrame = (modifiers & InputEvent.CTRL_MASK) != 0
|| (modifiers & InputEvent.SHIFT_MASK) != 0
|| e.getPlace() == ActionPlaces.WELCOME_SCREEN;
Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
if (!new File(myProjectPath).exists()) {
if (Messages.showDialog(project, "The path " + FileUtil.toSystemDependentName(myProjectPath) + " does not exist.\n" +