chrome-devtools-frontend 1.0.942529 → 1.0.943986
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WATCHLISTS +1 -1
- package/config/gni/all_devtools_files.gni +0 -14
- package/config/gni/devtools_grd_files.gni +6 -5
- package/front_end/Tests.js +0 -32
- package/front_end/core/i18n/locales/af.json +455 -44
- package/front_end/core/i18n/locales/am.json +455 -44
- package/front_end/core/i18n/locales/ar.json +455 -44
- package/front_end/core/i18n/locales/as.json +455 -44
- package/front_end/core/i18n/locales/az.json +455 -44
- package/front_end/core/i18n/locales/be.json +456 -45
- package/front_end/core/i18n/locales/bg.json +455 -44
- package/front_end/core/i18n/locales/bn.json +455 -44
- package/front_end/core/i18n/locales/bs.json +455 -44
- package/front_end/core/i18n/locales/ca.json +457 -46
- package/front_end/core/i18n/locales/cs.json +458 -47
- package/front_end/core/i18n/locales/cy.json +455 -44
- package/front_end/core/i18n/locales/da.json +455 -44
- package/front_end/core/i18n/locales/de.json +455 -44
- package/front_end/core/i18n/locales/el.json +455 -44
- package/front_end/core/i18n/locales/en-GB.json +449 -38
- package/front_end/core/i18n/locales/en-US.json +8 -8
- package/front_end/core/i18n/locales/en-XL.json +8 -8
- package/front_end/core/i18n/locales/es-419.json +455 -44
- package/front_end/core/i18n/locales/es.json +455 -44
- package/front_end/core/i18n/locales/et.json +455 -44
- package/front_end/core/i18n/locales/eu.json +462 -51
- package/front_end/core/i18n/locales/fa.json +455 -44
- package/front_end/core/i18n/locales/fi.json +455 -44
- package/front_end/core/i18n/locales/fil.json +454 -43
- package/front_end/core/i18n/locales/fr-CA.json +455 -44
- package/front_end/core/i18n/locales/fr.json +456 -45
- package/front_end/core/i18n/locales/gl.json +455 -44
- package/front_end/core/i18n/locales/gu.json +456 -45
- package/front_end/core/i18n/locales/he.json +455 -44
- package/front_end/core/i18n/locales/hi.json +455 -44
- package/front_end/core/i18n/locales/hr.json +455 -44
- package/front_end/core/i18n/locales/hu.json +455 -44
- package/front_end/core/i18n/locales/hy.json +455 -44
- package/front_end/core/i18n/locales/id.json +455 -44
- package/front_end/core/i18n/locales/is.json +455 -44
- package/front_end/core/i18n/locales/it.json +502 -91
- package/front_end/core/i18n/locales/ja.json +456 -45
- package/front_end/core/i18n/locales/ka.json +455 -44
- package/front_end/core/i18n/locales/kk.json +456 -45
- package/front_end/core/i18n/locales/km.json +455 -44
- package/front_end/core/i18n/locales/kn.json +455 -44
- package/front_end/core/i18n/locales/ko.json +455 -44
- package/front_end/core/i18n/locales/ky.json +456 -45
- package/front_end/core/i18n/locales/lo.json +454 -43
- package/front_end/core/i18n/locales/lt.json +455 -44
- package/front_end/core/i18n/locales/lv.json +458 -47
- package/front_end/core/i18n/locales/mk.json +455 -44
- package/front_end/core/i18n/locales/ml.json +461 -50
- package/front_end/core/i18n/locales/mn.json +455 -44
- package/front_end/core/i18n/locales/mr.json +455 -44
- package/front_end/core/i18n/locales/ms.json +455 -44
- package/front_end/core/i18n/locales/my.json +456 -45
- package/front_end/core/i18n/locales/ne.json +456 -45
- package/front_end/core/i18n/locales/nl.json +532 -121
- package/front_end/core/i18n/locales/no.json +455 -44
- package/front_end/core/i18n/locales/or.json +455 -44
- package/front_end/core/i18n/locales/pa.json +455 -44
- package/front_end/core/i18n/locales/pl.json +455 -44
- package/front_end/core/i18n/locales/pt-PT.json +504 -93
- package/front_end/core/i18n/locales/pt.json +454 -43
- package/front_end/core/i18n/locales/ro.json +455 -44
- package/front_end/core/i18n/locales/ru.json +455 -44
- package/front_end/core/i18n/locales/si.json +455 -44
- package/front_end/core/i18n/locales/sk.json +456 -45
- package/front_end/core/i18n/locales/sl.json +455 -44
- package/front_end/core/i18n/locales/sq.json +455 -44
- package/front_end/core/i18n/locales/sr-Latn.json +455 -44
- package/front_end/core/i18n/locales/sr.json +455 -44
- package/front_end/core/i18n/locales/sv.json +456 -45
- package/front_end/core/i18n/locales/sw.json +455 -44
- package/front_end/core/i18n/locales/ta.json +456 -45
- package/front_end/core/i18n/locales/te.json +454 -43
- package/front_end/core/i18n/locales/th.json +455 -44
- package/front_end/core/i18n/locales/tr.json +455 -44
- package/front_end/core/i18n/locales/uk.json +455 -44
- package/front_end/core/i18n/locales/ur.json +455 -44
- package/front_end/core/i18n/locales/uz.json +455 -44
- package/front_end/core/i18n/locales/vi.json +455 -44
- package/front_end/core/i18n/locales/zh-HK.json +459 -48
- package/front_end/core/i18n/locales/zh-TW.json +457 -46
- package/front_end/core/i18n/locales/zh.json +460 -49
- package/front_end/core/i18n/locales/zu.json +455 -44
- package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
- package/front_end/core/sdk/AccessibilityModel.ts +99 -78
- package/front_end/core/sdk/CPUProfilerModel.ts +7 -9
- package/front_end/core/sdk/ConsoleModel.ts +27 -33
- package/front_end/core/sdk/NetworkManager.ts +3 -0
- package/front_end/core/sdk/Script.ts +0 -4
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +13 -12
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +1 -1
- package/front_end/entrypoints/devtools_app/devtools_app.js +1 -1
- package/front_end/entrypoints/devtools_app/devtools_app.json +1 -4
- package/front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/heap_snapshot_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/inspector/inspector.js +1 -1
- package/front_end/entrypoints/inspector/inspector.json +1 -3
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +2 -3
- package/front_end/entrypoints/js_app/js_app.js +1 -1
- package/front_end/entrypoints/js_app/js_app.json +1 -3
- package/front_end/entrypoints/main/MainImpl.ts +2 -2
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/entrypoints/ndb_app/ndb_app.js +1 -1
- package/front_end/entrypoints/node_app/node_app-meta.ts +0 -2
- package/front_end/entrypoints/node_app/node_app.js +1 -1
- package/front_end/entrypoints/node_app/node_app.json +1 -3
- package/front_end/entrypoints/node_main/node_main-meta.ts +0 -1
- package/front_end/entrypoints/shell/shell.json +1 -4
- package/front_end/entrypoints/wasmparser_worker/wasmparser_worker-entrypoint.ts +1 -1
- package/front_end/entrypoints/worker_app/worker_app.js +1 -1
- package/front_end/entrypoints/worker_app/worker_app.json +1 -3
- package/front_end/generated/InspectorBackendCommands.js +21 -1
- package/front_end/generated/protocol-mapping.d.ts +32 -1
- package/front_end/generated/protocol-proxy-api.d.ts +36 -2
- package/front_end/generated/protocol.d.ts +120 -7
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +5 -1
- package/front_end/models/bindings/DefaultScriptMapping.ts +1 -9
- package/front_end/models/bindings/ResourceScriptMapping.ts +3 -11
- package/front_end/models/formatter/SourceFormatter.ts +0 -15
- package/front_end/models/persistence/persistence-meta.ts +0 -1
- package/front_end/panels/accessibility/accessibility-meta.ts +0 -1
- package/front_end/panels/animation/animation-meta.ts +0 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
- package/front_end/panels/application/BackForwardCacheStrings.ts +3 -1
- package/front_end/panels/application/BackForwardCacheView.ts +26 -26
- package/front_end/panels/application/application-meta.ts +0 -1
- package/front_end/panels/application/components/stackTraceRow.css +8 -0
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +1 -2
- package/front_end/panels/changes/changes-meta.ts +0 -1
- package/front_end/panels/console/ConsolePinPane.ts +2 -6
- package/front_end/panels/console/ConsoleViewMessage.ts +8 -1
- package/front_end/panels/console/console-meta.ts +0 -1
- package/front_end/panels/console_counters/console_counters-meta.ts +0 -1
- package/front_end/panels/coverage/coverage-meta.ts +0 -1
- package/front_end/panels/css_overview/css_overview-meta.ts +0 -1
- package/front_end/panels/developer_resources/developer_resources-meta.ts +0 -1
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +96 -66
- package/front_end/panels/elements/AccessibilityTreeView.ts +76 -125
- package/front_end/panels/elements/ElementsPanel.ts +6 -7
- package/front_end/panels/elements/elements-meta.ts +0 -1
- package/front_end/panels/emulation/emulation-meta.ts +0 -1
- package/front_end/panels/help/help-meta.ts +0 -1
- package/front_end/panels/input/input-meta.ts +0 -1
- package/front_end/panels/issues/issues-meta.ts +0 -1
- package/front_end/panels/js_profiler/js_profiler-meta.ts +0 -4
- package/front_end/panels/layers/layers-meta.ts +0 -4
- package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -1
- package/front_end/panels/lighthouse/module.json +0 -3
- package/front_end/panels/media/media-meta.ts +0 -1
- package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +0 -1
- package/front_end/panels/network/network-meta.ts +1 -2
- package/front_end/panels/performance_monitor/performance_monitor-meta.ts +0 -1
- package/front_end/panels/profiler/CPUProfileView.ts +10 -3
- package/front_end/panels/profiler/profiler-meta.ts +0 -3
- package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +0 -1
- package/front_end/panels/screencast/screencast-meta.ts +0 -4
- package/front_end/panels/security/security-meta.ts +0 -1
- package/front_end/panels/sensors/sensors-meta.ts +0 -1
- package/front_end/panels/settings/emulation/emulation-meta.ts +0 -1
- package/front_end/panels/settings/settings-meta.ts +0 -1
- package/front_end/panels/sources/Plugin.ts +0 -3
- package/front_end/panels/sources/UISourceCodeFrame.ts +23 -49
- package/front_end/panels/sources/sources-meta.ts +2 -6
- package/front_end/panels/timeline/timeline-meta.ts +2 -9
- package/front_end/panels/web_audio/web_audio-meta.ts +0 -1
- package/front_end/panels/webauthn/webauthn-meta.ts +0 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/ui/components/docs/component_docs.ts +14 -0
- package/front_end/ui/components/docs/create_breadcrumbs.ts +1 -1
- package/front_end/ui/components/docs/toggle_dark_mode.ts +1 -0
- package/front_end/ui/components/docs/toggle_fonts.ts +2 -0
- package/front_end/ui/components/helpers/get-stylesheet.ts +0 -1
- package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts +1 -2
- package/front_end/ui/components/tree_outline/TreeOutline.ts +71 -8
- package/front_end/ui/components/tree_outline/TreeOutlineUtils.ts +8 -6
- package/front_end/ui/legacy/Dialog.ts +8 -3
- package/front_end/ui/legacy/SoftContextMenu.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +1 -2
- package/front_end/ui/legacy/components/inline_editor/cssAngle.css +4 -0
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -4
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -3
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -3
- package/front_end/ui/legacy/components/source_frame/FontView.ts +3 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +3 -1
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +3 -1
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +2 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +6 -6
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +5 -2
- package/front_end/ui/legacy/textButton.css +5 -4
- package/inspector_overlay/css_grid_label_helpers.ts +1 -1
- package/inspector_overlay/highlight_common.ts +1 -1
- package/inspector_overlay/tool_highlight.ts +1 -1
- package/package.json +1 -1
- package/scripts/check_gn.js +0 -35
- package/scripts/eslint_rules/lib/es_modules_import.js +15 -24
- package/scripts/eslint_rules/tests/es_modules_import_test.js +8 -16
- package/front_end/emulated_devices/module.json +0 -4
- package/front_end/panels/js_profiler/module.json +0 -5
- package/front_end/panels/layers/module.json +0 -4
- package/front_end/panels/profiler/module.json +0 -3
- package/front_end/panels/screencast/module.json +0 -3
- package/front_end/panels/timeline/module.json +0 -5
- package/front_end/ui/legacy/components/source_frame/messagesPopover.css +0 -32
- package/front_end/ui/legacy/components/source_frame/module.json +0 -11
|
@@ -70,13 +70,11 @@ export class UISourceCodeFrame extends
|
|
|
70
70
|
SourceFrame.SourceFrame.SourceFrameImpl) {
|
|
71
71
|
private uiSourceCodeInternal: Workspace.UISourceCode.UISourceCode;
|
|
72
72
|
private muteSourceCodeEvents: boolean;
|
|
73
|
-
private isSettingContent: boolean;
|
|
74
73
|
private persistenceBinding: Persistence.Persistence.PersistenceBinding|null;
|
|
75
74
|
private uiSourceCodeEventListeners: Common.EventTarget.EventDescriptor[];
|
|
76
75
|
private messageAndDecorationListeners: Common.EventTarget.EventDescriptor[];
|
|
77
76
|
private readonly boundOnBindingChanged: () => void;
|
|
78
77
|
private plugins: Plugin[] = [];
|
|
79
|
-
private pluginsLoaded = false;
|
|
80
78
|
private readonly errorPopoverHelper: UI.PopoverHelper.PopoverHelper;
|
|
81
79
|
|
|
82
80
|
constructor(uiSourceCode: Workspace.UISourceCode.UISourceCode) {
|
|
@@ -84,7 +82,6 @@ export class UISourceCodeFrame extends
|
|
|
84
82
|
this.uiSourceCodeInternal = uiSourceCode;
|
|
85
83
|
|
|
86
84
|
this.muteSourceCodeEvents = false;
|
|
87
|
-
this.isSettingContent = false;
|
|
88
85
|
|
|
89
86
|
this.persistenceBinding = Persistence.Persistence.PersistenceImpl.instance().binding(uiSourceCode);
|
|
90
87
|
|
|
@@ -162,27 +159,24 @@ export class UISourceCodeFrame extends
|
|
|
162
159
|
}
|
|
163
160
|
|
|
164
161
|
setUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
|
|
165
|
-
|
|
166
|
-
this.uiSourceCodeInternal
|
|
167
|
-
|
|
162
|
+
const loaded = uiSourceCode.contentLoaded() ? Promise.resolve() : uiSourceCode.requestContent();
|
|
163
|
+
const startUISourceCode = this.uiSourceCodeInternal;
|
|
164
|
+
loaded.then(() => {
|
|
165
|
+
if (this.uiSourceCodeInternal !== startUISourceCode) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
this.unloadUISourceCode();
|
|
169
|
+
this.uiSourceCodeInternal = uiSourceCode;
|
|
168
170
|
if (uiSourceCode.workingCopy() !== this.textEditor.state.doc.toString()) {
|
|
169
|
-
this.
|
|
171
|
+
this.setContent(uiSourceCode.workingCopy());
|
|
172
|
+
} else {
|
|
173
|
+
this.reloadPlugins();
|
|
170
174
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (this.uiSourceCodeInternal !== uiSourceCode) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
if (uiSourceCode.workingCopy() !== this.textEditor.state.doc.toString()) {
|
|
177
|
-
this.innerSetContent(uiSourceCode.workingCopy());
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
this.initializeUISourceCode();
|
|
175
|
+
this.initializeUISourceCode();
|
|
176
|
+
}, console.error);
|
|
182
177
|
}
|
|
183
178
|
|
|
184
179
|
private unloadUISourceCode(): void {
|
|
185
|
-
this.disposePlugins();
|
|
186
180
|
Common.EventTarget.removeEventListeners(this.messageAndDecorationListeners);
|
|
187
181
|
Common.EventTarget.removeEventListeners(this.uiSourceCodeEventListeners);
|
|
188
182
|
this.uiSourceCodeInternal.removeWorkingCopyGetter();
|
|
@@ -212,9 +206,6 @@ export class UISourceCodeFrame extends
|
|
|
212
206
|
wasShown(): void {
|
|
213
207
|
super.wasShown();
|
|
214
208
|
this.setEditable(this.canEditSourceInternal());
|
|
215
|
-
for (const plugin of this.plugins) {
|
|
216
|
-
plugin.wasShown();
|
|
217
|
-
}
|
|
218
209
|
}
|
|
219
210
|
|
|
220
211
|
willHide(): void {
|
|
@@ -277,16 +268,12 @@ export class UISourceCodeFrame extends
|
|
|
277
268
|
|
|
278
269
|
async setContent(content: string): Promise<void> {
|
|
279
270
|
this.disposePlugins();
|
|
280
|
-
this.
|
|
271
|
+
this.loadPlugins();
|
|
281
272
|
await super.setContent(content);
|
|
282
|
-
Common.EventTarget.fireEvent('source-file-loaded', this.uiSourceCodeInternal.displayName(true));
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
protected editorInitialized(): void {
|
|
286
|
-
super.editorInitialized();
|
|
287
273
|
for (const plugin of this.plugins) {
|
|
288
274
|
plugin.editorInitialized(this.textEditor);
|
|
289
275
|
}
|
|
276
|
+
Common.EventTarget.fireEvent('source-file-loaded', this.uiSourceCodeInternal.displayName(true));
|
|
290
277
|
}
|
|
291
278
|
|
|
292
279
|
private allMessages(): Set<Workspace.UISourceCode.Message> {
|
|
@@ -302,9 +289,6 @@ export class UISourceCodeFrame extends
|
|
|
302
289
|
const wasPretty = this.pretty;
|
|
303
290
|
super.onTextChanged();
|
|
304
291
|
this.errorPopoverHelper.hidePopover();
|
|
305
|
-
if (this.isSettingContent) {
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
292
|
SourcesPanel.instance().updateLastModificationTime();
|
|
309
293
|
this.muteSourceCodeEvents = true;
|
|
310
294
|
if (this.isClean()) {
|
|
@@ -323,12 +307,12 @@ export class UISourceCodeFrame extends
|
|
|
323
307
|
if (this.muteSourceCodeEvents) {
|
|
324
308
|
return;
|
|
325
309
|
}
|
|
326
|
-
this.
|
|
310
|
+
this.maybeSetContent(this.uiSourceCodeInternal.workingCopy());
|
|
327
311
|
}
|
|
328
312
|
|
|
329
313
|
private onWorkingCopyCommitted(): void {
|
|
330
314
|
if (!this.muteSourceCodeEvents) {
|
|
331
|
-
this.
|
|
315
|
+
this.maybeSetContent(this.uiSourceCode().workingCopy());
|
|
332
316
|
}
|
|
333
317
|
this.contentCommitted();
|
|
334
318
|
this.updateStyle();
|
|
@@ -336,7 +320,7 @@ export class UISourceCodeFrame extends
|
|
|
336
320
|
|
|
337
321
|
private reloadPlugins(): void {
|
|
338
322
|
this.disposePlugins();
|
|
339
|
-
this.
|
|
323
|
+
this.loadPlugins();
|
|
340
324
|
const editor = this.textEditor;
|
|
341
325
|
editor.dispatch({effects: pluginCompartment.reconfigure(this.plugins.map(plugin => plugin.editorExtension()))});
|
|
342
326
|
for (const plugin of this.plugins) {
|
|
@@ -348,12 +332,7 @@ export class UISourceCodeFrame extends
|
|
|
348
332
|
this.updateLanguageMode('').then(() => this.reloadPlugins(), console.error);
|
|
349
333
|
}
|
|
350
334
|
|
|
351
|
-
private
|
|
352
|
-
if (this.pluginsLoaded) {
|
|
353
|
-
return;
|
|
354
|
-
}
|
|
355
|
-
this.pluginsLoaded = true;
|
|
356
|
-
|
|
335
|
+
private loadPlugins(): void {
|
|
357
336
|
const binding = Persistence.Persistence.PersistenceImpl.instance().binding(this.uiSourceCodeInternal);
|
|
358
337
|
const pluginUISourceCode = binding ? binding.network : this.uiSourceCodeInternal;
|
|
359
338
|
|
|
@@ -364,9 +343,6 @@ export class UISourceCodeFrame extends
|
|
|
364
343
|
}
|
|
365
344
|
|
|
366
345
|
this.dispatchEventToListeners(Events.ToolbarItemsChanged);
|
|
367
|
-
for (const plugin of this.plugins) {
|
|
368
|
-
plugin.wasShown();
|
|
369
|
-
}
|
|
370
346
|
}
|
|
371
347
|
|
|
372
348
|
private disposePlugins(): void {
|
|
@@ -374,7 +350,6 @@ export class UISourceCodeFrame extends
|
|
|
374
350
|
plugin.dispose();
|
|
375
351
|
}
|
|
376
352
|
this.plugins = [];
|
|
377
|
-
this.pluginsLoaded = false;
|
|
378
353
|
}
|
|
379
354
|
|
|
380
355
|
private onBindingChanged(): void {
|
|
@@ -385,19 +360,17 @@ export class UISourceCodeFrame extends
|
|
|
385
360
|
this.unloadUISourceCode();
|
|
386
361
|
this.persistenceBinding = binding;
|
|
387
362
|
this.initializeUISourceCode();
|
|
363
|
+
this.reloadPlugins();
|
|
388
364
|
}
|
|
389
365
|
|
|
390
366
|
private updateStyle(): void {
|
|
391
367
|
this.setEditable(this.canEditSourceInternal());
|
|
392
368
|
}
|
|
393
369
|
|
|
394
|
-
private
|
|
395
|
-
this.
|
|
396
|
-
const oldContent = this.textEditor.state.doc.toString();
|
|
397
|
-
if (oldContent !== content) {
|
|
370
|
+
private maybeSetContent(content: string): void {
|
|
371
|
+
if (this.textEditor.state.doc.toString() !== content) {
|
|
398
372
|
this.setContent(content);
|
|
399
373
|
}
|
|
400
|
-
this.isSettingContent = false;
|
|
401
374
|
}
|
|
402
375
|
|
|
403
376
|
protected populateTextAreaContextMenu(
|
|
@@ -422,6 +395,7 @@ export class UISourceCodeFrame extends
|
|
|
422
395
|
|
|
423
396
|
dispose(): void {
|
|
424
397
|
this.errorPopoverHelper.dispose();
|
|
398
|
+
this.disposePlugins();
|
|
425
399
|
this.unloadUISourceCode();
|
|
426
400
|
this.textEditor.editor.destroy();
|
|
427
401
|
this.detach();
|
|
@@ -3,18 +3,16 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
7
|
import * as Root from '../../core/root/root.js';
|
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
9
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
9
10
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
10
11
|
import * as QuickOpen from '../../ui/legacy/components/quick_open/quick_open.js';
|
|
11
|
-
import * as TextEditor from '../../ui/legacy/components/text_editor/text_editor.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
13
|
|
|
14
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
15
14
|
import type * as Sources from './sources.js';
|
|
16
15
|
|
|
17
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
|
18
16
|
const UIStrings = {
|
|
19
17
|
/**
|
|
20
18
|
*@description Command for showing the 'Sources' tool
|
|
@@ -1566,9 +1564,7 @@ UI.ContextMenu.registerProvider({
|
|
|
1566
1564
|
|
|
1567
1565
|
UI.ContextMenu.registerProvider({
|
|
1568
1566
|
contextTypes() {
|
|
1569
|
-
return [
|
|
1570
|
-
TextEditor.CodeMirrorTextEditor.CodeMirrorTextEditor,
|
|
1571
|
-
];
|
|
1567
|
+
return maybeRetrieveContextTypes(Sources => [Sources.UISourceCodeFrame.UISourceCodeFrame]);
|
|
1572
1568
|
},
|
|
1573
1569
|
async loadProvider() {
|
|
1574
1570
|
const Sources = await loadSourcesModule();
|
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
|
-
import * as Root from '../../core/root/root.js';
|
|
7
6
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
|
+
import type * as Profiler from '../profiler/profiler.js';
|
|
8
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
9
|
|
|
9
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
10
10
|
import type * as Timeline from './timeline.js';
|
|
11
11
|
|
|
12
|
-
import type * as Profiler from '../profiler/profiler.js';
|
|
13
|
-
|
|
14
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
|
15
12
|
const UIStrings = {
|
|
16
13
|
/**
|
|
17
14
|
*@description Text for the performance of something
|
|
@@ -86,8 +83,6 @@ let loadedProfilerModule: (typeof Profiler|undefined);
|
|
|
86
83
|
|
|
87
84
|
async function loadTimelineModule(): Promise<typeof Timeline> {
|
|
88
85
|
if (!loadedTimelineModule) {
|
|
89
|
-
// Side-effect import resources in module.json
|
|
90
|
-
await Root.Runtime.Runtime.instance().loadModulePromise('panels/timeline');
|
|
91
86
|
loadedTimelineModule = await import('./timeline.js');
|
|
92
87
|
}
|
|
93
88
|
return loadedTimelineModule;
|
|
@@ -103,8 +98,6 @@ async function loadTimelineModule(): Promise<typeof Timeline> {
|
|
|
103
98
|
|
|
104
99
|
async function loadProfilerModule(): Promise<typeof Profiler> {
|
|
105
100
|
if (!loadedProfilerModule) {
|
|
106
|
-
// Side-effect import resources in module.json
|
|
107
|
-
await Root.Runtime.Runtime.instance().loadModulePromise('profiler');
|
|
108
101
|
loadedProfilerModule = await import('../profiler/profiler.js');
|
|
109
102
|
}
|
|
110
103
|
return loadedProfilerModule;
|
|
@@ -6,7 +6,6 @@ import * as i18n from '../../core/i18n/i18n.js';
|
|
|
6
6
|
import * as Root from '../../core/root/root.js';
|
|
7
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
8
8
|
|
|
9
|
-
// eslint-disable-next-line rulesdir/es_modules_import
|
|
10
9
|
import type * as Webauthn from './webauthn.js';
|
|
11
10
|
|
|
12
11
|
const UIStrings = {
|