IDEA-205976: update a focused file before rebuilding a structure view

This commit is contained in:
Sergey Malenkov
2019-01-28 18:15:32 +03:00
parent d4058c5cf4
commit a175c4094f
@@ -122,7 +122,10 @@ public class StructureViewWrapperImpl implements StructureViewWrapper, Disposabl
@Override
public void hierarchyChanged(HierarchyEvent e) {
if (BitUtil.isSet(e.getChangeFlags(), HierarchyEvent.DISPLAYABILITY_CHANGED)) {
LOG.debug("displayability changed");
boolean visible = myToolWindow.isVisible();
LOG.debug("displayability changed: " + visible);
if (!visible) return; // do nothing on hide
loggedRun("update file", StructureViewWrapperImpl.this::checkUpdate);
scheduleRebuild();
}
}