mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-108265. Now user is asked whether the project should be opened in a new frame.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Copyright 2000-2013 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.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.ui.win;
|
||||
|
||||
import com.intellij.ide.impl.ProjectUtil;
|
||||
import com.intellij.openapi.diff.ApplicationStarterBase;
|
||||
|
||||
|
||||
/**
|
||||
* @author Denis Fokin
|
||||
*/
|
||||
public class RecentProjectApplication extends ApplicationStarterBase {
|
||||
public RecentProjectApplication() {
|
||||
super("reopen", 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsageMessage() {
|
||||
return String.format("This command is used for internal purpose only.");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void processCommand(String[] args) throws Exception {
|
||||
ProjectUtil.openProject(args[1], null, false);
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public class SocketControlHelper {
|
||||
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
|
||||
try {
|
||||
|
||||
out.writeUTF(ACTIVATE_COMMAND + new File(".").getAbsolutePath() + "\0" + pathToProject);
|
||||
out.writeUTF(ACTIVATE_COMMAND + new File(".").getAbsolutePath() + "\0" + "reopen" + "\0" + pathToProject);
|
||||
out.flush();
|
||||
String response = in.readUTF();
|
||||
if (response.equals("ok")) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
<errorHandler implementation="com.intellij.diagnostic.ITNReporter"/>
|
||||
<appStarter implementation="com.intellij.openapi.diff.DiffApplication"/>
|
||||
<appStarter implementation="com.intellij.openapi.diff.MergeApplication"/>
|
||||
<appStarter implementation="com.intellij.ui.win.RecentProjectApplication"/>
|
||||
<appStarter implementation="com.intellij.help.impl.KeymapGenerator"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.ide.util.PropertiesComponent"
|
||||
|
||||
Reference in New Issue
Block a user