public void CleanUp() { Workspace.CleanUpWaitingService(); Workspace.CleanUpWorkspace(); SolutionExplorer.CleanUpOpenSolution(); InteractiveWindow.CloseInteractiveWindow(); }
protected override void Dispose(bool disposing) { if (!IsDisposed) { try { InteractiveWindow.CloseAll(this); } catch (Exception ex) { Console.WriteLine("Error while closing all interactive windows"); Console.WriteLine(ex); } if (_deletePerformanceSessions) { try { dynamic profiling = Dte.GetObject("PythonProfiling"); for (dynamic session = profiling.GetSession(1); session != null; session = profiling.GetSession(1)) { profiling.RemoveSession(session, true); } } catch (Exception ex) { Console.WriteLine("Error while cleaning up profiling sessions"); Console.WriteLine(ex); } } } base.Dispose(disposing); }
public static int OpenUI(IntPtr client, [MarshalAs(UnmanagedType.LPStr)] string args) { string[] arguments = args.Split(" ".ToCharArray()); bool showModal = false; if (arguments.Length > 0 && !bool.TryParse(arguments[0], out showModal)) { showModal = false; } try { IDebugClient debugClient = (IDebugClient)Marshal.GetUniqueObjectForIUnknown(client); DbgEngDll.InitializeContext(debugClient); new Task(() => { if (showModal) { InteractiveWindow.ShowModalWindow(); } else { InteractiveWindow.ShowWindow(); } }).Start(); return(0); } catch (Exception ex) { Console.WriteLine(ex.ToString()); return(ex.HResult); } }
public CSharpInteractiveDemo(VisualStudioInstanceFactory instanceFactory) { _visualStudio = instanceFactory.GetNewOrUsedInstance(); _interactiveWindow = _visualStudio.Instance.CSharpInteractiveWindow; _interactiveWindow.ShowAsync().GetAwaiter().GetResult(); _interactiveWindow.ResetAsync().GetAwaiter().GetResult(); }
public void VerifyReturnIndentCurrentLine() { InteractiveWindow.ClearScreen(); SendKeys(" ("); SendKeys(")"); SendKeys(VirtualKey.Left); SendKeys(VirtualKey.Enter); VerifyCaretPosition(12); }
/// <summary> /// Click on the camera will display a capture window /// </summary> private void cameraImage_MouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e) { if (!(tableManager.InputManager.InteractiveWindow != null && tableManager.InputManager.InteractiveWindow.IsVisible)) { InteractiveWindow intWin = new InteractiveWindow(); intWin.Owner = CommonAttribService.mainWindow; tableManager.InputManager.InteractiveWindow = intWin; intWin.Show(); } }
public OutputBuffer(InteractiveWindow window) { Reset(); this.mutex = new object(); this.window = window; this.timer = new DispatcherTimer(); this.timer.Tick += (sender, args) => Flush(); this.timer.Interval = TimeSpan.FromMilliseconds(AutoFlushMilliseconds); }
public ISmartIndent CreateSmartIndent(ITextView view) { var window = InteractiveWindow.FromBuffer(view.TextBuffer); if (window == null || window.CurrentLanguageBuffer == null) { return(null); } return(InteractiveSmartIndenter.Create(this.indentProviders, window.CurrentLanguageBuffer.ContentType, view)); }
/// <summary> /// Shows the interactive window. /// </summary> /// <param name="modal">if set to <c>true</c> window will be shown as modal dialog.</param> public static void ShowInteractiveWindow(bool modal) { if (modal) { InteractiveWindow.ShowModalWindow(); } else { InteractiveWindow.ShowWindow(); } }
public void CleanUp() { Workspace.CleanUpWaitingService(); Workspace.CleanUpWorkspace(); SolutionExplorer.CleanUpOpenSolution(); // Close any windows leftover from previous (failed) tests InteractiveWindow.CloseInteractiveWindow(); ChangeSignatureDialog.CloseWindow(); GenerateTypeDialog.CloseWindow(); ExtractInterfaceDialog.CloseWindow(); }
protected override void Dispose(bool disposing) { if (!IsDisposed) { try { InteractiveWindow.CloseAll(this); } catch (Exception ex) { Console.WriteLine("Error while closing all interactive windows"); Console.WriteLine(ex); } } base.Dispose(disposing); }
public void TypingHelpDirectiveWorks() { InteractiveWindow.ShowWindow(waitForPrompt: true); // Directly type #help, rather than sending it through SubmitText. We want to actually test // that completion doesn't interfere and there aren't problems with the content-type switching. VisualStudio.Instance.SendKeys.Send("#help"); Assert.EndsWith("#help", InteractiveWindow.GetReplText()); VisualStudio.Instance.SendKeys.Send("\n"); InteractiveWindow.WaitForReplOutputContains("REPL commands"); }
static void Main(string[] args) { Options options = null; Parser.Default.ParseArguments <Options>(args) .WithParsed(o => options = o); if (options == null) { return; } DebuggerInitialization.OpenDump(options.DumpPath, options.SymbolPath); InteractiveWindow.ShowModalWindow(); }
public void CleanUp() { Workspace.CleanUpWaitingService(); Workspace.CleanUpWorkspace(); SolutionExplorer.CleanUpOpenSolution(); Workspace.WaitForAllAsyncOperations(); // Close any windows leftover from previous (failed) tests InteractiveWindow.CloseInteractiveWindow(); ObjectBrowserWindow.CloseWindow(); ChangeSignatureDialog.CloseWindow(); GenerateTypeDialog.CloseWindow(); ExtractInterfaceDialog.CloseWindow(); StartPage.CloseWindow(); // Prevent the start page from showing after each solution closes StartPage.SetEnabled(false); }
/// <summary> /// Gets the interactive window associated with the text buffer if the text /// buffer is being hosted in the interactive window. /// /// Returns null if the text buffer is not hosted in the interactive window. /// </summary> public static IInteractiveWindow GetInteractiveWindow(this ITextBuffer buffer) { return(InteractiveWindow.FromBuffer(buffer)); }
void IVsInteractiveWindow.SetLanguage(Guid languageServiceGuid, IContentType contentType) => InteractiveWindow.SetLanguage(languageServiceGuid, contentType);