public static void addFormalParameter ( ExecutableMemberDoc member , Parameter param , boolean isVarArg , Content htmlTree , SarlConfiguration configuration , SubWriterHolderWriter writer ) { final ProxyInstaller proxyInstaller = configuration . getProxyInstaller ( ) ; final ExecutableMemberDoc omember = proxyInstaller . unwrap ( member ) ; final Parameter oparam = proxyInstaller . unwrap ( param ) ; final String defaultValue = Utils . getParameterDefaultValue ( omember , oparam , configuration ) ; final boolean addDefaultValueBrackets = Utils . isNullOrEmpty ( defaultValue ) && Utils . isDefaultValuedParameter ( oparam , configuration ) ; if ( addDefaultValueBrackets ) { htmlTree . addContent ( "[" ) ; //$NON-NLS-1$ } if ( oparam . name ( ) . length ( ) > 0 ) { htmlTree . addContent ( oparam . name ( ) ) ; } htmlTree . addContent ( writer . getSpace ( ) ) ; htmlTree . addContent ( Utils . getKeywords ( ) . getColonKeyword ( ) ) ; htmlTree . addContent ( " " ) ; //$NON-NLS-1$ if ( oparam . type ( ) != null ) { final Content link = writer . getLink ( new LinkInfoImpl ( configuration , LinkInfoImpl . Kind . EXECUTABLE_MEMBER_PARAM , oparam . type ( ) ) . varargs ( isVarArg ) ) ; htmlTree . addContent ( link ) ; } if ( addDefaultValueBrackets ) { htmlTree . addContent ( "]" ) ; //$NON-NLS-1$ } else if ( ! Utils . isNullOrEmpty ( defaultValue ) ) { htmlTree . addContent ( " " ) ; //$NON-NLS-1$ htmlTree . addContent ( Utils . getKeywords ( ) . getEqualsSignKeyword ( ) ) ; htmlTree . addContent ( writer . getSpace ( ) ) ; htmlTree . addContent ( defaultValue ) ; } }
Add a parameter to the given executable member .