private GherkinLanguageService CreateLanguageService(ITextBuffer textBuffer) { var project = VsxHelper.GetCurrentProject(textBuffer, AdaptersFactory, ServiceProvider); var projectScope = ProjectScopeFactory.GetProjectScope(project); var languageService = new GherkinLanguageService(projectScope, VisualStudioTracer, enableStepMatchColoring: IntegrationOptionsProvider.GetOptions().EnableStepMatchColoring); textBuffer.Changed += (sender, args) => languageService.TextBufferChanged(GetTextBufferChange(args)); return(languageService); }
private GherkinLanguageService CreateLanguageService(ITextBuffer textBuffer) { var project = VsxHelper.GetCurrentProject(textBuffer, AdaptersFactory, ServiceProvider); var projectScope = ProjectScopeFactory.GetProjectScope(project); var languageService = new GherkinLanguageService(projectScope, VisualStudioTracer); textBuffer.Changed += (sender, args) => languageService.TextBufferChanged(GetTextBufferChange(args)); languageService.Initialize(textBuffer); return(languageService); }
private GherkinLanguageService CreateLanguageService(ITextBuffer textBuffer) { var project = VsxHelper.GetCurrentProject(textBuffer, AdaptersFactory, ServiceProvider); var projectScope = ProjectScopeFactory.GetProjectScope(project); ContainerProvider.ObjectContainer.Resolve <InstallServicesHelper>().OnPackageUsed(); //TODO: find a better place var languageService = new GherkinLanguageService(projectScope, VisualStudioTracer, enableStepMatchColoring: IntegrationOptionsProvider.GetOptions().EnableStepMatchColoring); textBuffer.Changed += (sender, args) => languageService.TextBufferChanged(GetTextBufferChange(args)); return(languageService); }