Skip to content

Commit d4a5a86

Browse files
committed
Formatting
1 parent 062c4f8 commit d4a5a86

12 files changed

+143
-118
lines changed

dwds/debug_extension/tool/copy_builder.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Builder copyBuilder(_) => _CopyBuilder();
1010
class _CopyBuilder extends Builder {
1111
@override
1212
Map<String, List<String>> get buildExtensions => {
13-
'web/{{}}.dart.js': ['compiled/{{}}.dart.js'],
14-
'web/static_assets/{{}}.png': ['compiled/static_assets/{{}}.png'],
15-
'web/static_assets/{{}}.html': ['compiled/static_assets/{{}}.html'],
16-
'web/static_assets/{{}}.css': ['compiled/static_assets/{{}}.css'],
17-
'web/manifest.json': ['compiled/manifest.json'],
18-
};
13+
'web/{{}}.dart.js': ['compiled/{{}}.dart.js'],
14+
'web/static_assets/{{}}.png': ['compiled/static_assets/{{}}.png'],
15+
'web/static_assets/{{}}.html': ['compiled/static_assets/{{}}.html'],
16+
'web/static_assets/{{}}.css': ['compiled/static_assets/{{}}.css'],
17+
'web/manifest.json': ['compiled/manifest.json'],
18+
};
1919

2020
@override
2121
Future<void> build(BuildStep buildStep) async {

dwds/debug_extension/web/background.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,9 @@ void _setWarningIcon(int tabId) {
279279
}
280280

281281
void _setDefaultIcon(int tabId) {
282-
final iconPath =
283-
isDevMode ? 'static_assets/dart_dev.png' : 'static_assets/dart_grey.png';
282+
final iconPath = isDevMode
283+
? 'static_assets/dart_dev.png'
284+
: 'static_assets/dart_grey.png';
284285
setExtensionIcon(IconInfo(path: iconPath));
285286
setExtensionPopup(PopupDetails(popup: '', tabId: tabId));
286287
}

dwds/debug_extension/web/cider_connection.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ Future<void> _sendInspectorUrl({String? appId}) async {
170170
if (!alreadyDebugging) {
171171
sendErrorMessageToCider(
172172
errorType: CiderErrorType.invalidRequest,
173-
errorDetails: 'Cannot send the inspector URL before '
173+
errorDetails:
174+
'Cannot send the inspector URL before '
174175
'the debugger has been attached.',
175176
);
176177
return;

dwds/debug_extension/web/copier.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ void _copyAppId(String appId) {
4949
}
5050

5151
Future<bool> _notifyCopiedSuccess(String appId) => sendRuntimeMessage(
52-
type: MessageType.appId,
53-
body: appId,
54-
sender: Script.copier,
55-
recipient: Script.background,
56-
);
52+
type: MessageType.appId,
53+
body: appId,
54+
sender: Script.copier,
55+
recipient: Script.background,
56+
);

dwds/debug_extension/web/cross_extension_communication.dart

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,19 +126,17 @@ ExternalExtensionMessage _debugEventMessage({
126126
required String method,
127127
required dynamic params,
128128
required int tabId,
129-
}) =>
130-
ExternalExtensionMessage(
131-
name: 'chrome.debugger.event',
132-
tabId: tabId,
133-
options: DebugEvent(method: method, params: params),
134-
);
129+
}) => ExternalExtensionMessage(
130+
name: 'chrome.debugger.event',
131+
tabId: tabId,
132+
options: DebugEvent(method: method, params: params),
133+
);
135134

136135
ExternalExtensionMessage _dwdsEventMessage({
137136
required String method,
138137
required dynamic params,
139138
required int tabId,
140-
}) =>
141-
ExternalExtensionMessage(name: method, tabId: tabId, options: params);
139+
}) => ExternalExtensionMessage(name: method, tabId: tabId, options: params);
142140

143141
// This message is used for cross-extension communication between this extension
144142
// and the AngularDart DevTools extension.

dwds/debug_extension/web/data_serializers.g.dart

Lines changed: 17 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/debug_extension/web/data_types.g.dart

Lines changed: 58 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dwds/debug_extension/web/debug_session.dart

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ import 'storage.dart';
3535
import 'utils.dart';
3636
import 'web_api.dart';
3737

38-
const _notADartAppAlert = 'No Dart application detected.'
38+
const _notADartAppAlert =
39+
'No Dart application detected.'
3940
' Are you trying to debug an application that includes a Chrome hosted app'
4041
' (an application listed in chrome://apps)? If so, debugging is disabled.'
4142
' You can fix this by removing the application from chrome://apps. Please'
@@ -81,11 +82,11 @@ enum Trigger {
8182
extensionIcon;
8283

8384
String get clientName => switch (this) {
84-
Trigger.angularDartDevTools => 'acx-devtools',
85-
Trigger.cider => 'cider',
86-
Trigger.extensionPanel => 'embedded-devtools',
87-
Trigger.extensionIcon => 'devtools',
88-
};
85+
Trigger.angularDartDevTools => 'acx-devtools',
86+
Trigger.cider => 'cider',
87+
Trigger.extensionPanel => 'embedded-devtools',
88+
Trigger.extensionIcon => 'devtools',
89+
};
8990
}
9091

9192
enum DebuggerLocation {
@@ -95,11 +96,11 @@ enum DebuggerLocation {
9596
ide;
9697

9798
String get displayName => switch (this) {
98-
DebuggerLocation.angularDartDevTools => 'AngularDart DevTools',
99-
DebuggerLocation.chromeDevTools => 'Chrome DevTools',
100-
DebuggerLocation.dartDevTools => 'a Dart DevTools tab',
101-
DebuggerLocation.ide => 'an IDE',
102-
};
99+
DebuggerLocation.angularDartDevTools => 'AngularDart DevTools',
100+
DebuggerLocation.chromeDevTools => 'Chrome DevTools',
101+
DebuggerLocation.dartDevTools => 'a Dart DevTools tab',
102+
DebuggerLocation.ide => 'an IDE',
103+
};
103104
}
104105

105106
bool get existsActiveDebugSession => _debugSessions.isNotEmpty;
@@ -312,7 +313,8 @@ Future<bool> _isDartFrame({required int tabId, required int contextId}) {
312313
Debuggee(tabId: tabId),
313314
'Runtime.evaluate',
314315
_InjectedParams(
315-
expression: '[window.\$dartAppId, '
316+
expression:
317+
'[window.\$dartAppId, '
316318
'window.\$dartAppInstanceId, '
317319
'window.\$dwdsVersion]',
318320
returnByValue: true,
@@ -642,11 +644,11 @@ Future<bool> _sendStopDebuggingMessage(
642644
_DebugSession? _debugSessionForTab(int tabId, {required TabType type}) {
643645
return switch (type) {
644646
TabType.dartApp => _debugSessions.firstWhereOrNull(
645-
(session) => session.appTabId == tabId,
646-
),
647+
(session) => session.appTabId == tabId,
648+
),
647649
TabType.devTools => _debugSessions.firstWhereOrNull(
648-
(session) => session.devToolsTabId == tabId,
649-
),
650+
(session) => session.devToolsTabId == tabId,
651+
),
650652
};
651653
}
652654

@@ -726,9 +728,10 @@ DebuggerLocation? _debuggerLocation(int dartAppTabId) {
726728
Trigger.angularDartDevTools => DebuggerLocation.angularDartDevTools,
727729
Trigger.cider => DebuggerLocation.ide,
728730
Trigger.extensionPanel => DebuggerLocation.chromeDevTools,
729-
Trigger.extensionIcon => debugSession.devToolsTabId != null
730-
? DebuggerLocation.dartDevTools
731-
: DebuggerLocation.ide,
731+
Trigger.extensionIcon =>
732+
debugSession.devToolsTabId != null
733+
? DebuggerLocation.dartDevTools
734+
: DebuggerLocation.ide,
732735
};
733736
}
734737

dwds/debug_extension/web/detector.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ void _detectMultipleDartAppsCallback(
9797
}
9898

9999
bool _isMultipleAppsMutation(dynamic mutation) {
100-
final isAttributeMutation = hasProperty(mutation, 'type') &&
100+
final isAttributeMutation =
101+
hasProperty(mutation, 'type') &&
101102
getProperty(mutation, 'type') == 'attributes';
102103
if (isAttributeMutation) {
103104
return hasProperty(mutation, 'attributeName') &&

0 commit comments

Comments
 (0)