Browse Source

fix displayed text in XamlCodeCompletionItem

4.1
Siegfried Pammer 14 years ago
parent
commit
6a704fd93a
  1. 5
      src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionItem.cs
  2. 6
      src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs

5
src/AddIns/BackendBindings/XamlBinding/XamlBinding/XamlCompletionItem.cs

@ -23,18 +23,21 @@ namespace ICSharpCode.XamlBinding @@ -23,18 +23,21 @@ namespace ICSharpCode.XamlBinding
this.Text = entity.Name;
else
this.Text = prefix + ":" + entity.Name;
this.Content = this.Text;
}
public XamlCodeCompletionItem(IEntity entity)
: base(entity)
{
this.Text = entity.Name;
this.Content = this.Text;
}
public XamlCodeCompletionItem(string text, IEntity entity)
: base(entity)
{
this.Text = text;
this.Content = this.Text;
}
public XamlCodeCompletionItem(IEntity entity, string prefix, string className)
@ -44,6 +47,7 @@ namespace ICSharpCode.XamlBinding @@ -44,6 +47,7 @@ namespace ICSharpCode.XamlBinding
this.Text = className + "." + entity.Name;
else
this.Text = prefix + ":" + className + "." + entity.Name;
this.Content = this.Text;
}
public override string ToString()
@ -61,6 +65,7 @@ namespace ICSharpCode.XamlBinding @@ -61,6 +65,7 @@ namespace ICSharpCode.XamlBinding
{
this.addType = addType;
this.Text = text;
this.Content = this.Text;
}
public override void Complete(CompletionContext context)

6
src/Main/Base/Project/Src/Editor/CodeCompletion/CodeCompletionItemProvider.cs

@ -242,6 +242,9 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion @@ -242,6 +242,9 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion
get { return entity; }
}
/// <summary>
/// The text inserted into the code editor.
/// </summary>
public string Text { get; set; }
public int Overloads { get; set; }
@ -471,6 +474,9 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion @@ -471,6 +474,9 @@ namespace ICSharpCode.SharpDevelop.Editor.CodeCompletion
}
#endregion
/// <summary>
/// The content displayed in the list.
/// </summary>
public object Content { get; set; }
object IFancyCompletionItem.Description {

Loading…
Cancel
Save