public GherkinTextBufferPartialParserListener(GherkinDialect gherkinDialect, ITextSnapshot textSnapshot, GherkinFileEditorClassifications classifications, IGherkinFileScope previousScope, int changeLastLine, int changeLineDelta)
     : base(gherkinDialect, textSnapshot, classifications)
 {
     this.previousScope = previousScope;
     this.changeLastLine = changeLastLine;
     this.changeLineDelta = changeLineDelta;
 }
 protected GherkinTextBufferParserListenerBase(GherkinDialect gherkinDialect, ITextSnapshot textSnapshot, IProjectScope projectScope)
 {
     this.textSnapshot = textSnapshot;
     this.classifications = projectScope.Classifications;
     this.projectScope = projectScope;
    
     gherkinFileScope = new GherkinFileScope(gherkinDialect, textSnapshot);
 }
예제 #3
0
 public NoProjectScope(GherkinFileEditorClassifications classifications, IVisualStudioTracer visualStudioTracer)
 {
     GherkinTextBufferParser = new GherkinTextBufferParser(this, visualStudioTracer);
     GherkinProcessingScheduler = new GherkinProcessingScheduler(visualStudioTracer);
     SpecFlowProjectConfiguration = new SpecFlowProjectConfiguration();
     GherkinDialectServices = new GherkinDialectServices(SpecFlowProjectConfiguration.GeneratorConfiguration.FeatureLanguage); 
     Classifications = classifications;
 }
 public GherkinFileEditorParserListener(ITextSnapshot textSnapshot, GherkinFileEditorClassifications classifications, GherkinFileEditorInfo previousGherkinFileEditorInfo, int changeLastLine, int changeLineDelta)
 {
     this.textSnapshot = textSnapshot;
     this.changeLineDelta = changeLineDelta;
     this.changeLastLine = changeLastLine;
     this.classifications = classifications;
     this.previousGherkinFileEditorInfo = previousGherkinFileEditorInfo;
     gherkinFileEditorInfo = new GherkinFileEditorInfo();
 }
 protected GherkinTextBufferParserListenerBase(GherkinDialect gherkinDialect, ITextSnapshot textSnapshot, IProjectScope projectScope)
 {
     this.textSnapshot = textSnapshot;
     this.classifications = projectScope.Classifications;
     this.projectScope = projectScope;
     this.enableStepMatchColoring = projectScope.IntegrationOptionsProvider.GetOptions().EnableStepMatchColoring;
    
     gherkinFileScope = new GherkinFileScope(gherkinDialect, textSnapshot);
 }
        public GherkinFileEditorParserListener(ITextSnapshot textSnapshot, GherkinFileEditorClassifications classifications, GherkinFileEditorInfo previousGherkinFileEditorInfo, int lineOffset, int changeLastLine, int changeLineDelta)
        {
            this.textSnapshot = textSnapshot;
            this.changeLineDelta = changeLineDelta;
            this.changeLastLine = changeLastLine;
            this.lineOffset = lineOffset;
            this.classifications = classifications;
            this.previousGherkinFileEditorInfo = previousGherkinFileEditorInfo;
            gherkinFileEditorInfo = new GherkinFileEditorInfo();

            beforeFeature = !isPartialParsing;
        }
예제 #7
0
        public GherkinFileEditorParser(ITextBuffer buffer, IClassificationTypeRegistryService registry, SpecFlowProject specFlowProject)
        {
            this.buffer = buffer;
            this.specFlowProject = specFlowProject;
            this.buffer.Changed += BufferChanged;

            this.classifications = new GherkinFileEditorClassifications(registry);

            // initial parsing
            ChangeInfo changeInfo = new ChangeInfo(buffer);
            parsingTask = parsingTaskFactory.StartNew(() =>
                ParseAndTriggerChanges(GherkinFileEditorInfo, changeInfo));
        }
예제 #8
0
        public GherkinFileEditorParser(ITextBuffer buffer, IClassificationTypeRegistryService registry, IVisualStudioTracer visualStudioTracer, SpecFlowProject specFlowProject)
        {
            this.buffer = buffer;
            this.visualStudioTracer = visualStudioTracer;
            this.specFlowProject = specFlowProject;
            this.buffer.Changed += BufferChanged;

            this.classifications = new GherkinFileEditorClassifications(registry);

            // initial parsing
            visualStudioTracer.Trace("Initial parsing scheduled", ParserTraceCategory);
            ChangeInfo changeInfo = new ChangeInfo(buffer);
            parsingTask = parsingTaskFactory.StartNew(() =>
                ParseAndTriggerChanges(GherkinFileEditorInfo, changeInfo));
        }
예제 #9
0
        internal VsProjectScope(Project project, DteWithEvents dteWithEvents, GherkinFileEditorClassifications classifications, IVisualStudioTracer visualStudioTracer)
        {
            Classifications = classifications;
            this.project = project;
            this.visualStudioTracer = visualStudioTracer;
            //TODO: register for file changes, etc.

            parser = new GherkinTextBufferParser(this, visualStudioTracer);
            analyzer = new GherkinScopeAnalyzer(this, visualStudioTracer);
            GherkinProcessingScheduler = new GherkinProcessingScheduler(visualStudioTracer);

            specFlowProjectConfigurationReference = new SynchInitializedInstance<SpecFlowProjectConfiguration>(()=>
                DteProjectReader.LoadSpecFlowConfigurationFromDteProject(project) ?? new SpecFlowProjectConfiguration());
            gherkinDialectServicesReference = new SynchInitializedInstance<GherkinDialectServices>(() =>
                new GherkinDialectServices(SpecFlowProjectConfiguration.GeneratorConfiguration.FeatureLanguage));

            appConfigTracker = new VsProjectFileTracker(project, "App.config", dteWithEvents, visualStudioTracer);
            appConfigTracker.FileChanged += AppConfigTrackerOnFileChanged;
        }
예제 #10
0
        internal VsProjectScope(Project project, DteWithEvents dteWithEvents, GherkinFileEditorClassifications classifications, IVisualStudioTracer tracer, IIntegrationOptionsProvider integrationOptionsProvider)
        {
            Classifications = classifications;
            this.project = project;
            this.dteWithEvents = dteWithEvents;
            this.tracer = tracer;
            this.integrationOptionsProvider = integrationOptionsProvider;

            var integrationOptions = integrationOptionsProvider.GetOptions();

            parser = new GherkinTextBufferParser(this, tracer);
//TODO: enable when analizer is implemented
//            if (integrationOptions.EnableAnalysis)
//                analyzer = new GherkinScopeAnalyzer(this, visualStudioTracer);

            GherkinProcessingScheduler = new GherkinProcessingScheduler(tracer, integrationOptions.EnableAnalysis);

            GeneratorServices = new VsGeneratorServices(project, new VsSpecFlowConfigurationReader(project, tracer), tracer);
        }
 protected GherkinTextBufferParserListenerBase(GherkinDialect gherkinDialect, ITextSnapshot textSnapshot, GherkinFileEditorClassifications classifications)
 {
     this.textSnapshot = textSnapshot;
     this.classifications = classifications;
     gherkinFileScope = new GherkinFileScope(gherkinDialect, textSnapshot);
 }
 public GherkinTextBufferParserListener(GherkinDialect gherkinDialect, ITextSnapshot textSnapshot, GherkinFileEditorClassifications classifications)
     : base(gherkinDialect, textSnapshot, classifications)
 {
 }
예제 #13
0
        internal VsProjectScope(Project project, DteWithEvents dteWithEvents, GherkinFileEditorClassifications classifications, IVisualStudioTracer visualStudioTracer, IIntegrationOptionsProvider integrationOptionsProvider, IBindingSkeletonProviderFactory bindingSkeletonProviderFactory)
        {
            Classifications = classifications;
            this.project = project;
            this.dteWithEvents = dteWithEvents;
            this.visualStudioTracer = visualStudioTracer;
            this.integrationOptionsProvider = integrationOptionsProvider;
            this.bindingSkeletonProviderFactory = bindingSkeletonProviderFactory;

            var integrationOptions = integrationOptionsProvider.GetOptions();

            parser = new GherkinTextBufferParser(this, visualStudioTracer);
//TODO: enable when analizer is implemented
//            if (integrationOptions.EnableAnalysis)
//                analyzer = new GherkinScopeAnalyzer(this, visualStudioTracer);

            GherkinProcessingScheduler = new GherkinProcessingScheduler(visualStudioTracer, integrationOptions.EnableAnalysis);
        }