public void setSourceContent ( String aSourceFile , String aSourceContent ) { String source = aSourceFile ; if ( this . _sourceRoot != null ) { source = Util . relative ( this . _sourceRoot , source ) ; } if ( aSourceContent != null ) { // Add the source content to the _sourcesContents map. // Create a new _sourcesContents map if the property is null. if ( this . _sourcesContents == null ) { this . _sourcesContents = new HashMap <> ( ) ; } this . _sourcesContents . put ( source , aSourceContent ) ; } else if ( this . _sourcesContents != null ) { // Remove the source file from the _sourcesContents map. // If the _sourcesContents map is empty, set the property to null. this . _sourcesContents . remove ( source ) ; if ( this . _sourcesContents . isEmpty ( ) ) { this . _sourcesContents = null ; } } }
Set the source content for a source file .