public Antlr4OutliningTagger([NotNull] Antlr4OutliningTaggerProvider provider, [NotNull] ITextBuffer textBuffer) { Requires.NotNull(provider, nameof(provider)); Requires.NotNull(textBuffer, nameof(textBuffer)); _provider = provider; _textBuffer = textBuffer; _backgroundParser = (Antlr4BackgroundParser)provider.BackgroundParserFactoryService.GetBackgroundParser(textBuffer); _backgroundParser.ParseComplete += HandleBackgroundParseComplete; _backgroundParser.RequestParse(false); }
public Antlr4OutliningTagger(Antlr4OutliningTaggerProvider provider, ITextBuffer textBuffer) { Contract.Requires <ArgumentNullException>(provider != null, "provider"); Contract.Requires <ArgumentNullException>(textBuffer != null, "textBuffer"); _provider = provider; _textBuffer = textBuffer; _backgroundParser = (Antlr4BackgroundParser)provider.BackgroundParserFactoryService.GetBackgroundParser(textBuffer); _backgroundParser.ParseComplete += HandleBackgroundParseComplete; _backgroundParser.RequestParse(false); }
public Antlr4OutliningTagger(ITextBuffer textBuffer, Antlr4BackgroundParser backgroundParser, Antlr4OutliningTaggerProvider provider) { Contract.Requires <ArgumentNullException>(textBuffer != null, "textBuffer"); Contract.Requires <ArgumentNullException>(backgroundParser != null, "backgroundParser"); Contract.Requires <ArgumentNullException>(provider != null, "provider"); this.TextBuffer = textBuffer; this.BackgroundParser = backgroundParser; this._provider = provider; this.BackgroundParser.ParseComplete += HandleBackgroundParseComplete; this.BackgroundParser.RequestParse(false); }