コード例 #1
0
        public void LogEvent(NodejsToolsLogEvent logEvent, object argument) {
            int val;
            switch (logEvent) {
                case NodejsToolsLogEvent.Launch:
                    if ((int)argument != 0) {
                        _debugLaunchCount++;
                    } else {
                        _normalLaunchCount++;
                    }
                    break;
                case NodejsToolsLogEvent.SurveyNewsFrequency:
                    val = (int)argument;
                    if (Enum.IsDefined(typeof(SurveyNewsPolicy), val)) {
                        _surveyNewsPolicy = (SurveyNewsPolicy)val;
                    }
                    break;

                case NodejsToolsLogEvent.AnalysisLevel:
                    val = (int)argument;
                    if (Enum.IsDefined(typeof(AnalysisLevel), val)) {
                        _analysisLevel = (AnalysisLevel)val;
                    }
                    break;
            }
        }
コード例 #2
0
ファイル: InMemoryLogger.cs プロジェクト: tbscer/nodejstools
        public void LogEvent(NodejsToolsLogEvent logEvent, object argument)
        {
            int val;

            switch (logEvent)
            {
            case NodejsToolsLogEvent.Launch:
                if ((int)argument != 0)
                {
                    _debugLaunchCount++;
                }
                else
                {
                    _normalLaunchCount++;
                }
                break;

            case NodejsToolsLogEvent.SurveyNewsFrequency:
                val = (int)argument;
                if (Enum.IsDefined(typeof(SurveyNewsPolicy), val))
                {
                    _surveyNewsPolicy = (SurveyNewsPolicy)val;
                }
                break;

            case NodejsToolsLogEvent.AnalysisLevel:
                val = (int)argument;
                if (Enum.IsDefined(typeof(AnalysisLevel), val))
                {
                    _analysisLevel = (AnalysisLevel)val;
                }
                break;
            }
        }
コード例 #3
0
 internal void SyncControlWithPageSettings(NodejsIntellisenseOptionsPage page)
 {
     AnalysisLevel = page.AnalysisLevel;
     _nodejsES5IntelliSenseOptionsControl.SyncControlWithPageSettings(page);
     _salsaLsIntellisenseOptionsControl.SyncControlWithPageSettings(page);
 }
コード例 #4
0
        internal VsProjectAnalyzer(
            AnalysisLevel analysisLevel,
            bool saveToDisk,
            string projectFileDir = null
        ) {
            _projectFiles = new ConcurrentDictionary<string, ProjectItem>(StringComparer.OrdinalIgnoreCase);

            _analysisLevel = analysisLevel;
            _saveToDisk = saveToDisk;

            _limits = LoadLimits();
            if (projectFileDir != null) {
                _projectFileDir = projectFileDir;
                if (!LoadCachedAnalysis(_limits)) {
                    CreateNewAnalyzer(_limits);
                }
            } else {
                _implicitProject = true;
                CreateNewAnalyzer(_limits);
            }

            if (!_saveToDisk) {
                DeleteAnalysis();
            }

            _userCount = 1;

            InitializeCodeSettings();
        }
コード例 #5
0
        internal VsProjectAnalyzer(
            string projectFileDir = null
        ) {
            _projectFiles = new ConcurrentDictionary<string, ProjectItem>(StringComparer.OrdinalIgnoreCase);
            if (NodejsPackage.Instance != null) {
                _analysisLevel = NodejsPackage.Instance.IntellisenseOptionsPage.AnalysisLevel;
                _saveToDisk = NodejsPackage.Instance.IntellisenseOptionsPage.SaveToDisk;
            } else {
                _analysisLevel = AnalysisLevel.High;
                _saveToDisk = true;
            }

            var limits = LoadLimits();
            if (projectFileDir != null) {
                _projectFileDir = projectFileDir;
                if (!LoadCachedAnalysis(limits)) {
                    CreateNewAnalyzer(limits);
                }
            } else {
                _implicitProject = true;
                CreateNewAnalyzer(limits);
            }

            if (!_saveToDisk) {
                DeleteAnalysis();
            }

            _userCount = 1;

            InitializeCodeSettings();
        }
 internal void SyncControlWithPageSettings(NodejsIntellisenseOptionsPage page) {
     AnalysisLevel = page.AnalysisLevel;
     _nodejsES5IntelliSenseOptionsControl.SyncControlWithPageSettings(page);
     _salsaLsIntellisenseOptionsControl.SyncControlWithPageSettings(page);
 }