public static List<IEditorNavigationTarget> ExtractNavigationTargets(IAstRuleReturnScope parseResult, ReadOnlyCollection<IToken> tokens, AlloyEditorNavigationSourceProvider provider, ITextSnapshot snapshot) { BufferedTreeNodeStream input = new BufferedTreeNodeStream(parseResult.Tree); AlloyEditorNavigationSourceWalker walker = new AlloyEditorNavigationSourceWalker(input, snapshot, tokens, provider.EditorNavigationTypeRegistryService, provider.GlyphService, provider.OutputWindowService); walker.compilationUnit(); return walker._targets; }
public AlloyEditorNavigationSource(ITextBuffer textBuffer, AlloyBackgroundParser backgroundParser, AlloyEditorNavigationSourceProvider 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); }
public AlloyEditorNavigationSource([NotNull] ITextBuffer textBuffer, [NotNull] AlloyBackgroundParser backgroundParser, [NotNull] AlloyEditorNavigationSourceProvider 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); }
public AlloyEditorNavigationSource(ITextBuffer textBuffer, AlloyBackgroundParser backgroundParser, AlloyEditorNavigationSourceProvider 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); }
public static List <IEditorNavigationTarget> ExtractNavigationTargets(IAstRuleReturnScope parseResult, ReadOnlyCollection <IToken> tokens, AlloyEditorNavigationSourceProvider provider, ITextSnapshot snapshot) { BufferedTreeNodeStream input = new BufferedTreeNodeStream(parseResult.Tree); AlloyEditorNavigationSourceWalker walker = new AlloyEditorNavigationSourceWalker(input, snapshot, tokens, provider.EditorNavigationTypeRegistryService, provider.GlyphService, provider.OutputWindowService); walker.compilationUnit(); return(walker._targets); }