public void textChanged(object o, TextContentChangedEventArgs e) { ThreadHelper.ThrowIfNotOnUIThread(); ParseTree.Tree.Parse(e.After.GetText(), out bool parsed); results.Clear(); var root = ParseTree.Tree.Root(); Parse(root); //results.Add(new Result { span = new Span(0, e.After.Length - 1), type = NodeType.MPLCONTENT }); var errorStack = ParseTree.Tree.GetErrorStack(); generalPane.Clear(); if (!parsed) { try { foreach (var error in errorStack) { var document = getPropertyFromBuffer <ITextDocument>(e.Before.TextBuffer); string message = document.FilePath + error.getMessage() + '\n'; generalPane.OutputString(message); generalPane.Activate(); } } catch (InvalidOperationException er) { generalPane.OutputString(er.Message); generalPane.Activate(); } } ClassificationChanged?.Invoke(this, new ClassificationChangedEventArgs(new SnapshotSpan(e.After, 0, e.After.Length))); }
public async Task ClearAsync() { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); _hasOutputSinceSolutionOpened = false; _outputPane.Clear(); await TaskScheduler.Default; }
public OutputWindowWriter(DTE dte, IVsOutputWindowPane outputWindow) { _outputWindow = outputWindow; _dte = dte; _outputWindow.Clear(); }
private void CleanBinAndObj(object sender, EventArgs e) { var sw = new Stopwatch(); var solutionProjects = GetProjects(); _vsOutputWindowPane.Clear(); WriteToOutput($"Starting... Projects to clean: {solutionProjects.Length}"); uint cookie = 0; StatusBar.Progress(ref cookie, 1, string.Empty, 0, (uint)solutionProjects.Length); sw.Start(); for (uint index = 0; index < solutionProjects.Length; index++) { var project = solutionProjects[index]; var projectRootPath = GetProjectRootFolder(project); var message = $"Cleaning {project.UniqueName}"; WriteToOutput(message); StatusBar.Progress(ref cookie, 1, string.Empty, index, (uint)solutionProjects.Length); StatusBar.SetText(message); CleanDirectory(projectRootPath); } sw.Stop(); WriteToOutput($@"Finished. Elapsed: {sw.Elapsed:mm\:ss\.ffff}"); // Clear the progress bar. StatusBar.Progress(ref cookie, 0, string.Empty, 0, 0); StatusBar.FreezeOutput(0); StatusBar.SetText("Cleaned bin and obj"); }
public void Initialize() { ThreadHelper.ThrowIfNotOnUIThread(); try { _outputWindow = Package.GetGlobalService(typeof(SVsOutputWindow)) as IVsOutputWindow; } catch (Exception) { _outputWindow = null; } if (_outputWindow == null) { return; } var generatorOutputWindowPaneId = new Guid("D6002C1E-2DB8-4C9D-996D-A29364FB8DAC"); ErrorHandler.ThrowOnFailure(_outputWindow.CreatePane(ref generatorOutputWindowPaneId, "Unit Test Generator", 0, 1)); ErrorHandler.ThrowOnFailure(_outputWindow.GetPane(ref generatorOutputWindowPaneId, out _testingOutputPane)); if (_testingOutputPane != null) { ErrorHandler.ThrowOnFailure(_testingOutputPane.Clear()); ErrorHandler.ThrowOnFailure(_testingOutputPane.Activate()); } }
public static void ClearOutputWindow() { if (_pane != null) { _pane.Clear(); } }
public void Clear() { Start(); _outputWindowPane.Activate(); _outputWindowPane.Clear(); }
public OutputWindowWriter(DTE dte, IVsOutputWindowPane outputWindow) { _outputWindow = outputWindow; _dte = dte; _outputWindow.Clear(); }
public static void Clear() { if (_pane != null) { _pane.Clear(); } }
internal static void LogStartRunning() { IVsOutputWindowPane buildPane = BuildPane; buildPane.Clear(); buildPane.OutputString(String.Format(CultureInfo.InvariantCulture, "------ Roslyn script started: {0} ------{1}", DateTime.Now, Environment.NewLine)); }
private async Task OutputMessageAsync(string message, bool clear = false) { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); IVsOutputWindowPane outputPane = null; IVsWindowFrame windowFrame = null; var outputWindow = ServiceProvider.GlobalProvider.GetService(typeof(SVsOutputWindow)) as IVsOutputWindow; if (outputWindow != null && ErrorHandler.Failed(outputWindow.GetPane(windowGuid, out outputPane))) { outputWindow.CreatePane(windowGuid, "Meadow Device Explorer", 1, 1); outputWindow.GetPane(windowGuid, out outputPane); } var vsUiShell = ServiceProvider.GlobalProvider.GetService(typeof(SVsUIShell)) as IVsUIShell; uint flags = (uint)__VSFINDTOOLWIN.FTW_fForceCreate; vsUiShell?.FindToolWindow(flags, VSConstants.StandardToolWindows.Output, out windowFrame); if (clear) { outputPane?.Clear(); } windowFrame?.Show(); outputPane?.Activate(); outputPane?.OutputString($"[{DateTime.Now.ToLocalTime()}] {message}" + Environment.NewLine); }
public void ClearOutput() { if (_outputWindowPane != null) { ErrorHandler.ThrowOnFailure(_outputWindowPane.Clear()); } }
public async Task ClearAsync() { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); _cachedOutput.Clear(); _outputPane.Clear(); }
/// <summary> /// Removes all text from the Output Window pane. /// </summary> public static void Clear() { if (pane != null) { pane?.Clear(); } }
private void OnBuildStarted(object sender) { if (buildDemangledPane != null) { buildDemangledPane.Clear(); } }
/// <summary> /// Clears all text from pane. /// </summary> public void Clear() { #if VSSDK_15_AND_NEW ThreadHelper.ThrowIfNotOnUIThread(); //TODO: upgrade to 15 #endif pane.Clear(); }
/// <summary> /// Clears the content of the output window pane. /// </summary> public void Clear() { if (IsVirtual) { return; } _pane.Clear(); }
public OutputWindowWriter(DTE dte, IVsOutputWindowPane outputWindow) : base(CultureInfo.CurrentCulture) { _outputWindow = outputWindow; _dte = dte; _outputWindow.Clear(); }
public OutputWindowWriter(DTE dte, IVsOutputWindowPane outputWindow) : base(CultureInfo.CurrentCulture) { _outputWindow = outputWindow ?? throw new ArgumentNullException(nameof(outputWindow)); _dte = dte; _outputWindow.Clear(); }
public static void ClearDeploymentMessages() { ThreadHelper.JoinableTaskFactory.RunAsync(async() => { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); _nanoFrameworkMessagesPane.Clear(); }); }
/// <summary> /// Clears all of the content from the GCP window pane. /// </summary> public async Task ClearAsync() { IVsOutputWindowPane outputWindowPane = await _outputWindowPane.GetValueAsync(); await JoinableTaskFactory.SwitchToMainThreadAsync(); outputWindowPane.Clear(); }
/// <summary> /// Removes all text from the Output Window pane. /// </summary> public static void Clear() { ThreadHelper.ThrowIfNotOnUIThread(); if (pane != null) { pane.Clear(); } }
public static void ClearOutputWindow() { // Don't access _outputWindowPane through the property here so that we don't force creation ThreadHelper.JoinableTaskFactory.RunAsync(async() => { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); OutputWindowPaneValue?.Clear(); }); }
public void Clear() { ThreadHelper.JoinableTaskFactory.RunAsync(async() => { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); _pane.Clear(); }); }
public void Clear() { Start(); var f = _outputWindow as IVsWindowFrame; _outputWindowPane.Activate(); _outputWindowPane.Clear(); }
public void ClearRefactorPane() { IVsOutputWindowPane pane = GetPane(); if (pane != null) { pane.Clear(); } }
/// <summary> /// Initializes a new instance of the <see cref="IDEHelper"/> class. /// </summary> /// <param name="package">The package.</param> internal IDEHelper(ModelingPackage package) { this.package = package; Dte = (DTE)ModelingPackage.GetGlobalService(typeof(DTE)); errorList = new ErrorListProvider(package); // Fenetre de sortie IVsOutputWindow outputWindowService = GetService <IVsOutputWindow>(typeof(SVsOutputWindow)); if (outputWindowService != null) { Guid guid = Guid.NewGuid(); outputWindowService.CreatePane(ref guid, "Candle", 1, 1); outputWindowService.GetPane(ref guid, out outputPane); outputPane.Clear(); } }
/// <summary> /// Clear pane content /// </summary> public void Clear() { if (pane == null) { return; } int hr = pane.Clear(); Marshal.ThrowExceptionForHR(hr); }
private static void PrepareOutputWindow() { OutputWindowPane.Clear(); OutputWindowPane.Activate(); // Force output window to front var dte = Package.GetGlobalService(typeof(SDTE)) as DTE; dte.ExecuteCommand("View.Output"); }
public int Clear() { var result = target.Clear(); if (ErrorHandler.Failed(result)) { throw new Win32Exception(result); } return(result); }
protected bool DoBuild(KuinProjectNodeProperties kuinProperties, bool isReleaseMode) { IVsOutputWindowPane outPane = GetOutputWindowPane(); string commandLineArgs = kuinProperties?.CreateCommandLineArg(isReleaseMode); if (!Utilities.SaveDirtyFiles() || kuinProperties == null || outPane == null || string.IsNullOrEmpty(commandLineArgs)) { return(false); } if (!File.Exists(KuinclPath)) { MessageBox.Show( "Kuin compiler (kuincl.exe) path was not found: please set in 'Tool > Options > KuinStudio > Compiler Path'", "Kuin Studio", MessageBoxButton.OK, MessageBoxImage.Exclamation); return(false); } //ビルド using (var compileProcess = new Process() { StartInfo = new ProcessStartInfo() { UseShellExecute = false, CreateNoWindow = true, RedirectStandardOutput = true, StandardOutputEncoding = Encoding.Unicode, WorkingDirectory = kuinProperties.ActualWorkingDirectory, FileName = KuinclPath, Arguments = commandLineArgs, } }) { compileProcess.Start(); compileProcess.WaitForExit(); string res = string.Join("\n", "Start " + (isReleaseMode ? "Release" : "Debug") + " Build", "Command: " + KuinclPath + " " + commandLineArgs, compileProcess.StandardOutput.ReadToEnd()); outPane.Clear(); outPane.OutputString(res); outPane.Activate(); //kunncl output specification //0: success //non-0 (1): failure return(compileProcess.ExitCode == 0); } }