protected File createStubs ( ResourceSet resourceSet , IProgressMonitor progress ) { assert progress != null ; progress . subTask ( Messages . SarlBatchCompiler_53 ) ; final File outputDirectory = createTempDir ( STUB_FOLDER_PREFIX ) ; if ( progress . isCanceled ( ) ) { return null ; } if ( getLogger ( ) . isDebugEnabled ( ) ) { getLogger ( ) . debug ( Messages . SarlBatchCompiler_19 , outputDirectory ) ; } final JavaIoFileSystemAccess fileSystemAccess = this . javaIoFileSystemAccessProvider . get ( ) ; if ( progress . isCanceled ( ) ) { return null ; } fileSystemAccess . setOutputPath ( outputDirectory . toString ( ) ) ; final List < Resource > resources = new ArrayList <> ( resourceSet . getResources ( ) ) ; for ( final Resource resource : resources ) { if ( progress . isCanceled ( ) ) { return null ; } if ( getLogger ( ) . isDebugEnabled ( ) ) { getLogger ( ) . debug ( Messages . SarlBatchCompiler_20 , resource . getURI ( ) ) ; } final IResourceDescription description = this . resourceDescriptionManager . getResourceDescription ( resource ) ; this . stubGenerator . doGenerateStubs ( fileSystemAccess , description ) ; } return outputDirectory ; }
Create the stubs .