add store.track.module.root.manager.changes

This commit is contained in:
Vladimir Krivosheev
2017-01-10 10:35:17 +01:00
parent 26d393a0d7
commit f83dec7979
2 changed files with 12 additions and 4 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2017 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.
@@ -31,6 +31,7 @@ import com.intellij.openapi.roots.ex.ProjectRootManagerEx;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.util.InvalidDataException;
import com.intellij.openapi.util.JDOMExternalizable;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.pointers.VirtualFilePointerManager;
import com.intellij.util.ThrowableRunnable;
@@ -177,7 +178,7 @@ public class ModuleRootManagerImpl extends ModuleRootManager implements Disposab
ModifiableModelCommitter.multiCommit(new ModifiableRootModel[]{rootModel}, moduleModel);
if (changed) {
myModificationCount++;
stateChanged();
}
}
@@ -186,14 +187,13 @@ public class ModuleRootManagerImpl extends ModuleRootManager implements Disposab
rootModel.dispose();
try {
((ModuleRootManagerImpl)getInstance(rootModel.getModule())).myModificationCount++;
((ModuleRootManagerImpl)getInstance(rootModel.getModule())).stateChanged();
}
catch (Exception e) {
LOG.error(e);
}
}
@Override
@NotNull
public Module[] getDependencies() {
@@ -364,6 +364,13 @@ public class ModuleRootManagerImpl extends ModuleRootManager implements Disposab
}
}
private void stateChanged() {
if (Registry.is("store.track.module.root.manager.changes", false)) {
LOG.error("ModelRootManager state changed");
}
myModificationCount++;
}
public static class ModuleRootManagerState implements JDOMExternalizable {
private RootModelImpl myRootModel;
private Element myRootModelElement;
@@ -912,6 +912,7 @@ typing.freeze.report.dumps.description=Automatically reports thread dumps to our
store.basedir.parent.detection=true
store.save.use.modificationCount=true
store.track.module.root.manager.changes=false
ide.ui.composite.editor.for.combobox.description=Allows to use composite components based on JPanel as a ComboBox editor
ide.ui.composite.editor.for.combobox=true