public ALSymbolInformation GetObjectsTree() { ALSymbolInformation symbol = this.CreateCopy(false); if ((!this.kind.IsObjectDefinition()) && (this.childSymbols != null)) { for (int i = 0; i < this.childSymbols.Count; i++) { symbol.AddChildSymbol(this.childSymbols[i].GetObjectsTree()); } } return(symbol); }
public ALSymbolInformation CreateCopy(bool withChildSymbols) { ALSymbolInformation symbol = new ALSymbolInformation(); symbol.id = this.id; symbol.name = this.name; symbol.subtype = this.subtype; symbol.fullName = this.fullName; symbol.kind = this.kind; symbol.range = this.range; symbol.selectionRange = this.selectionRange; if ((withChildSymbols) && (this.childSymbols != null)) { for (int i = 0; i < this.childSymbols.Count; i++) { symbol.AddChildSymbol(this.childSymbols[i].CreateCopy(withChildSymbols)); } } return(symbol); }
protected void ProcessDependencies(ALProjectFile projectFile, bool forceReload) { //load list of packages ALAppPackageFileInfosCollection packageFiles = new ALAppPackageFileInfosCollection(); packageFiles.LoadFromFolder(this.PackagesPath); //collect list of projects from other folders WorkspaceProjectsCollection workspaceProjects = null; if ((this.WorkspaceFolders != null) && (this.WorkspaceFolders.Length > 1)) { workspaceProjects = new WorkspaceProjectsCollection(this.WorkspaceFolders); workspaceProjects.Load(); } //collect packages if (projectFile.dependencies != null) { for (int i = 0; i < projectFile.dependencies.Length; i++) { bool workspaceProjectFound = false; if (workspaceProjects != null) { WorkspaceProject depProject = workspaceProjects.FindByReference(projectFile.dependencies[i].appId, projectFile.dependencies[i].publisher, projectFile.dependencies[i].name, projectFile.dependencies[i].version); if (depProject != null) { workspaceProjectFound = true; this.AddDepProject(depProject); } } if (!workspaceProjectFound) { this.AddPackage(packageFiles, projectFile.dependencies[i].publisher, projectFile.dependencies[i].name, projectFile.dependencies[i].version, forceReload); } } } //collect system packages if (!String.IsNullOrWhiteSpace(projectFile.application)) { this.AddPackage(packageFiles, "Microsoft", "Application", projectFile.application, forceReload); } if (!String.IsNullOrWhiteSpace(projectFile.platform)) { this.AddPackage(packageFiles, "Microsoft", "System", projectFile.platform, forceReload); } if (!String.IsNullOrWhiteSpace(projectFile.test)) { this.AddPackage(packageFiles, "Microsoft", "Test", projectFile.test, forceReload); } //collect dependencies if (this.Dependencies.Count > 0) { ALSymbolInformation dependenciesList = new ALSymbolInformation(ALSymbolKind.Dependencies, "Dependencies"); for (int i = 0; i < this.Dependencies.Count; i++) { dependenciesList.AddChildSymbol(this.Dependencies[i].Root); } this.Root.AddChildSymbol(dependenciesList); } }