public MSBuildValidationTagger(ITextBuffer buffer, JoinableTaskContext joinableTaskContext) { parser = BackgroundParser <MSBuildParseResult> .GetParser <MSBuildBackgroundParser> ((ITextBuffer2)buffer); parser.ParseCompleted += ParseCompleted; this.joinableTaskContext = joinableTaskContext; this.buffer = buffer; }
public void TextViewCreated(ITextView textView) { var buffer = (ITextBuffer2)textView.TextBuffer; // attach the parser to the buffer and initialize it var parser = BackgroundParser <MSBuildParseResult> .GetParser <MSBuildBackgroundParser> (buffer); IRuntimeInformation runtimeInformation = new MSBuildEnvironmentRuntimeInformation(); MSBuildSchemaProvider schemaProvider = new MSBuildSchemaProvider(); ITaskMetadataBuilder taskMetadataBuilder = TaskMetadataBuilder; parser.Initialize(runtimeInformation, schemaProvider, taskMetadataBuilder); //kick off a parse so it's ready when other things need it parser.GetOrParseAsync((ITextSnapshot2)buffer.CurrentSnapshot, CancellationToken.None); }
protected MSBuildBackgroundParser GetParser() => BackgroundParser <MSBuildParseResult> .GetParser <MSBuildBackgroundParser> ((ITextBuffer2)textBuffer);
protected TParser GetParser() => BackgroundParser <TResult> .GetParser <TParser> ((ITextBuffer2)textView.TextBuffer);