parameters: ( self, request_data )
return_statement: return os.path.dirname( request_data[ 'filepath' ] )
docstring: Return the directory in which the server should operate. Language server
      protocol and most servers have a concept of a 'project directory'. Where a
      concrete completer can detect this better, it should override this method,
      but otherwise, we default as follows:
        - If the user specified 'project_directory' in their extra conf
          'Settings', use that.
        - try to find files from GetProjectRootFiles and use the
          first directory from there
        - if there's an extra_conf file, use that directory
        - otherwise if we know the client's cwd, use that
        - otherwise use the directory of the file that we just opened
      Note: None of these are ideal. Ycmd doesn't really have a notion of project
      directory and therefore neither do any of our clients.
  
      NOTE: Must be called _after_ _GetSettingsFromExtraConf, as it uses
      self._settings and self._extra_conf_dir
docstring_summary: Return the directory in which the server should operate. Language server
      protocol and most servers have a concept of a 'project directory'. Where a
      concrete completer can detect this better, it should override this method,
      but otherwise, we default as follows:
        - If the user specified 'project_directory' in their extra conf
          'Settings', use that.
        - try to find files from GetProjectRootFiles and use the
          first directory from there
        - if there's an extra_conf file, use that directory
        - otherwise if we know the client's cwd, use that
        - otherwise use the directory of the file that we just opened
      Note: None of these are ideal. Ycmd doesn't really have a notion of project
      directory and therefore neither do any of our clients.
docstring_tokens: Return the directory in which the server should operate . Language server protocol and most servers have a concept of a project directory . Where a concrete completer can detect this better it should override this method but otherwise we default as follows : - If the user specified project_directory in their extra conf Settings use that . - try to find files from GetProjectRootFiles and use the first directory from there - if there s an extra_conf file use that directory - otherwise if we know the client s cwd use that - otherwise use the directory of the file that we just opened Note : None of these are ideal . Ycmd doesn t really have a notion of project directory and therefore neither do any of our clients .
function: def GetProjectDirectory( self, request_data ):
      """Return the directory in which the server should operate. Language server
      protocol and most servers have a concept of a 'project directory'. Where a
      concrete completer can detect this better, it should override this method,
      but otherwise, we default as follows:
        - If the user specified 'project_directory' in their extra conf
          'Settings', use that.
        - try to find files from GetProjectRootFiles and use the
          first directory from there
        - if there's an extra_conf file, use that directory
        - otherwise if we know the client's cwd, use that
        - otherwise use the directory of the file that we just opened
      Note: None of these are ideal. Ycmd doesn't really have a notion of project
      directory and therefore neither do any of our clients.
  
      NOTE: Must be called _after_ _GetSettingsFromExtraConf, as it uses
      self._settings and self._extra_conf_dir
      """
  
      if 'project_directory' in self._settings:
        return utils.AbsolutePath( self._settings[ 'project_directory' ],
                                    self._extra_conf_dir )
  
      project_root_files = self.GetProjectRootFiles()
      if project_root_files:
        for folder in utils.PathsToAllParentFolders( request_data[ 'filepath' ] ):
          for root_file in project_root_files:
            if os.path.isfile( os.path.join( folder, root_file ) ):
              return folder
  
      if self._extra_conf_dir:
        return self._extra_conf_dir
  
      if 'working_dir' in request_data:
        return request_data[ 'working_dir' ]
  
      return os.path.dirname( request_data[ 'filepath' ] )
function_tokens: def GetProjectDirectory ( self , request_data ) : if 'project_directory' in self . _settings : return utils . AbsolutePath ( self . _settings [ 'project_directory' ] , self . _extra_conf_dir ) project_root_files = self . GetProjectRootFiles ( ) if project_root_files : for folder in utils . PathsToAllParentFolders ( request_data [ 'filepath' ] ) : for root_file in project_root_files : if os . path . isfile ( os . path . join ( folder , root_file ) ) : return folder if self . _extra_conf_dir : return self . _extra_conf_dir if 'working_dir' in request_data : return request_data [ 'working_dir' ] return os . path . dirname ( request_data [ 'filepath' ] )