Esempio n. 1
0
 private AlloyOutliningTaggerWalker(ITreeNodeStream input, ReadOnlyCollection <IToken> tokens, AlloyOutliningTaggerProvider provider, ITextSnapshot snapshot)
     : base(input, snapshot, provider.OutputWindowService)
 {
     _tokens   = tokens;
     _provider = provider;
     _snapshot = snapshot;
 }
Esempio n. 2
0
        public AlloyOutliningTagger(ITextBuffer textBuffer, AlloyBackgroundParser backgroundParser, AlloyOutliningTaggerProvider 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);
        }
Esempio n. 3
0
        public AlloyOutliningTagger([NotNull] ITextBuffer textBuffer, [NotNull] AlloyBackgroundParser backgroundParser, [NotNull] AlloyOutliningTaggerProvider provider)
        {
            Requires.NotNull(textBuffer, nameof(textBuffer));
            Requires.NotNull(backgroundParser, nameof(backgroundParser));
            Requires.NotNull(provider, nameof(provider));

            this.TextBuffer       = textBuffer;
            this.BackgroundParser = backgroundParser;
            this._provider        = provider;

            this.BackgroundParser.ParseComplete += HandleBackgroundParseComplete;
            this.BackgroundParser.RequestParse(false);
        }
Esempio n. 4
0
        public static List <ITagSpan <IOutliningRegionTag> > ExtractOutliningRegions(IAstRuleReturnScope parseResult, ReadOnlyCollection <IToken> tokens, AlloyOutliningTaggerProvider provider, ITextSnapshot snapshot)
        {
            BufferedTreeNodeStream     input  = new BufferedTreeNodeStream(parseResult.Tree);
            AlloyOutliningTaggerWalker walker = new AlloyOutliningTaggerWalker(input, tokens, provider, snapshot);

            walker.compilationUnit();

            return(walker._outliningRegions);
        }