diff --git a/build/conf/ideaCE.properties b/build/conf/ideaCE.properties index 81afaed35094..8224c19bad6d 100644 --- a/build/conf/ideaCE.properties +++ b/build/conf/ideaCE.properties @@ -1,8 +1,10 @@ #--------------------------------------------------------------------- -# IDE copies library jars to prevent their locking. If copying is not desirable, specify "true" +# IDEA can copy library .jar files to prevent their locking. +# By default this behavior is enabled on Windows and disabled on other platforms. +# Uncomment this property to override. #--------------------------------------------------------------------- -idea.jars.nocopy=false +# idea.jars.nocopy=false #--------------------------------------------------------------------- # The VM option value to be used start the JVM in debug mode. diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/jar/JarFileSystemImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/jar/JarFileSystemImpl.java index 32e02ea2c49a..9cdc900d8117 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/jar/JarFileSystemImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/jar/JarFileSystemImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * 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. @@ -49,13 +49,15 @@ public class JarFileSystemImpl extends JarFileSystem implements ApplicationCompo private static final class JarFileSystemImplLock { } private static final JarFileSystemImplLock LOCK = new JarFileSystemImplLock(); - private final Set myNoCopyJarPaths = - SystemProperties.getBooleanProperty("idea.jars.nocopy", !SystemInfo.isWindows) ? null : new ConcurrentHashSet(FileUtil.PATH_HASHING_STRATEGY); + private final Set myNoCopyJarPaths; private File myNoCopyJarDir; private final Map myHandlers = new THashMap(FileUtil.PATH_HASHING_STRATEGY); private String[] jarPathsCache; public JarFileSystemImpl(MessageBus bus) { + boolean noCopy = SystemProperties.getBooleanProperty("idea.jars.nocopy", !SystemInfo.isWindows); + myNoCopyJarPaths = noCopy ? null : new ConcurrentHashSet(FileUtil.PATH_HASHING_STRATEGY); + bus.connect().subscribe(VirtualFileManager.VFS_CHANGES, new BulkFileListener.Adapter() { @Override public void after(@NotNull final List events) {