question: public static void registerProjects ( List < File > projectLocations , FileBasedWorkspace fbWorkspace ) throws N4JSCompileException { List < File > absProjectRoots = HeadlessHelper . toAbsoluteFileList ( projectLocations ) ; ArrayList < File > pDir = HeadlessHelper . collectAllProjectPaths ( absProjectRoots ) ; ArrayList < URI > projectURIs = new ArrayList < > ( pDir . size ( ) ) ; for ( File pdir : pDir ) { URI puri = URI . createFileURI ( pdir . toString ( ) ) ; projectURIs . add ( puri ) ; try { fbWorkspace . registerProject ( puri ) ; } catch ( N4JSBrokenProjectException e ) { throw new N4JSCompileException ( "Unable to register project '" + puri + "'" , e ) ; } } }
target:  Configure fbWorkspace with all projects found in Subfolders of projectLocations.