IDEA-139415 Refresh files when switching to their editor tab (following IDEA-CR-4345)
authorDmitry Batrak <Dmitry.Batrak@jetbrains.com>
Thu, 3 Sep 2015 16:15:48 +0000 (19:15 +0300)
committerDmitry Batrak <Dmitry.Batrak@jetbrains.com>
Thu, 3 Sep 2015 16:16:53 +0000 (19:16 +0300)
platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorTabbedContainer.java
platform/platform-resources-en/src/messages/IdeBundle.properties

index 3d855bad74cf7c8cce440028fa002544b5f2d033..d6320f5d290b048fefc3f913fa37b851a3f8645d 100644 (file)
@@ -16,6 +16,7 @@
 package com.intellij.openapi.fileEditor.impl;
 
 import com.intellij.icons.AllIcons;
+import com.intellij.ide.GeneralSettings;
 import com.intellij.ide.IdeEventQueue;
 import com.intellij.ide.actions.CloseAction;
 import com.intellij.ide.actions.ShowFilePathAction;
@@ -121,8 +122,10 @@ public final class EditorTabbedContainer implements Disposable, CloseAction.Clos
           if (newEditor != null) {
             newEditor.selectNotify();
           }
-          
-          newFile.refresh(true, false);
+
+          if (GeneralSettings.getInstance().isSyncOnFrameActivation()) {
+            newFile.refresh(true, false);
+          }
         }
       }).setAdditionalSwitchProviderWhenOriginal(new MySwitchProvider())
     .setSelectionChangeHandler(new JBTabs.SelectionChangeHandler() {
index b337763d4a039eb938d4e4053b98453d837cbd43..8a713288e0d4e74c59fe8d181730818c5f1d9ee6 100644 (file)
@@ -35,7 +35,7 @@ label.inactive.timeout.sec= sec.
 search.in.the.background=Search in the background
 checkbox.save.files.automatically=Save files automatically if application is idle for
 checkbox.save.files.on.frame.deactivation=Save files on frame deactivation
-checkbox.synchronize.files.on.frame.activation=Synchronize files on frame activation
+checkbox.synchronize.files.on.frame.activation=Synchronize files on frame or editor tab activation
 checkbox.reopen.last.project.on.startup=Reopen last project on startup
 treenode.loading= loading...
 action.clear.list=_Clear List