public CodeCompletionItem(IEntity entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException("entity");
            }
            this.entity = entity;

            IAmbience ambience = AmbienceService.GetCurrentAmbience();

            ambience.ConversionFlags = entity is IClass ? ConversionFlags.ShowTypeParameterList : ConversionFlags.None;
            this.Text = ambience.Convert(entity);
            ambience.ConversionFlags = ConversionFlags.StandardConversionFlags;
            if (entity is IClass)
            {
                // Show fully qualified Type name (called UseFullyQualifiedMemberNames though)
                ambience.ConversionFlags |= ConversionFlags.UseFullyQualifiedMemberNames;
            }
            description    = ambience.Convert(entity);
            this.Image     = ClassBrowserIconService.GetIcon(entity);
            this.Overloads = 1;
            this.InsertGenericArguments = false;

            this.Priority = CodeCompletionDataUsageCache.GetPriority(entity.DotNetName, true);
        }
 protected void MarkAsUsed()
 {
     CodeCompletionDataUsageCache.IncrementUsage(entity.DotNetName);
 }
 public KeywordCompletionItem(string text) : base(text)
 {
     this.Image = ClassBrowserIconService.Keyword;
     priority   = CodeCompletionDataUsageCache.GetPriority("keyword." + this.Text, true);
 }
 public override void Complete(CompletionContext context)
 {
     CodeCompletionDataUsageCache.IncrementUsage("keyword." + this.Text);
     base.Complete(context);
 }
 void Button_Click(object sender, RoutedEventArgs e)
 {
     CodeCompletionDataUsageCache.ResetCache();
 }