parameters: (self)
docstring: Create the folder structure in the CodeLite project view
docstring_summary: Create the folder structure in the CodeLite project view
docstring_tokens: Create the folder structure in the CodeLite project view
function: def collect_dirs(self):
                  """
                  Create the folder structure in the CodeLite project view
                  """
                  seen = {}
                  def make_parents(proj):
                          # look at a project, try to make a parent
                          if getattr(proj, 'parent', None):
                                  # aliases already have parents
                                  return
                          x = proj.iter_path
                          if x in seen:
                                  proj.parent = seen[x]
                                  return
  
                          # There is not vsnode_vsdir for x.
                          # So create a project representing the folder "x"
                          n = proj.parent = seen[x] = self.vsnode_vsdir(self, make_uuid(x.abspath()), x.name)
                          n.iter_path = x.parent
                          self.all_projects.append(n)
  
                          # recurse up to the project directory
                          if x.height() > self.srcnode.height() + 1:
                                  make_parents(n)
  
                  for p in self.all_projects[:]: # iterate over a copy of all projects
                          if not getattr(p, 'tg', None):
                                  # but only projects that have a task generator
                                  continue
  
                          # make a folder for each task generator
                          p.iter_path = p.tg.path
                          make_parents(p)
function_tokens: def collect_dirs ( self ) : seen = { } def make_parents ( proj ) : # look at a project, try to make a parent if getattr ( proj , 'parent' , None ) : # aliases already have parents return x = proj . iter_path if x in seen : proj . parent = seen [ x ] return # There is not vsnode_vsdir for x. # So create a project representing the folder "x" n = proj . parent = seen [ x ] = self . vsnode_vsdir ( self , make_uuid ( x . abspath ( ) ) , x . name ) n . iter_path = x . parent self . all_projects . append ( n ) # recurse up to the project directory if x . height ( ) > self . srcnode . height ( ) + 1 : make_parents ( n ) for p in self . all_projects [ : ] : # iterate over a copy of all projects if not getattr ( p , 'tg' , None ) : # but only projects that have a task generator continue # make a folder for each task generator p . iter_path = p . tg . path make_parents ( p )