c44021343e
PluginIsolate.executionPath and .packagesPath were non-nullable strings with a magic `''` value meaning the plugin isolate could not be started. Making it nullable makes it more understandable, and I add documentation. In the "insights" pages, we then don't print weird blank strings. Also I missed renaming `_info` to `_isolate`. Change-Id: Ib8ce52d297cf083239004fffe990b6a9e90c7ddb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/447960 Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
26 lines
849 B
Dart
26 lines
849 B
Dart
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
/// Instrumentation data about a plugin.
|
|
class PluginData {
|
|
/// The ID used to uniquely identify the plugin.
|
|
final String pluginId;
|
|
|
|
/// The name of the plugin, or `null` if the plugin is not running.
|
|
final String? name;
|
|
|
|
/// The version of the plugin, or `null` if the plugin is not running.
|
|
final String? version;
|
|
|
|
PluginData(this.pluginId, this.name, this.version);
|
|
|
|
/// Adds the information about the plugin to the list of [fields] to be sent
|
|
/// to the instrumentation server.
|
|
void addToFields(List<String> fields) {
|
|
fields.add(pluginId);
|
|
fields.add(name ?? '');
|
|
fields.add(version ?? '');
|
|
}
|
|
}
|