protected override void Run() { var url = ShowInGithubCommand.GetUrl(); if (url != null) { Xwt.Clipboard.SetText(url); IdeApp.Workbench.StatusBar.ShowMessage("GitHub url successfully copied to clipboard"); } else { Xwt.Clipboard.SetText(""); IdeApp.Workbench.StatusBar.ShowError("GitHub url could not be copied to clipboard"); } }
protected override void Update(CommandInfo info) { var doc = IdeApp.Workbench.ActiveDocument; info.Visible = doc != null && doc.Editor != null && ShowInGithubCommand.GetGitDir(doc.FileName) != null; }