[ddc] Remove implements text from custom formatter

Change-Id: I814dfc5b80ae3d59ad3ad53d22c4d40866c6d926
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334004
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This commit is contained in:
Nicholas Shahan 2023-11-07 00:38:34 +00:00 committed by Commit Queue
parent 64adde8968
commit 406e92dba6
4 changed files with 11 additions and 14 deletions

View file

@ -53,6 +53,10 @@
package js types that have type arguments. These type arguments are still
completely ignored by the type system at runtime.
- Removed "implements <...>" text from the Chrome custom formatter display for
Dart classes. This information provides little value and keeping it imposes an
unnecessary maintenance cost.
## 3.2.0
### Language

View file

@ -907,14 +907,7 @@ class ClassFormatter implements Formatter {
bool accept(object, config) => config == JsonMLConfig.asClass;
String preview(type) {
var implements = dart.getImplements(type);
var typeName = getTypeName(type);
if (implements != null) {
var typeNames = implements().map(getTypeName);
return '${typeName} implements ${typeNames.join(", ")}';
} else {
return typeName;
}
return getTypeName(type);
}
bool hasChildren(object) => true;

View file

@ -239,7 +239,7 @@ Value:
{
"style": "background-color: #d9edf7;color: black"
},
"List<Object> implements List<Object>, JSIndexable<Object>, TrustedGetRuntimeType"
"List<Object>"
]
-----------------------------------
Test: List<Object> definition formatting body
@ -1788,7 +1788,7 @@ Value:
{
"style": "background-color: #d9edf7;color: black"
},
"List<int> implements List<int>, JSIndexable<int>, TrustedGetRuntimeType"
"List<int>"
]
-----------------------------------
Test: List<int> large definition formatting body
@ -4148,7 +4148,7 @@ Value:
{
"style": "background-color: #d9edf7;color: black"
},
"_HashSet<dynamic> implements HashSet<dynamic>, LinkedHashSet<dynamic>"
"_HashSet<dynamic>"
]
-----------------------------------
Test: Set definition formatting body

View file

@ -239,7 +239,7 @@ Value:
{
"style": "background-color: #d9edf7;color: black"
},
"List<Object> implements List<Object>, JSIndexable<Object>, TrustedGetRuntimeType"
"List<Object>"
]
-----------------------------------
Test: List<Object> definition formatting body
@ -1788,7 +1788,7 @@ Value:
{
"style": "background-color: #d9edf7;color: black"
},
"List<int> implements List<int>, JSIndexable<int>, TrustedGetRuntimeType"
"List<int>"
]
-----------------------------------
Test: List<int> large definition formatting body
@ -4148,7 +4148,7 @@ Value:
{
"style": "background-color: #d9edf7;color: black"
},
"_HashSet<dynamic> implements HashSet<dynamic>, LinkedHashSet<dynamic>"
"_HashSet<dynamic>"
]
-----------------------------------
Test: Set definition formatting body