public AnalysisItem AnalyzeTextView(ITextView textView) { // Get an AnalysisItem for this file, creating one if necessary var res = textView.TextBuffer.Properties.GetOrCreateSingletonProperty <AnalysisItem>(() => { string path = textView.GetFilePath(); AnalysisItem item; if (path != null && _projectFiles.TryGetValue(path, out item)) { return(item); } var initialSnapshot = textView.TextBuffer.CurrentSnapshot; var entry = new ProjectEntry( SnapshotTextContentProvider.Make(_engine, initialSnapshot, path), textView.GetFilePath(), new SnapshotCookie(initialSnapshot) ); item = new AnalysisItem(entry); if (path != null) { _projectFiles[path] = item; if (ImplicitProject) { AddImplicitFiles(Path.GetDirectoryName(Path.GetFullPath(path))); } } return(item); }); // kick off initial processing on the ITextWindow _queue.EnqueueBuffer(textView); return(res); }
internal AnalysisItem(ProjectEntry entry) { _entry = entry; //_state = ItemState.Prepare; }
public override int GetHashCode() { return(Line.GetHashCode() ^ ProjectEntry.GetHashCode()); }
public AstScopeNode(SourceUnitTree ast, ProjectEntry projectEntry) { _ast = ast; _projectEntry = projectEntry; }