Skip to content

Commit

Permalink
Rename ModelElement field element2 -> element (#4000)
Browse files Browse the repository at this point in the history
Also had to rename some local variables for this refactor, to avoid
shadowing.
  • Loading branch information
keertip authored Feb 18, 2025
1 parent f0c5210 commit 8502845
Show file tree
Hide file tree
Showing 40 changed files with 369 additions and 370 deletions.
2 changes: 1 addition & 1 deletion lib/src/element_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ abstract class DefinedElementType extends ElementType {
@internal
@override
CommentReferable get definingCommentReferable =>
ModelElement.forElement(modelElement.element2, packageGraph);
ModelElement.forElement(modelElement.element, packageGraph);
}

/// Any callable [ElementType] will mix-in this class, whether anonymous or not,
Expand Down
4 changes: 2 additions & 2 deletions lib/src/generator/generator_backend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ abstract class GeneratorBackend {
isSidebar ? '' : data.htmlBase,
);
}
var element = data.self;
var e = data.self;
writer.write(filename, content,
element: element is Warnable ? element : null);
element: e is Warnable ? e : null);
}

/// Emits JSON describing the [categories] defined by the package.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/generator/generator_frontend.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class GeneratorFrontEnd implements Generator {
for (var lib in package.libraries.whereDocumented) {
if (!multiplePackages) {
logInfo('Generating docs for library ${lib.breadcrumbName} from '
'${lib.element2.firstFragment.source.uri}...');
'${lib.element.firstFragment.source.uri}...');
}
if (!lib.isAnonymous && !lib.hasDocumentation) {
packageGraph.warnOnElement(lib, PackageWarning.noLibraryLevelDocs);
Expand Down
Loading

0 comments on commit 8502845

Please sign in to comment.