/// <summary> /// Initializes a new instance of the <see cref="ReplacePatternSmartTag" /> class. /// </summary> /// <param name="tag">The tag.</param> /// <param name="description">The description.</param> /// <param name="type">The type.</param> /// <param name="tagResult">The tag result.</param> public ReplacePatternSmartTag(string tag, string description, SmartTagType type, Func <Match, string, string> tagResult) { this.Description = description; this.Type = type; this.Tag = tag; this.TagResult = tagResult; this.tagApplicationRegex = new Regex(@"(?x)\$\{\<" + this.Tag + @"(?>\((?<Options>(?>(?<Paren>\()|(?<-Paren>\))|[^\(\)]+)*)\))?\>\}", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Compiled); }
/// <summary> /// Initializes a new instance of the <see cref="ReplacePatternSmartTag" /> class. /// </summary> /// <param name="tag">The tag.</param> /// <param name="description">The description.</param> /// <param name="type">The type.</param> /// <param name="tagResult">The tag result.</param> public ReplacePatternSmartTag(string tag, string description, SmartTagType type, Func<Match, string, string> tagResult) { this.Description = description; this.Type = type; this.Tag = tag; this.TagResult = tagResult; this.tagApplicationRegex = new Regex(@"(?x)\$\{\<" + this.Tag + @"(?>\((?<Options>(?>(?<Paren>\()|(?<-Paren>\))|[^\(\)]+)*)\))?\>\}", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase | RegexOptions.Compiled); }
public virtual void TriggerSmartTag(ITrackingPoint triggerPoint, SmartTagType type, SmartTagState state) { DismissSmartTag(); ISmartTagSession session = Provider.SmartTagBroker.CreateSmartTagSession(TextView, type, triggerPoint, state); if (session != null) { session.Dismissed += HandleSmartTagDismissed; SmartTagSession = session; } }
public ISmartTagSession CreateSmartTagSession(ITextView textView, SmartTagType type, ITrackingPoint triggerPoint, SmartTagState state) { var session = new MockSmartTagSession(this) { TextView = textView, Type = type, TriggerPoint = triggerPoint, State = state }; lock (_sessions) { _sessions.Add(new KeyValuePair<ITextView, ISmartTagSession>(textView, session)); } session.Dismissed += Session_Dismissed; return session; }
public ISmartTagSession CreateSmartTagSession(ITextView textView, SmartTagType type, ITrackingPoint triggerPoint, SmartTagState state) { var session = new MockSmartTagSession(this) { TextView = textView, Type = type, TriggerPoint = triggerPoint, State = state }; lock (_sessions) { _sessions.Add(new KeyValuePair <ITextView, ISmartTagSession>(textView, session)); } session.Dismissed += Session_Dismissed; return(session); }
/// <summary> /// Initializes a new instance of the <see cref="ReplacePatternSmartTag" /> class. /// </summary> /// <param name="tag">The tag.</param> /// <param name="description">The description.</param> /// <param name="type">The type.</param> /// <param name="tagResult">The tag result.</param> public ReplacePatternSmartTag(string tag, string description, SmartTagType type, Func <string, string> tagResult) : this(tag, description, type, (m, p) => tagResult(p)) { }
void ITvlIntellisenseController.TriggerSmartTag(ITrackingPoint triggerPoint, SmartTagType type, SmartTagState state) { Contract.Requires <ArgumentNullException>(triggerPoint != null, "triggerPoint"); throw new NotImplementedException(); }
public TodoGlyphTag(SmartTagType smartTagType, ReadOnlyCollection <SmartTagActionSet> actionSets) : base(smartTagType, actionSets) { }
/// <summary> /// Initializes a new instance of the <see cref="ReplacePatternSmartTag" /> class. /// </summary> /// <param name="tag">The tag.</param> /// <param name="description">The description.</param> /// <param name="type">The type.</param> /// <param name="tagResult">The tag result.</param> public ReplacePatternSmartTag(string tag, string description, SmartTagType type, Func<string, string> tagResult) : this(tag, description, type, (m, p) => tagResult(p)) { }
void ITvlIntellisenseController.TriggerSmartTag(ITrackingPoint triggerPoint, SmartTagType type, SmartTagState state) { Contract.Requires<ArgumentNullException>(triggerPoint != null, "triggerPoint"); throw new NotImplementedException(); }