public void NavigateTo(bool usePreviewPane = true) { if (LineMarker != null) { LineMarker?.NavigateTo(usePreviewPane); } else { // The user clicked an inline link with an integer target, which points to // a Location object that does NOT have a region associated with it. // Before anything else, see if this is an external link we should open in the browser. if (Uri.TryCreate(this.FilePath, UriKind.Absolute, out Uri uri)) { if (!uri.IsFile) { System.Diagnostics.Process.Start(uri.OriginalString); return; } } if (!File.Exists(this.FilePath)) { CodeAnalysisResultManager.Instance.TryRebaselineAllSarifErrors(RunId, this.UriBaseId, this.FilePath); } if (File.Exists(this.FilePath)) { SdkUIUtilities.OpenDocument(SarifViewerPackage.ServiceProvider, this.FilePath, usePreviewPane); } } }
public void OnDeselectKeyEvent() { // Remove hover marker LineMarker.RemoveMarker(); // Add default marker instead LineMarker.NavigateTo(true, null, false); }
public void NavigateTo(bool usePreviewPane = true) { LineMarker?.NavigateTo(usePreviewPane); }
/// <summary> /// A method for handling the key event when it is selected /// </summary> public void OnSelectKeyEvent() { // Remove previous highlighting and replace with hover color LineMarker.RemoveMarker(); LineMarker.NavigateTo(true, ResultTextMarker.HOVER_SELECTION_COLOR, true); }