Merge branch 'master' of git.labs.intellij.net:idea/community
authorDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Tue, 7 Feb 2017 10:50:13 +0000 (13:50 +0300)
committerDmitry Trofimov <dmitry.trofimov@jetbrains.com>
Tue, 7 Feb 2017 10:50:13 +0000 (13:50 +0300)
plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalCustomizer.java
plugins/terminal/src/org/jetbrains/plugins/terminal/LocalTerminalDirectRunner.java
plugins/terminal/src/org/jetbrains/plugins/terminal/TerminalProjectOptionsProvider.kt
python/python-terminal/src/com/jetbrains/python/sdk/PyVirtualEnvTerminalCustomizer.kt

index caa6d26867f14c70709d2080924c3b89e20e65e8..9d50d7f61f293cd9f1cabdc57baedfcd1d3c146b 100644 (file)
@@ -18,7 +18,6 @@ package org.jetbrains.plugins.terminal;
 import com.intellij.openapi.extensions.ExtensionPointName;
 import com.intellij.openapi.options.UnnamedConfigurable;
 import com.intellij.openapi.project.Project;
-import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
 import java.util.Map;
@@ -36,7 +35,7 @@ public abstract class LocalTerminalCustomizer {
   }
 
   @Nullable
-  protected String getDefaultFolder() {
+  protected String getDefaultFolder(Project project) {
     return null;
   }
 
index 8569af01950e18c14c22507276819cd5a3e95fae..3acb72f202af155a8c6dc966ee083182352c6d83 100644 (file)
@@ -127,7 +127,7 @@ public class LocalTerminalDirectRunner extends AbstractTerminalRunner<PtyProcess
         command = customizer.customizeCommandAndEnvironment(myProject, command, envs);
 
         if (directory == null) {
-          directory = customizer.getDefaultFolder();
+          directory = customizer.getDefaultFolder(myProject);
         }
       }
       catch (Exception e) {
index f0d15298033dea52538286873815ac5863cc4318..c1627184a31b29846d091edefe912ea4a9683050 100644 (file)
@@ -56,7 +56,7 @@ class TerminalProjectOptionsProvider(val project: Project) : PersistentStateComp
         try {
 
           if (directory == null) {
-            directory = customizer.defaultFolder
+            directory = customizer.getDefaultFolder(project)
           }
         }
         catch (e: Exception) {
index 2bdbb4ce8460ff75ca2ad956943f0c838cc97628..839d7d5445ab155dfad195870f560e2d10fc5e76 100644 (file)
@@ -89,7 +89,7 @@ class PyVirtualEnvTerminalCustomizer : LocalTerminalCustomizer() {
   }
 
 
-  override fun getDefaultFolder(): String? {
+  override fun getDefaultFolder(project: Project): String? {
     return null
   }