Skip to content

Commit

Permalink
Windows long paths issue has been fixed, the com.intellij.ui.win.Task…
Browse files Browse the repository at this point in the history
… was moved from RecentTasks class because of some problems with JNI invocations. Class path now is enclosed by double quotes.
  • Loading branch information
Denis Fokin authored and Denis Fokin committed Sep 10, 2013
1 parent a1e5a9d commit dff5e27
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 21 deletions.
Binary file modified bin/win/jumplistbridge.dll
Binary file not shown.
Binary file modified bin/win/jumplistbridge64.dll
Binary file not shown.
11 changes: 0 additions & 11 deletions platform/platform-impl/src/com/intellij/ui/win/RecentTasks.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,4 @@ private static void checkThread() {
if (t == null || !t.equals(Thread.currentThread()))
throw new RuntimeException("This class has to be used from the same thread");
}

public static class Task {
private final String path;
private final String args;
private final String description;
public Task(String path, String args, String description) {
this.path = path;
this.args = args;
this.description = description;
}
}
}
30 changes: 30 additions & 0 deletions platform/platform-impl/src/com/intellij/ui/win/Task.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* 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;

/**
* Created by denis on 9/10/13.
*/
class Task {
final String path;
final String args;
final String description;
Task(String path, String args, String description) {
this.path = path;
this.args = args;
this.description = description;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import com.intellij.idea.StartupUtil;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.wm.impl.SystemDock;
import java.io.File;

Expand All @@ -29,12 +28,12 @@
*/
public class WinDockDelegate implements SystemDock.Delegate {

private static final Logger LOG = Logger.getInstance("#com.intellij.ui.win.WinDockDelegate");

private static final String javaExe = System.getProperty("java.home") + File.separatorChar + "bin" + File.separatorChar + "javaw.exe";
private static final String argsToExecute = new StringBuilder(" -classpath ").append(PathManager.getJarPathForClass(SocketControlHelper.class)).
append(" com.intellij.ui.win.SocketControlHelper ").append(StartupUtil.getAcquiredPort())
.append(" ").toString();
private static final String argsToExecute = " -classpath \"" +
PathManager.getJarPathForClass(SocketControlHelper.class) +
"\" com.intellij.ui.win.SocketControlHelper " +
StartupUtil.getAcquiredPort() +
" ";

private static boolean initialized = false;
private static final SystemDock.Delegate instance = new WinDockDelegate();
Expand All @@ -44,12 +43,10 @@ private WinDockDelegate() {}
public void updateRecentProjectsMenu () {
final AnAction[] recentProjectActions = RecentProjectsManagerBase.getInstance().getRecentProjectsActions(false);
RecentTasks.clear();
RecentTasks.Task[] tasks = new RecentTasks.Task[recentProjectActions.length];
Task[] tasks = new Task[recentProjectActions.length];
for (int i = 0; i < recentProjectActions.length; i ++) {
ReopenProjectAction rpa = (ReopenProjectAction)recentProjectActions[i];
tasks[i] = new RecentTasks.Task(javaExe,
argsToExecute + rpa.getProjectPath(),
rpa.getProjectName());
tasks[i] = new Task(javaExe, argsToExecute + rpa.getProjectPath(), rpa.getProjectName());
}
RecentTasks.addTasks(tasks);
}
Expand Down

0 comments on commit dff5e27

Please sign in to comment.