private IntellisenseDeclarations GetScopedIntellisenseDeclarations(int lineNum) { // get the node that the caret is in var scopedParseTree = compiledProject.GetScope(fileName, lineNum); var declarations = new IntellisenseDeclarations(); AddMembersFromScopeTree(declarations, scopedParseTree); AddKeywords(declarations, scopedParseTree); AddImports(declarations, GetDocument(scopedParseTree)); AddReferences(declarations, (ProjectTreeNode)compiledProject.ParseTree); declarations.Sort(); return declarations; }
private void AddMemberLookupDeclarations(IntellisenseDeclarations declarations, string lineSource, int line) { var members = GetMembersFromCurrentScope(line, lineSource); members.ForEach(e => { IBooParseTreeNode node = e.ToTreeNode(); if (node != null) declarations.Add(node); }); declarations.Sort(); }