@@ -231,6 +231,7 @@ function publish(symbolSet) {
231231
232232 // now resolve relationships
233233 const aRootNamespaces = createNamespaceTree ( allSymbols ) ;
234+ pushDownDeprecations ( allSymbols ) ;
234235 createInheritanceTree ( allSymbols ) ;
235236 collectMembers ( allSymbols ) ;
236237 mergeEventDocumentation ( allSymbols ) ;
@@ -374,6 +375,33 @@ function makeNamespace(memberof) {
374375 ] ) ;
375376}
376377
378+ function pushDownDeprecations ( ) {
379+
380+ function pushDown ( oSymbol , sInheritedDeprecation ) {
381+ if ( oSymbol == null || ! isFirstClassSymbol ( oSymbol ) ) {
382+ return ;
383+ }
384+ const sOwnDeprecation = oSymbol . deprecated ;
385+ if ( sOwnDeprecation == null && sInheritedDeprecation != null ) {
386+ oSymbol . deprecated = sInheritedDeprecation ;
387+ info ( `mark ${ oSymbol . longname } as deprecated (${ sInheritedDeprecation } )` ) ;
388+ } else if ( sOwnDeprecation != null ) {
389+ const info = extractSince ( sOwnDeprecation ) ;
390+ const sinceBecause = info . since ? `As of version ${ info . since } , because` : `Because` ;
391+ sInheritedDeprecation = `${ sinceBecause } it is part of the deprecated package ${ oSymbol . longname } ` ;
392+ }
393+ oSymbol . __ui5 . children ?. forEach ( ( oChild ) => pushDown ( oChild , sInheritedDeprecation ) ) ;
394+ }
395+
396+ // w/o a library name we can't start with the library namespace
397+ if ( ! templateConf . uilib ) {
398+ return ;
399+ }
400+
401+ // start the push down at the library namespace to ensure locality
402+ pushDown ( lookup ( templateConf . uilib ) ) ;
403+ }
404+
377405//---- inheritance hierarchy ----------------------------------------------------------------------------
378406
379407/*
0 commit comments