mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use paths comparison
This commit is contained in:
@@ -58,6 +58,8 @@ import com.intellij.openapi.vfs.newvfs.events.VFileEvent;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.messages.MessageBusConnection;
|
||||
import com.intellij.util.net.NetUtils;
|
||||
import gnu.trove.THashSet;
|
||||
import gnu.trove.TObjectHashingStrategy;
|
||||
import org.jboss.netty.bootstrap.ServerBootstrap;
|
||||
import org.jboss.netty.channel.*;
|
||||
import org.jboss.netty.channel.group.ChannelGroup;
|
||||
@@ -76,8 +78,7 @@ import org.jetbrains.jps.cmdline.BuildMain;
|
||||
import org.jetbrains.jps.server.ClasspathBootstrap;
|
||||
import org.jetbrains.jps.server.Server;
|
||||
|
||||
import javax.tools.JavaCompiler;
|
||||
import javax.tools.ToolProvider;
|
||||
import javax.tools.*;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -845,8 +846,8 @@ public class BuildManager implements ApplicationComponent{
|
||||
|
||||
private static class ProjectData {
|
||||
final SequentialTaskExecutor taskQueue;
|
||||
private final Set<String> myChanged = new HashSet<String>();
|
||||
private final Set<String> myDeleted = new HashSet<String>();
|
||||
private final Set<String> myChanged = new THashSet<String>(PathHashingStrategy.INSTANCE);
|
||||
private final Set<String> myDeleted = new THashSet<String>(PathHashingStrategy.INSTANCE);
|
||||
private long myNextEventOrdinal = 0L;
|
||||
private boolean myNeedRescan = true;
|
||||
|
||||
@@ -891,6 +892,20 @@ public class BuildManager implements ApplicationComponent{
|
||||
myChanged.clear();
|
||||
myDeleted.clear();
|
||||
}
|
||||
|
||||
static class PathHashingStrategy implements TObjectHashingStrategy<String> {
|
||||
static final PathHashingStrategy INSTANCE = new PathHashingStrategy();
|
||||
|
||||
@Override
|
||||
public int computeHashCode(String path) {
|
||||
return FileUtil.pathHashCode(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(String path1, String path2) {
|
||||
return FileUtil.pathsEqual(path1, path2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user