@@ -3991,9 +3991,9 @@ class PackageGraph extends Canonicalization with Nameable, Warnable {
3991
3991
warningMessage =
3992
3992
"library says it is {@canonicalFor ${message }} but ${message } can't be canonical there" ;
3993
3993
break ;
3994
- case PackageWarning .categoryOrderGivesMissingPackageName :
3994
+ case PackageWarning .packageOrderGivesMissingPackageName :
3995
3995
warningMessage =
3996
- "--category -order gives invalid package name: '${message }'" ;
3996
+ "--package -order gives invalid package name: '${message }'" ;
3997
3997
break ;
3998
3998
case PackageWarning .unresolvedDocReference:
3999
3999
warningMessage = "unresolved doc reference [${message }]" ;
@@ -4063,17 +4063,18 @@ class PackageGraph extends Canonicalization with Nameable, Warnable {
4063
4063
return locatable.fullyQualifiedName.replaceFirst (':' , '-' );
4064
4064
}
4065
4065
4066
- List <Package > get categories {
4067
- // Help the user if they pass us a category that doesn't exist.
4068
- for (String categoryName in config.categoryOrder) {
4069
- if (! packages.containsKey (categoryName))
4070
- warnOnElement (null , PackageWarning .categoryOrderGivesMissingPackageName,
4071
- message: "${categoryName }, categories: ${packages .keys .join (',' )}" );
4066
+ List <Package > get publicPackages {
4067
+ List <Package > _publicPackages;
4068
+ // Help the user if they pass us a package that doesn't exist.
4069
+ for (String packageName in config.packageOrder) {
4070
+ if (! packages.containsKey (packageName))
4071
+ warnOnElement (null , PackageWarning .packageOrderGivesMissingPackageName,
4072
+ message: "${packageName }, packages: ${packages .keys .join (',' )}" );
4072
4073
}
4073
- List < Package > publicPackages = packages.values
4074
+ _publicPackages = packages.values
4074
4075
.where ((p) => p.libraries.any ((l) => l.isPublic))
4075
4076
.toList ();
4076
- return publicPackages ..sort ();
4077
+ return _publicPackages ..sort ();
4077
4078
}
4078
4079
4079
4080
Map <LibraryElement , Set <Library >> _libraryElementReexportedBy = new Map ();
@@ -4200,7 +4201,7 @@ class PackageGraph extends Canonicalization with Nameable, Warnable {
4200
4201
String get name => packageMeta.name;
4201
4202
4202
4203
String get kind =>
4203
- (packageMeta.useCategories || packageGraph.isSdk) ? '' : 'package' ;
4204
+ (packageMeta.displayAsPackages || packageGraph.isSdk) ? '' : 'package' ;
4204
4205
4205
4206
@override
4206
4207
String get oneLineDoc => '' ;
@@ -4492,14 +4493,14 @@ class Package implements Comparable<Package> {
4492
4493
String toString () => name;
4493
4494
4494
4495
/// Returns:
4495
- /// -1 if this category is listed in --category -order.
4496
- /// 0 if this category is the original package we are documenting.
4496
+ /// -1 if this package is listed in --package -order.
4497
+ /// 0 if this package is the original package we are documenting.
4497
4498
/// 1 if this group represents the Dart SDK.
4498
4499
/// 2 if this group has a name that contains the name of the original
4499
4500
/// package we are documenting.
4500
4501
/// 3 otherwise.
4501
4502
int get _group {
4502
- if (config.categoryOrder .contains (name)) return - 1 ;
4503
+ if (config.packageOrder .contains (name)) return - 1 ;
4503
4504
if (name.toLowerCase () == packageGraph.name.toLowerCase ()) return 0 ;
4504
4505
if (name == "Dart Core" ) return 1 ;
4505
4506
if (name.toLowerCase ().contains (packageGraph.name.toLowerCase ())) return 2 ;
@@ -4510,8 +4511,8 @@ class Package implements Comparable<Package> {
4510
4511
int compareTo (Package other) {
4511
4512
if (_group == other._group) {
4512
4513
if (_group == - 1 ) {
4513
- return Comparable .compare (config.categoryOrder .indexOf (name),
4514
- config.categoryOrder .indexOf (other.name));
4514
+ return Comparable .compare (config.packageOrder .indexOf (name),
4515
+ config.packageOrder .indexOf (other.name));
4515
4516
} else {
4516
4517
return name.toLowerCase ().compareTo (other.name.toLowerCase ());
4517
4518
}
0 commit comments