Skip to content

Commit f3b54fa

Browse files
bwilkersoncommit-bot@chromium.org
authored andcommitted
Information for the migration result pages
Change-Id: I237efbbd1ed50963b28dce738c2a365c244b3a88 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117587 Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent 205b90f commit f3b54fa

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
/// The migration information associated with a single library.
6+
class LibraryInfo {
7+
/// The information about the units in the library. The information about the
8+
/// defining compilation unit is always first.
9+
final List<UnitInfo> units;
10+
11+
/// Initialize a newly created library.
12+
LibraryInfo(this.units);
13+
}
14+
15+
/// A description of an explanation associated with a region of code that was
16+
/// modified.
17+
class RegionInfo {
18+
/// The offset to the beginning of the region.
19+
final int offset;
20+
21+
/// The length of the region.
22+
final int length;
23+
24+
/// The explanation to be displayed for the region.
25+
final String explanation;
26+
27+
/// Initialize a newly created region.
28+
RegionInfo(this.offset, this.length, this.explanation);
29+
}
30+
31+
/// The migration information associated with a single compilation unit.
32+
class UnitInfo {
33+
/// The absolute and normalized path of the unit.
34+
final String path;
35+
36+
/// The content of unit.
37+
final String content;
38+
39+
/// The information about the regions that have an explanation associated with
40+
/// them.
41+
final List<RegionInfo> regions;
42+
43+
/// Initialize a newly created unit.
44+
UnitInfo(this.path, this.content, this.regions);
45+
}

0 commit comments

Comments
 (0)