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; } }
public UpdateSuggestedActionSet(SuggestedActionProvider provider) : base(provider.TextBuffer, provider.TextView, Resources.Text.CheckForUpdates, _guid) { _provider = provider; }
public UninstallSuggestedAction(SuggestedActionProvider provider) : base(provider.TextBuffer, provider.TextView, GetDisplayText(provider), _guid) { _provider = provider; IconMoniker = KnownMonikers.Cancel; }