예제 #1
0
        private static string GetDisplayText(SuggestedActionProvider provider)
        {
            string cleanId = provider.InstallationState.LibraryId;

            if (cleanId.Length > _maxlength + 10)
            {
                cleanId = $"...{cleanId.Substring(cleanId.Length - _maxlength)}";
            }

            return(string.Format(Resources.Text.UninstallLibrary, cleanId));
        }
        public UpdateSuggestedAction(SuggestedActionProvider provider, string libraryId, string displayText, bool disabled = false)
            : base(provider.TextBuffer, provider.TextView, displayText, _guid)
        {
            _provider         = provider;
            _updatedLibraryId = libraryId;
            _disabled         = disabled;

            if (!disabled)
            {
                IconMoniker = KnownMonikers.StatusReady;
            }
        }
예제 #3
0
 public UpdateSuggestedActionSet(SuggestedActionProvider provider)
     : base(provider.TextBuffer, provider.TextView, Resources.Text.CheckForUpdates, _guid)
 {
     _provider = provider;
 }
예제 #4
0
 public UninstallSuggestedAction(SuggestedActionProvider provider)
     : base(provider.TextBuffer, provider.TextView, GetDisplayText(provider), _guid)
 {
     _provider   = provider;
     IconMoniker = KnownMonikers.Cancel;
 }