49
49
* newDoclet
50
50
*
51
51
* parseComplete
52
- * remove undocumented/ignored/private doclets or duplicate doclets
52
+ * merge collected class info, DataType info and enum values into doclets
53
53
*
54
+ * processingComplete
55
+ * remove undocumented/ignored/private doclets or duplicate doclets
54
56
*
55
57
* Last but not least, it implements an astNodeVisitor to detect UI5 specific "extend" calls and to create
56
58
* documentation for the properties, aggregations etc. that are created with the "extend" call.
@@ -232,7 +234,7 @@ function resolveModuleName(base, name) {
232
234
let stack = base . split ( '/' ) ;
233
235
stack . pop ( ) ;
234
236
name . split ( '/' ) . forEach ( ( segment , i ) => {
235
- if ( segment == '..' ) {
237
+ if ( segment === '..' ) {
236
238
stack . pop ( ) ;
237
239
} else if ( segment === '.' ) {
238
240
// ignore
@@ -456,14 +458,14 @@ function createPropertyMap(node, defaultKey) {
456
458
return result ;
457
459
}
458
460
459
- if ( node . type != Syntax . ObjectExpression ) {
461
+ if ( node . type !== Syntax . ObjectExpression ) {
460
462
// something went wrong, it's not an object literal
461
463
warning ( `not an object literal: ${ node . type } : ${ node . value } ` ) ;
462
464
// console.log(node.toSource());
463
465
return undefined ;
464
466
}
465
467
466
- // invariant: node.type == Syntax.ObjectExpression
468
+ // invariant: node.type === Syntax.ObjectExpression
467
469
result = { } ;
468
470
for ( let i = 0 ; i < node . properties . length ; i ++ ) {
469
471
const prop = node . properties [ i ] ;
@@ -1170,7 +1172,7 @@ function collectVisibilityInfo(settings, doclet, className, n) {
1170
1172
access = "restricted" ;
1171
1173
}
1172
1174
1173
- if ( visibility == "public" && ( access === "restricted" || access === "protected" ) ) {
1175
+ if ( visibility === "public" && ( access === "restricted" || access === "protected" ) ) {
1174
1176
visibility = access ;
1175
1177
}
1176
1178
}
@@ -1869,7 +1871,7 @@ function createAutoDoc(oClassInfo, classComment, doclet, node, parser, filename,
1869
1871
lines . push ( "<li>Properties" ) ;
1870
1872
lines . push ( "<ul>" ) ;
1871
1873
for ( let n in oClassInfo . properties ) {
1872
- lines . push ( "<li>{@link " + rname ( "get" , n ) + " " + n + "} : " + oClassInfo . properties [ n ] . type + ( oClassInfo . properties [ n ] . defaultValue !== null && oClassInfo . properties [ n ] . defaultValue . value !== null ? " (default: " + oClassInfo . properties [ n ] . defaultValue . raw + ")" : "" ) + ( oClassInfo . defaultProperty == n ? " (default)" : "" ) + "</li>" ) ;
1874
+ lines . push ( "<li>{@link " + rname ( "get" , n ) + " " + n + "} : " + oClassInfo . properties [ n ] . type + ( oClassInfo . properties [ n ] . defaultValue !== null && oClassInfo . properties [ n ] . defaultValue . value !== null ? " (default: " + oClassInfo . properties [ n ] . defaultValue . raw + ")" : "" ) + ( oClassInfo . defaultProperty === n ? " (default)" : "" ) + "</li>" ) ;
1873
1875
}
1874
1876
lines . push ( "</ul>" ) ;
1875
1877
lines . push ( "</li>" ) ;
@@ -1879,7 +1881,7 @@ function createAutoDoc(oClassInfo, classComment, doclet, node, parser, filename,
1879
1881
lines . push ( "<ul>" ) ;
1880
1882
for ( let n in oClassInfo . aggregations ) {
1881
1883
if ( oClassInfo . aggregations [ n ] . visibility !== "hidden" ) {
1882
- lines . push ( "<li>{@link " + rname ( "get" , n ) + " " + n + "} : " + makeTypeString ( oClassInfo . aggregations [ n ] ) + ( oClassInfo . defaultAggregation == n ? " (default)" : "" ) + "</li>" ) ;
1884
+ lines . push ( "<li>{@link " + rname ( "get" , n ) + " " + n + "} : " + makeTypeString ( oClassInfo . aggregations [ n ] ) + ( oClassInfo . defaultAggregation === n ? " (default)" : "" ) + "</li>" ) ;
1883
1885
}
1884
1886
}
1885
1887
lines . push ( "</ul>" ) ;
@@ -2067,7 +2069,7 @@ function createAutoDoc(oClassInfo, classComment, doclet, node, parser, filename,
2067
2069
"@name " + name ( "get" , n ) ,
2068
2070
"@function"
2069
2071
] ) ;
2070
- if ( info . cardinality == "0..n" ) {
2072
+ if ( info . cardinality === "0..n" ) {
2071
2073
const n1 = info . singularName ;
2072
2074
newJSDoc ( [
2073
2075
"Inserts a " + n1 + " into the aggregation " + link + "." ,
@@ -3045,7 +3047,7 @@ exports.handlers = {
3045
3047
doclets . sort ( ( a , b ) => {
3046
3048
if ( a . longname === b . longname ) {
3047
3049
if ( a . synthetic === b . synthetic ) {
3048
- if ( a . meta && b . meta && a . meta . filename == b . meta . filename ) {
3050
+ if ( a . meta && b . meta && a . meta . filename === b . meta . filename ) {
3049
3051
if ( a . meta . lineno !== b . meta . lineno ) {
3050
3052
return a . meta . lineno < b . meta . lineno ? - 1 : 1 ;
3051
3053
}
0 commit comments