Skip to content

Commit

Permalink
Added descriptive tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
madskristensen committed Dec 17, 2013
1 parent 1e604b9 commit 63e9426
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -24,13 +24,15 @@ public CompletionType CompletionType
public IList<HtmlCompletion> GetEntries(HtmlCompletionContext context)
{
var list = new HashSet<string>();
string tooltip = string.Empty;

if (context.Element != null && _inputTypes.Contains(context.Element.Name))
{
context.Document.HtmlEditorTree.RootNode.Accept(this, list);
tooltip = "Extracted from a <label> element in this document";

This comment has been minimized.

Copy link
@SLaks

SLaks Dec 17, 2013

Collaborator

It would be cool to show the text or full source of the label too. (switch to a HashSet<HtmlCompletion>)

This comment has been minimized.

Copy link
@madskristensen

madskristensen Dec 17, 2013

Author Owner

I was thinking about that, but in many cases the text would just be the same value. For instance, the label text for email would probably be Email. I think it's easy to understand without adding more info

}

return list.Select(s => new HtmlCompletion(s, s, string.Empty, _glyph, HtmlIconAutomationText.AttributeIconText)).ToList();
return list.Select(s => new HtmlCompletion(s, s, tooltip, _glyph, HtmlIconAutomationText.AttributeIconText)).ToList();
}

public bool Visit(ElementNode element, object parameter)
Expand Down

0 comments on commit 63e9426

Please sign in to comment.