Exemple #1
0
        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.");
            }
        }
Exemple #2
0
 protected override void Update(CommandInfo info)
 {
     base.Update(info);
     info.Enabled = GistCommandHelper.IsGistAvialable();
 }