mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[^yole] IDEA-102386 Cannot open additional project from console
This commit is contained in:
@@ -168,6 +168,9 @@ public class CommandLineProcessor {
|
||||
if (StringUtil.isQuotedString(arg)) {
|
||||
arg = StringUtil.stripQuotesAroundValue(arg);
|
||||
}
|
||||
if (currentDirectory != null) {
|
||||
arg = new File(currentDirectory, arg).getAbsolutePath();
|
||||
}
|
||||
if (line != -1) {
|
||||
final VirtualFile virtualFile = LocalFileSystem.getInstance().refreshAndFindFileByPath(arg);
|
||||
if (virtualFile != null) {
|
||||
|
||||
@@ -161,7 +161,7 @@ public class SocketLock {
|
||||
if (result.contains(path)) {
|
||||
try {
|
||||
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
|
||||
out.writeUTF(ACTIVATE_COMMAND + StringUtil.join(args, "\0"));
|
||||
out.writeUTF(ACTIVATE_COMMAND + new File(".").getAbsolutePath() + "\0" + StringUtil.join(args, "\0"));
|
||||
out.flush();
|
||||
String response = in.readUTF();
|
||||
if (response.equals("ok")) {
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ public class ApplicationImpl extends ComponentManagerImpl implements Application
|
||||
invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final Project project = CommandLineProcessor.processExternalCommandLine(args, null);
|
||||
final Project project = CommandLineProcessor.processExternalCommandLine(args.subList(1, args.size()), args.get(0));
|
||||
final JFrame frame;
|
||||
if (project != null) {
|
||||
frame = (JFrame)WindowManager.getInstance().getIdeFrame(project);
|
||||
|
||||
Reference in New Issue
Block a user