public IProjectEntry AnalyzeFile(string path) { IProjectEntry item; if (!_projectFiles.TryGetValue(path, out item)) { if (path.EndsWith(".py", StringComparison.OrdinalIgnoreCase)) { var modName = PathToModuleName(path); item = _analysisState.AddModule( modName, path, null ); } else if (path.EndsWith(".xaml", StringComparison.OrdinalIgnoreCase)) { item = _analysisState.AddXamlFile(path); } if (item != null) { _projectFiles[path] = item; } } _queue.EnqueueFile(path); return(item); }
public AnalysisItem AnalyzeFile(string path) { AnalysisItem item; if (!_projectFiles.TryGetValue(path, out item)) { var entry = new ProjectEntry(FileTextContentProvider.Make(_engine, path), path, null); _projectFiles[path] = item = new AnalysisItem(entry); } _queue.EnqueueFile(path); return(item); }