Merge remote-tracking branch 'origin/master' into amakeev/cmake-iml clion/163.4669
authorAnton Makeev <Anton.Makeev@jetbrains.com>
Fri, 16 Sep 2016 13:05:39 +0000 (15:05 +0200)
committerAnton Makeev <Anton.Makeev@jetbrains.com>
Fri, 16 Sep 2016 13:05:39 +0000 (15:05 +0200)
1  2 
platform/lang-impl/src/com/intellij/openapi/roots/impl/storage/ClasspathStorage.java

index ca51c4752d5db390f25d0cb6d3e2971c918405ea,a623e47061c4802813539d9e9978ed8bfd735081..38976a304b9e19c2bdc59bc7de106d720a273a58
@@@ -16,6 -16,7 +16,7 @@@
  package com.intellij.openapi.roots.impl.storage;
  
  import com.intellij.application.options.PathMacrosCollector;
+ import com.intellij.configurationStore.StateStorageBase;
  import com.intellij.ide.highlighter.ModuleFileType;
  import com.intellij.notification.Notification;
  import com.intellij.notification.NotificationType;
@@@ -24,7 -25,6 +25,6 @@@ import com.intellij.openapi.application
  import com.intellij.openapi.components.ComponentManager;
  import com.intellij.openapi.components.StateStorage;
  import com.intellij.openapi.components.TrackingPathMacroSubstitutor;
- import com.intellij.openapi.components.impl.stores.StateStorageBase;
  import com.intellij.openapi.components.impl.stores.StateStorageManager;
  import com.intellij.openapi.components.impl.stores.StorageManagerListener;
  import com.intellij.openapi.components.impl.stores.StorageUtil;
@@@ -267,13 -267,7 +267,13 @@@ public final class ClasspathStorage ext
      }
      else {
        module.setOption(JpsProjectLoader.CLASSPATH_ATTRIBUTE, storageId);
 -      module.setOption(JpsProjectLoader.CLASSPATH_DIR_ATTRIBUTE, provider.getContentRoot(model));
 +      String root = provider.getContentRoot(model);
 +      if (root == null) {
 +        module.clearOption(JpsProjectLoader.CLASSPATH_DIR_ATTRIBUTE);
 +      }
 +      else {
 +        module.setOption(JpsProjectLoader.CLASSPATH_DIR_ATTRIBUTE, root);
 +      }
      }
    }