public ReplWindowProxy GetInteractiveWindow(string title, PythonReplWindowProxySettings settings = null) { var iwp = GetService <IComponentModel>(typeof(SComponentModel))?.GetService <InteractiveWindowProvider>(); var window = iwp?.AllOpenWindows.FirstOrDefault(w => ((ToolWindowPane)w).Caption == title); if (window == null) { Trace.TraceWarning( "Failed to find {0} in {1}", title, string.Join(", ", iwp?.AllOpenWindows.Select(w => ((ToolWindowPane)w).Caption) ?? Enumerable.Empty <string>()) ); return(null); } return(new ReplWindowProxy(this, window.InteractiveWindow, (ToolWindowPane)window, settings ?? new PythonReplWindowProxySettings())); }
public ReplWindowProxy WaitForInteractiveWindow(string title, PythonReplWindowProxySettings settings = null) { var iwp = GetService <IComponentModel>(typeof(SComponentModel))?.GetService <InteractiveWindowProvider>(); IVsInteractiveWindow window = null; for (int retries = 20; retries > 0 && window == null; --retries) { System.Threading.Thread.Sleep(100); window = iwp?.AllOpenWindows.FirstOrDefault(w => ((ToolWindowPane)w).Caption == title); } if (window == null) { Trace.TraceWarning( "Failed to find {0} in {1}", title, string.Join(", ", iwp?.AllOpenWindows.Select(w => ((ToolWindowPane)w).Caption) ?? Enumerable.Empty <string>()) ); return(null); } return(new ReplWindowProxy(this, window.InteractiveWindow, (ToolWindowPane)window, settings ?? new PythonReplWindowProxySettings())); }
public ReplWindowProxy GetInteractiveWindow(Project project, PythonReplWindowProxySettings settings = null) { return(GetInteractiveWindow(project.Name + " Interactive", settings)); }
public ReplWindowProxy ExecuteInInteractive(Project project, PythonReplWindowProxySettings settings = null) { OpenSolutionExplorer().SelectProject(project); ExecuteCommand("Python.ExecuteInInteractive"); return(GetInteractiveWindow(project)); }
public ReplWindowProxy WaitForInteractiveWindow(string title, PythonReplWindowProxySettings settings = null) { var iwp = GetService<IComponentModel>(typeof(SComponentModel))?.GetService<InteractiveWindowProvider>(); IVsInteractiveWindow window = null; for (int retries = 20; retries > 0 && window == null; --retries) { System.Threading.Thread.Sleep(100); window = iwp?.AllOpenWindows.FirstOrDefault(w => ((ToolWindowPane)w).Caption == title); } if (window == null) { Trace.TraceWarning( "Failed to find {0} in {1}", title, string.Join(", ", iwp?.AllOpenWindows.Select(w => ((ToolWindowPane)w).Caption) ?? Enumerable.Empty<string>()) ); return null; } return new ReplWindowProxy(this, window.InteractiveWindow, (ToolWindowPane)window, settings ?? new PythonReplWindowProxySettings()); }
public ReplWindowProxy GetInteractiveWindow(string title, PythonReplWindowProxySettings settings = null) { var iwp = GetService<IComponentModel>(typeof(SComponentModel))?.GetService<InteractiveWindowProvider>(); var window = iwp?.AllOpenWindows.FirstOrDefault(w => ((ToolWindowPane)w).Caption == title); if (window == null) { Trace.TraceWarning( "Failed to find {0} in {1}", title, string.Join(", ", iwp?.AllOpenWindows.Select(w => ((ToolWindowPane)w).Caption) ?? Enumerable.Empty<string>()) ); return null; } return new ReplWindowProxy(this, window.InteractiveWindow, (ToolWindowPane)window, settings ?? new PythonReplWindowProxySettings()); }
public ReplWindowProxy GetInteractiveWindow(Project project, PythonReplWindowProxySettings settings = null) { return GetInteractiveWindow(project.Name + " Interactive", settings); }
public ReplWindowProxy ExecuteInInteractive(Project project, PythonReplWindowProxySettings settings = null) { OpenSolutionExplorer().SelectProject(project); ExecuteCommand("Python.ExecuteInInteractive"); return GetInteractiveWindow(project); }