public void OpenRevision(string revisionText) { if (string.IsNullOrEmpty(revisionText)) { throw new ArgumentNullException("revisionText"); } long rev; IssueRepository repository = CurrentIssueRepository; if (repository != null && repository.CanNavigateToRevision && long.TryParse(revisionText, out rev)) { try { repository.NavigateToRevision(rev); return; } catch { } // connector code } IAnkhWebBrowser web = GetService <IAnkhWebBrowser>(); if (web != null) { Uri uri = CommitSettings.GetRevisionUri(revisionText); if (uri != null && !uri.IsFile && !uri.IsUnc) { web.Navigate(uri); } } }
/// <summary> /// Passes the open request to the current issue repository if available, /// otherwise tries to open web browser base on project settings /// </summary> /// <param name="issueId">Issue Id</param> public void OpenIssue(string issueId) { if (string.IsNullOrEmpty(issueId)) { throw new ArgumentNullException("issueId"); } IssueRepository repository = CurrentIssueRepository; if (repository != null) { try { repository.NavigateTo(issueId); return; } catch { } // connector code } IAnkhWebBrowser web = GetService <IAnkhWebBrowser>(); if (web != null) { Uri uri = CommitSettings.GetIssueTrackerUri(issueId); if (uri != null && !uri.IsFile && !uri.IsUnc) { web.Navigate(uri); } } }