public IHtmlSmartTag TryCreateSmartTag(ITextView textView, ITextBuffer textBuffer, ElementNode element, AttributeNode attribute, int caretPosition, HtmlPositionType positionType) { if ((element.IsStyleBlock() || element.IsJavaScriptBlock()) && element.InnerRange.Length > 5) { return new ExtractToFileSmartTag(textView, textBuffer, element); } return null; }
public IHtmlSmartTag TryCreateSmartTag(ITextView textView, ITextBuffer textBuffer, ElementNode element, AttributeNode attribute, int caretPosition, HtmlPositionType positionType) { if ((element.IsStyleBlock() || element.IsJavaScriptBlock()) && element.InnerRange.Length > 5) { return(new ExtractToFileSmartTag(textView, textBuffer, element)); } return(null); }
public IHtmlSmartTag TryCreateSmartTag(ITextView textView, ITextBuffer textBuffer, ElementNode element, AttributeNode attribute, int caretPosition, HtmlPositionType positionType) { if (element.IsStyleBlock() || element.IsJavaScriptBlock()) { return(new HtmlMinifySmartTag(textView, textBuffer, element)); } return(null); }
public IHtmlSmartTag TryCreateSmartTag(ITextView textView, ITextBuffer textBuffer, ElementNode element, AttributeNode attribute, int caretPosition, HtmlPositionType positionType) { if (element.IsStyleBlock() || element.IsJavaScriptBlock()) { return new HtmlMinifySmartTag(textView, textBuffer, element); } return null; }
public bool HasSuggestedActions(ITextView textView, ITextBuffer textBuffer, int caretPosition, ElementNode element, AttributeNode attribute, HtmlPositionType positionType) { if (!element.StartTag.Contains(caretPosition)) { return(false); } if (element.InnerRange.Length < 5) { return(false); } return(element.IsStyleBlock() || element.IsJavaScriptBlock()); }