/* * Needed if we switch to per project Analysis levels internal NodejsTools.Options.AnalysisLevel AnalysisLevel(){ var analyzer = _analyzer; if (_analyzer != null) { return _analyzer.AnalysisLevel; } return NodejsTools.Options.AnalysisLevel.None; } */ private void IntellisenseOptionsPageAnalysisLevelChanged(object sender, EventArgs e) { var oldAnalyzer = _analyzer; _analyzer = null; var analyzer = new VsProjectAnalyzer(ProjectFolder); Reanalyze(this, analyzer); if (oldAnalyzer != null) { analyzer.SwitchAnalyzers(oldAnalyzer); if (oldAnalyzer.RemoveUser()) { oldAnalyzer.Dispose(); } } _analyzer = analyzer; _analyzer.MaxLogLength = NodejsPackage.Instance.IntellisenseOptionsPage.AnalysisLogMax; LogAnalysisLevel(); }
private void IntellisenseOptionsPageAnalysisLevelChanged(object sender, EventArgs e) { var analyzer = new VsProjectAnalyzer(IntellisenseOptionsPage.AnalysisLevel, IntellisenseOptionsPage.SaveToDisk); analyzer.SwitchAnalyzers(_analyzer); if (_analyzer.RemoveUser()) { _analyzer.Dispose(); } _analyzer = analyzer; LogLooseFileAnalysisLevel(); }