private void DebuggerInstance_OnHalt(object sender, OnHaltEventArgs e) { Application.Current.Dispatcher.Invoke(() => { Logger.Log(NLog.LogLevel.Info, "Execution was halted."); this.IsPaused = true; this.CurrentLine = e.Line; this.CurrentColumn = e.Column; this.CallStack = this.DebuggerInstance.GetCallstack(); Application.Current.MainWindow.Activate(); var pff = Workspace.Instance.Solution.GetProjectFileFromArmAPath(e.DocumentPath); DocumentBase doc; if (pff == null) { var content = e.DocumentContent; if (string.IsNullOrWhiteSpace(content)) { content = "NA"; } this.CurrentDocument = doc = Workspace.Instance.CreateOrFocusTemporaryDocument(e.DocumentPath, content, ".sqf"); Logger.Info($"Created temporary document for {e.DocumentPath}"); } else { this.CurrentDocument = doc = Workspace.Instance.CreateOrFocusDocument(pff); } doc.RefreshVisuals(); this.LastEditorContext = doc as CodeEditorBaseDataContext; }, System.Windows.Threading.DispatcherPriority.Send); }
public UnderlineBackgroundRenderer(CodeEditorBaseDataContext cebdc) { this.EditorDataContext = cebdc; cebdc.OnLintingInfoUpdated += this.Cebdc_OnLintingInfoUpdated; }