protected async override void Run() { try { var gistUrl = await GistCommandHelper.CreateGist(); Xwt.Clipboard.SetData(gistUrl); IdeApp.Workbench.StatusBar.ShowMessage(Stock.Ok, "Gist Url copied to clipboard."); } catch (Exception e) { LoggingService.LogError("Unable to create Gist.", e); IdeApp.Workbench.StatusBar.ShowMessage(Stock.Cancel, "Failed to create gist."); } }
protected override void Update(CommandInfo info) { base.Update(info); info.Enabled = GistCommandHelper.IsGistAvialable(); }