void MapObjects(SQProjectFileNode node, SQDeclaration declaration) { if (!_classviewenabled) { return; } SQObjectLibraryNode objectnode = _library._root; /*SQObjectLibraryNode globals = _library._global; * foreach (SQDeclare d in declaration.Children) * { * SQObjectLibraryNode onode = objectnode; * SQDeclaration cd = d.Value; * if (cd.Type == SQDeclarationType.Function || cd.Type == SQDeclarationType.Variable) || { || onode = new SQObjectLibraryNode(node, cd, LibraryNodeCapabilities.None); || globals.Children.Add(onode); || } || else if (cd.Type == SQDeclarationType.Class || cd.Type == SQDeclarationType.Function || cd.Type == SQDeclarationType.Constructor || cd.Type == SQDeclarationType.Variable || cd.Type == SQDeclarationType.Enum || cd.Type == SQDeclarationType.EnumData) || { || onode = new SQObjectLibraryNode(node, cd, LibraryNodeCapabilities.None); || objectnode.Children.Add(onode); || } || _MapObjects(node, cd, onode); ||}*/ _MapObjects(node, declaration, objectnode); }
bool GetChild(uint id, out SQObjectLibraryNode node) { if (id >= (uint)Children.Count) { node = this; return(true); } node = Children[(int)id]; return(true); }
public IVsSimpleObjectList2 FilterView(LibraryNodeType filterType) { SQObjectLibraryNode filtered = new SQObjectLibraryNode(_filenode, _declaration, _capabilities); foreach (var child in Children) { if ((child._type & filterType) != 0) { filtered.Children.Add(new SQObjectLibraryNode(child._filenode, child._declaration, child._capabilities)); } } return(filtered as IVsSimpleObjectList2); }
void _MapObjects(SQProjectFileNode node, SQDeclaration declaration, SQObjectLibraryNode objectnode) { foreach (SQDeclare d in declaration.Children) { SQObjectLibraryNode onode = objectnode; SQDeclaration cd = d.Value; if (cd.Type == SQDeclarationType.Class || cd.Type == SQDeclarationType.Function || cd.Type == SQDeclarationType.Constructor || cd.Type == SQDeclarationType.Variable || cd.Type == SQDeclarationType.Enum || cd.Type == SQDeclarationType.EnumData) { onode = new SQObjectLibraryNode(node, cd, LibraryNodeCapabilities.None); objectnode.Children.Add(onode); } _MapObjects(node, cd, onode); } }
public SQObjectLibrary(SQObjectLibraryNode root, IVsObjectManager2 objectManager) { _objectManager = objectManager; _root = root; _global = new SQObjectLibraryNode(LibraryNodeType.Package, "(GLOBAL)"); }