protected override Action <ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress) { IHtmlTagHeader tagHeader = GetTag(); if (tagHeader == null) { return(null); } // The easiest way to create an attribute is to create an HTML tag with an attribute in it // and then get the attribute from the tag. HtmlElementFactory factory = HtmlElementFactory.GetInstance(tagHeader.Language); IHtmlTag dummy = factory.CreateHtmlTag("<tag id=\"\"/>", tagHeader); ITagAttribute idAttr = dummy.Attributes.Single(); tagHeader.AddAttributeBefore(idAttr, null); // continuation to do after transaction committed return(textControl => // move cursor inside new created id attribute textControl.Caret.MoveTo(idAttr.ValueElement.GetDocumentRange().TextRange.StartOffset, CaretVisualPlacement.Generic)); }
public IType GetType(IHtmlTag treeTag) { // This is used by asp.net, to map tags to controls, I think return(TypeFactory.CreateUnknownType(treeTag)); }
public ParameterValueAttributeSetter(IHtmlTag tag) { _tag = tag; _attributes = new List <ParameterValue>(); }
public HtmlRenderer(TextWriter textWriter) { this.textWriter = textWriter; htmlTag = new HtmlTag(); }
public IType GetType(IHtmlTag treeTag) { // This is used by asp.net, to map tags to controls, I think return TypeFactory.CreateUnknownType(treeTag); }
public HtmlTag AddChild(IHtmlTag child) { children.Add(child); return this; }
public IType GetType(IHtmlTag treeTag) { // This is used by asp.net, to map tags to controls, I think return TypeFactory.CreateUnknownType(treeTag.GetPsiModule(), treeTag.GetResolveContext()); }