@theia/debug 1.45.0 → 1.46.0-next.72
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/README.md +62 -62
- package/lib/browser/breakpoint/breakpoint-manager.d.ts +70 -70
- package/lib/browser/breakpoint/breakpoint-manager.js +328 -328
- package/lib/browser/breakpoint/breakpoint-marker.d.ts +41 -41
- package/lib/browser/breakpoint/breakpoint-marker.js +87 -87
- package/lib/browser/console/debug-console-contribution.d.ts +40 -40
- package/lib/browser/console/debug-console-contribution.js +231 -231
- package/lib/browser/console/debug-console-items.d.ts +93 -93
- package/lib/browser/console/debug-console-items.js +319 -319
- package/lib/browser/console/debug-console-session.d.ts +31 -31
- package/lib/browser/console/debug-console-session.js +199 -199
- package/lib/browser/debug-call-stack-item-type-key.d.ts +3 -3
- package/lib/browser/debug-call-stack-item-type-key.js +19 -19
- package/lib/browser/debug-configuration-manager.d.ts +102 -102
- package/lib/browser/debug-configuration-manager.js +552 -552
- package/lib/browser/debug-configuration-model.d.ts +29 -29
- package/lib/browser/debug-configuration-model.js +79 -79
- package/lib/browser/debug-contribution.d.ts +22 -22
- package/lib/browser/debug-contribution.js +19 -19
- package/lib/browser/debug-frontend-application-contribution.d.ts +222 -222
- package/lib/browser/debug-frontend-application-contribution.js +1404 -1404
- package/lib/browser/debug-frontend-module.d.ts +4 -4
- package/lib/browser/debug-frontend-module.d.ts.map +1 -1
- package/lib/browser/debug-frontend-module.js +105 -104
- package/lib/browser/debug-frontend-module.js.map +1 -1
- package/lib/browser/debug-package.spec.js +18 -18
- package/lib/browser/debug-preferences.d.ts +17 -17
- package/lib/browser/debug-preferences.js +89 -89
- package/lib/browser/debug-prefix-configuration.d.ts +51 -51
- package/lib/browser/debug-prefix-configuration.js +208 -208
- package/lib/browser/debug-resource.d.ts +14 -14
- package/lib/browser/debug-resource.js +65 -65
- package/lib/browser/debug-schema-updater.d.ts +15 -15
- package/lib/browser/debug-schema-updater.js +168 -168
- package/lib/browser/debug-session-connection.d.ts +110 -110
- package/lib/browser/debug-session-connection.js +258 -258
- package/lib/browser/debug-session-contribution.d.ts +73 -73
- package/lib/browser/debug-session-contribution.js +145 -145
- package/lib/browser/debug-session-manager.d.ts +137 -137
- package/lib/browser/debug-session-manager.js +599 -599
- package/lib/browser/debug-session-manager.js.map +1 -1
- package/lib/browser/debug-session-options.d.ts +48 -48
- package/lib/browser/debug-session-options.js +85 -85
- package/lib/browser/debug-session.d.ts +178 -178
- package/lib/browser/debug-session.js +871 -871
- package/lib/browser/debug-tab-bar-decorator.d.ts +16 -16
- package/lib/browser/debug-tab-bar-decorator.js +70 -70
- package/lib/browser/debug-watch-manager.d.ts +21 -21
- package/lib/browser/debug-watch-manager.js +93 -93
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts +6 -6
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js +38 -38
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts +19 -19
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js +110 -110
- package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts +24 -24
- package/lib/browser/disassembly-view/disassembly-view-contribution.js +131 -131
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts +38 -38
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js +222 -222
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js.map +1 -1
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts +15 -15
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.js +38 -38
- package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts +37 -37
- package/lib/browser/disassembly-view/disassembly-view-utilities.js +17 -17
- package/lib/browser/disassembly-view/disassembly-view-widget.d.ts +60 -60
- package/lib/browser/disassembly-view/disassembly-view-widget.js +453 -452
- package/lib/browser/disassembly-view/disassembly-view-widget.js.map +1 -1
- package/lib/browser/editor/debug-breakpoint-widget.d.ts +53 -53
- package/lib/browser/editor/debug-breakpoint-widget.js +261 -261
- package/lib/browser/editor/debug-editor-model.d.ts +91 -93
- package/lib/browser/editor/debug-editor-model.d.ts.map +1 -1
- package/lib/browser/editor/debug-editor-model.js +515 -516
- package/lib/browser/editor/debug-editor-model.js.map +1 -1
- package/lib/browser/editor/debug-editor-service.d.ts +35 -35
- package/lib/browser/editor/debug-editor-service.js +202 -202
- package/lib/browser/editor/debug-editor.d.ts +3 -3
- package/lib/browser/editor/debug-editor.js +19 -19
- package/lib/browser/editor/debug-exception-widget.d.ts +29 -29
- package/lib/browser/editor/debug-exception-widget.js +114 -114
- package/lib/browser/editor/debug-expression-provider.d.ts +11 -11
- package/lib/browser/editor/debug-expression-provider.js +81 -81
- package/lib/browser/editor/debug-hover-source.d.ts +18 -18
- package/lib/browser/editor/debug-hover-source.js +117 -117
- package/lib/browser/editor/debug-hover-widget.d.ts +47 -47
- package/lib/browser/editor/debug-hover-widget.js +276 -276
- package/lib/browser/editor/debug-inline-value-decorator.d.ts +19 -21
- package/lib/browser/editor/debug-inline-value-decorator.d.ts.map +1 -1
- package/lib/browser/editor/debug-inline-value-decorator.js +333 -337
- package/lib/browser/editor/debug-inline-value-decorator.js.map +1 -1
- package/lib/browser/model/debug-breakpoint.d.ts +47 -47
- package/lib/browser/model/debug-breakpoint.js +109 -109
- package/lib/browser/model/debug-function-breakpoint.d.ts +18 -18
- package/lib/browser/model/debug-function-breakpoint.js +92 -92
- package/lib/browser/model/debug-instruction-breakpoint.d.ts +14 -14
- package/lib/browser/model/debug-instruction-breakpoint.js +65 -65
- package/lib/browser/model/debug-source-breakpoint.d.ts +37 -37
- package/lib/browser/model/debug-source-breakpoint.js +217 -217
- package/lib/browser/model/debug-source.d.ts +24 -24
- package/lib/browser/model/debug-source.js +80 -80
- package/lib/browser/model/debug-stack-frame.d.ts +41 -41
- package/lib/browser/model/debug-stack-frame.js +150 -150
- package/lib/browser/model/debug-thread.d.ts +62 -62
- package/lib/browser/model/debug-thread.js +237 -237
- package/lib/browser/preferences/launch-preferences.d.ts +4 -4
- package/lib/browser/preferences/launch-preferences.js +38 -38
- package/lib/browser/view/debug-action.d.ts +16 -16
- package/lib/browser/view/debug-action.js +43 -43
- package/lib/browser/view/debug-breakpoints-source.d.ts +9 -9
- package/lib/browser/view/debug-breakpoints-source.js +70 -70
- package/lib/browser/view/debug-breakpoints-widget.d.ts +22 -22
- package/lib/browser/view/debug-breakpoints-widget.js +87 -87
- package/lib/browser/view/debug-configuration-select.d.ts +64 -64
- package/lib/browser/view/debug-configuration-select.js +216 -216
- package/lib/browser/view/debug-configuration-widget.d.ts +30 -30
- package/lib/browser/view/debug-configuration-widget.js +135 -135
- package/lib/browser/view/debug-exception-breakpoint.d.ts +14 -14
- package/lib/browser/view/debug-exception-breakpoint.js +61 -61
- package/lib/browser/view/debug-session-widget.d.ts +28 -28
- package/lib/browser/view/debug-session-widget.js +134 -134
- package/lib/browser/view/debug-stack-frames-source.d.ts +17 -17
- package/lib/browser/view/debug-stack-frames-source.js +89 -89
- package/lib/browser/view/debug-stack-frames-widget.d.ts +24 -24
- package/lib/browser/view/debug-stack-frames-widget.js +154 -154
- package/lib/browser/view/debug-threads-source.d.ts +8 -8
- package/lib/browser/view/debug-threads-source.js +63 -63
- package/lib/browser/view/debug-threads-widget.d.ts +26 -26
- package/lib/browser/view/debug-threads-widget.js +145 -145
- package/lib/browser/view/debug-toolbar-widget.d.ts +34 -34
- package/lib/browser/view/debug-toolbar-widget.js +156 -156
- package/lib/browser/view/debug-variables-source.d.ts +9 -9
- package/lib/browser/view/debug-variables-source.js +60 -60
- package/lib/browser/view/debug-variables-widget.d.ts +16 -16
- package/lib/browser/view/debug-variables-widget.js +78 -78
- package/lib/browser/view/debug-view-model.d.ts +51 -51
- package/lib/browser/view/debug-view-model.js +220 -220
- package/lib/browser/view/debug-watch-expression.d.ts +30 -30
- package/lib/browser/view/debug-watch-expression.js +73 -73
- package/lib/browser/view/debug-watch-source.d.ts +9 -9
- package/lib/browser/view/debug-watch-source.js +58 -58
- package/lib/browser/view/debug-watch-widget.d.ts +16 -16
- package/lib/browser/view/debug-watch-widget.js +78 -78
- package/lib/browser/view/debug-widget.d.ts +23 -23
- package/lib/browser/view/debug-widget.js +108 -108
- package/lib/common/debug-adapter-contribution-registry.d.ts +59 -59
- package/lib/common/debug-adapter-contribution-registry.js +212 -212
- package/lib/common/debug-adapter-session.d.ts +18 -18
- package/lib/common/debug-adapter-session.js +78 -78
- package/lib/common/debug-common.d.ts +1 -1
- package/lib/common/debug-common.js +29 -29
- package/lib/common/debug-compound.d.ts +14 -14
- package/lib/common/debug-compound.js +27 -27
- package/lib/common/debug-configuration.d.ts +70 -70
- package/lib/common/debug-configuration.js +31 -31
- package/lib/common/debug-model.d.ts +152 -152
- package/lib/common/debug-model.js +35 -35
- package/lib/common/debug-service.d.ts +123 -123
- package/lib/common/debug-service.js +66 -66
- package/lib/common/debug-uri-utils.d.ts +23 -23
- package/lib/common/debug-uri-utils.js +26 -26
- package/lib/common/inline-debug-adapter.d.ts +18 -18
- package/lib/common/inline-debug-adapter.js +44 -44
- package/lib/node/debug-adapter-factory.d.ts +19 -19
- package/lib/node/debug-adapter-factory.js +96 -96
- package/lib/node/debug-adapter-session-manager.d.ts +37 -37
- package/lib/node/debug-adapter-session-manager.js +111 -111
- package/lib/node/debug-backend-module.d.ts +3 -3
- package/lib/node/debug-backend-module.js +41 -41
- package/lib/node/debug-service-impl.d.ts +30 -30
- package/lib/node/debug-service-impl.js +124 -124
- package/lib/node/stream-debug-adapter.d.ts +36 -36
- package/lib/node/stream-debug-adapter.js +112 -112
- package/package.json +16 -16
- package/src/browser/breakpoint/breakpoint-manager.ts +369 -369
- package/src/browser/breakpoint/breakpoint-marker.ts +104 -104
- package/src/browser/console/debug-console-contribution.tsx +240 -240
- package/src/browser/console/debug-console-items.tsx +384 -384
- package/src/browser/console/debug-console-session.ts +205 -205
- package/src/browser/debug-call-stack-item-type-key.ts +20 -20
- package/src/browser/debug-configuration-manager.ts +591 -591
- package/src/browser/debug-configuration-model.ts +100 -100
- package/src/browser/debug-contribution.ts +43 -43
- package/src/browser/debug-frontend-application-contribution.ts +1551 -1551
- package/src/browser/debug-frontend-module.ts +133 -132
- package/src/browser/debug-package.spec.ts +20 -20
- package/src/browser/debug-preferences.ts +98 -98
- package/src/browser/debug-prefix-configuration.ts +195 -195
- package/src/browser/debug-resource.ts +59 -59
- package/src/browser/debug-schema-updater.ts +149 -149
- package/src/browser/debug-session-connection.ts +357 -357
- package/src/browser/debug-session-contribution.ts +150 -150
- package/src/browser/debug-session-manager.ts +682 -682
- package/src/browser/debug-session-options.ts +114 -114
- package/src/browser/debug-session.tsx +947 -947
- package/src/browser/debug-tab-bar-decorator.ts +57 -57
- package/src/browser/debug-watch-manager.ts +93 -93
- package/src/browser/disassembly-view/disassembly-view-accessibility-provider.ts +43 -43
- package/src/browser/disassembly-view/disassembly-view-breakpoint-renderer.ts +119 -119
- package/src/browser/disassembly-view/disassembly-view-contribution.ts +109 -109
- package/src/browser/disassembly-view/disassembly-view-instruction-renderer.ts +245 -245
- package/src/browser/disassembly-view/disassembly-view-table-delegate.ts +39 -39
- package/src/browser/disassembly-view/disassembly-view-utilities.ts +55 -55
- package/src/browser/disassembly-view/disassembly-view-widget.ts +463 -463
- package/src/browser/editor/debug-breakpoint-widget.tsx +293 -293
- package/src/browser/editor/debug-editor-model.ts +529 -528
- package/src/browser/editor/debug-editor-service.ts +192 -192
- package/src/browser/editor/debug-editor.ts +20 -20
- package/src/browser/editor/debug-exception-widget.tsx +122 -122
- package/src/browser/editor/debug-expression-provider.ts +78 -78
- package/src/browser/editor/debug-hover-source.tsx +105 -105
- package/src/browser/editor/debug-hover-widget.ts +298 -298
- package/src/browser/editor/debug-inline-value-decorator.ts +373 -377
- package/src/browser/model/debug-breakpoint.tsx +151 -151
- package/src/browser/model/debug-function-breakpoint.tsx +101 -101
- package/src/browser/model/debug-instruction-breakpoint.tsx +68 -68
- package/src/browser/model/debug-source-breakpoint.tsx +237 -237
- package/src/browser/model/debug-source.ts +93 -93
- package/src/browser/model/debug-stack-frame.tsx +170 -170
- package/src/browser/model/debug-thread.tsx +285 -285
- package/src/browser/preferences/launch-preferences.ts +38 -38
- package/src/browser/style/index.css +453 -453
- package/src/browser/view/debug-action.tsx +57 -57
- package/src/browser/view/debug-breakpoints-source.tsx +53 -53
- package/src/browser/view/debug-breakpoints-widget.ts +71 -71
- package/src/browser/view/debug-configuration-select.tsx +269 -269
- package/src/browser/view/debug-configuration-widget.tsx +121 -121
- package/src/browser/view/debug-exception-breakpoint.tsx +68 -68
- package/src/browser/view/debug-session-widget.ts +124 -124
- package/src/browser/view/debug-stack-frames-source.tsx +75 -75
- package/src/browser/view/debug-stack-frames-widget.ts +135 -135
- package/src/browser/view/debug-threads-source.tsx +48 -48
- package/src/browser/view/debug-threads-widget.ts +125 -125
- package/src/browser/view/debug-toolbar-widget.tsx +145 -145
- package/src/browser/view/debug-variables-source.ts +43 -43
- package/src/browser/view/debug-variables-widget.ts +61 -61
- package/src/browser/view/debug-view-model.ts +230 -230
- package/src/browser/view/debug-watch-expression.tsx +88 -88
- package/src/browser/view/debug-watch-source.ts +41 -41
- package/src/browser/view/debug-watch-widget.ts +61 -61
- package/src/browser/view/debug-widget.ts +97 -97
- package/src/common/debug-adapter-contribution-registry.ts +206 -206
- package/src/common/debug-adapter-session.ts +102 -102
- package/src/common/debug-common.ts +19 -19
- package/src/common/debug-compound.ts +33 -33
- package/src/common/debug-configuration.ts +108 -108
- package/src/common/debug-model.ts +200 -200
- package/src/common/debug-service.ts +184 -184
- package/src/common/debug-uri-utils.ts +24 -24
- package/src/common/inline-debug-adapter.ts +47 -47
- package/src/node/debug-adapter-factory.ts +107 -107
- package/src/node/debug-adapter-session-manager.ts +106 -106
- package/src/node/debug-backend-module.ts +57 -57
- package/src/node/debug-service-impl.ts +119 -119
- package/src/node/stream-debug-adapter.ts +126 -126
|
@@ -1,277 +1,277 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 TypeFox and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
var DebugHoverWidget_1;
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.DebugHoverWidget = exports.createDebugHoverWidgetContainer = void 0;
|
|
29
|
-
const debounce = require("@theia/core/shared/lodash.debounce");
|
|
30
|
-
const widgets_1 = require("@theia/core/shared/@phosphor/widgets");
|
|
31
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
32
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
33
|
-
const source_tree_1 = require("@theia/core/lib/browser/source-tree");
|
|
34
|
-
const disposable_1 = require("@theia/core/lib/common/disposable");
|
|
35
|
-
const debug_session_manager_1 = require("../debug-session-manager");
|
|
36
|
-
const debug_editor_1 = require("./debug-editor");
|
|
37
|
-
const debug_expression_provider_1 = require("./debug-expression-provider");
|
|
38
|
-
const debug_hover_source_1 = require("./debug-hover-source");
|
|
39
|
-
const debug_console_items_1 = require("../console/debug-console-items");
|
|
40
|
-
const monaco = require("@theia/monaco-editor-core");
|
|
41
|
-
const standaloneServices_1 = require("@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices");
|
|
42
|
-
const languageFeatures_1 = require("@theia/monaco-editor-core/esm/vs/editor/common/services/languageFeatures");
|
|
43
|
-
const cancellation_1 = require("@theia/monaco-editor-core/esm/vs/base/common/cancellation");
|
|
44
|
-
const position_1 = require("@theia/monaco-editor-core/esm/vs/editor/common/core/position");
|
|
45
|
-
const core_1 = require("@theia/core");
|
|
46
|
-
function createDebugHoverWidgetContainer(parent, editor) {
|
|
47
|
-
const child = source_tree_1.SourceTreeWidget.createContainer(parent, {
|
|
48
|
-
virtualized: false
|
|
49
|
-
});
|
|
50
|
-
child.bind(debug_editor_1.DebugEditor).toConstantValue(editor);
|
|
51
|
-
child.bind(debug_hover_source_1.DebugHoverSource).toSelf();
|
|
52
|
-
child.unbind(source_tree_1.SourceTreeWidget);
|
|
53
|
-
child.bind(debug_expression_provider_1.DebugExpressionProvider).toSelf();
|
|
54
|
-
child.bind(DebugHoverWidget).toSelf();
|
|
55
|
-
return child;
|
|
56
|
-
}
|
|
57
|
-
exports.createDebugHoverWidgetContainer = createDebugHoverWidgetContainer;
|
|
58
|
-
let DebugHoverWidget = DebugHoverWidget_1 = class DebugHoverWidget extends source_tree_1.SourceTreeWidget {
|
|
59
|
-
constructor() {
|
|
60
|
-
super(...arguments);
|
|
61
|
-
this.allowEditorOverflow = true;
|
|
62
|
-
this.domNode = document.createElement('div');
|
|
63
|
-
this.titleNode = document.createElement('div');
|
|
64
|
-
this.contentNode = document.createElement('div');
|
|
65
|
-
this.doSchedule = debounce((fn) => fn(), 300);
|
|
66
|
-
}
|
|
67
|
-
getId() {
|
|
68
|
-
return DebugHoverWidget_1.ID;
|
|
69
|
-
}
|
|
70
|
-
getDomNode() {
|
|
71
|
-
return this.domNode;
|
|
72
|
-
}
|
|
73
|
-
init() {
|
|
74
|
-
super.init();
|
|
75
|
-
this.domNode.className = 'theia-debug-hover';
|
|
76
|
-
this.titleNode.className = 'theia-debug-hover-title';
|
|
77
|
-
this.domNode.appendChild(this.titleNode);
|
|
78
|
-
this.contentNode.className = 'theia-debug-hover-content';
|
|
79
|
-
this.domNode.appendChild(this.contentNode);
|
|
80
|
-
// for stopping scroll events from contentNode going to the editor
|
|
81
|
-
this.contentNode.addEventListener('wheel', e => e.stopPropagation());
|
|
82
|
-
this.editor.getControl().addContentWidget(this);
|
|
83
|
-
this.source = this.hoverSource;
|
|
84
|
-
this.toDispose.pushAll([
|
|
85
|
-
this.hoverSource,
|
|
86
|
-
disposable_1.Disposable.create(() => this.editor.getControl().removeContentWidget(this)),
|
|
87
|
-
disposable_1.Disposable.create(() => this.hide()),
|
|
88
|
-
this.sessions.onDidChange(() => {
|
|
89
|
-
if (!this.isEditorFrame()) {
|
|
90
|
-
this.hide();
|
|
91
|
-
}
|
|
92
|
-
})
|
|
93
|
-
]);
|
|
94
|
-
}
|
|
95
|
-
dispose() {
|
|
96
|
-
this.toDispose.dispose();
|
|
97
|
-
}
|
|
98
|
-
show(options) {
|
|
99
|
-
this.schedule(() => this.doShow(options), options && options.immediate);
|
|
100
|
-
}
|
|
101
|
-
hide(options) {
|
|
102
|
-
this.schedule(() => this.doHide(), options && options.immediate);
|
|
103
|
-
}
|
|
104
|
-
schedule(fn, immediate = true) {
|
|
105
|
-
if (immediate) {
|
|
106
|
-
this.doSchedule.cancel();
|
|
107
|
-
fn();
|
|
108
|
-
}
|
|
109
|
-
else {
|
|
110
|
-
this.doSchedule(fn);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
doHide() {
|
|
114
|
-
if (!this.isVisible) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (this.domNode.contains(document.activeElement)) {
|
|
118
|
-
this.editor.getControl().focus();
|
|
119
|
-
}
|
|
120
|
-
if (this.isAttached) {
|
|
121
|
-
widgets_1.Widget.detach(this);
|
|
122
|
-
}
|
|
123
|
-
this.hoverSource.reset();
|
|
124
|
-
super.hide();
|
|
125
|
-
this.options = undefined;
|
|
126
|
-
this.editor.getControl().layoutContentWidget(this);
|
|
127
|
-
}
|
|
128
|
-
async doShow(options = this.options) {
|
|
129
|
-
const cancellationSource = new cancellation_1.CancellationTokenSource();
|
|
130
|
-
if (!this.isEditorFrame()) {
|
|
131
|
-
this.hide();
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
if (!options) {
|
|
135
|
-
this.hide();
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
if (this.options && this.options.selection.equalsRange(options.selection)) {
|
|
139
|
-
return;
|
|
140
|
-
}
|
|
141
|
-
if (!this.isAttached) {
|
|
142
|
-
widgets_1.Widget.attach(this, this.contentNode);
|
|
143
|
-
}
|
|
144
|
-
this.options = options;
|
|
145
|
-
let matchingExpression;
|
|
146
|
-
const pluginExpressionProvider = standaloneServices_1.StandaloneServices.get(languageFeatures_1.ILanguageFeaturesService).evaluatableExpressionProvider;
|
|
147
|
-
const textEditorModel = this.editor.document.textEditorModel;
|
|
148
|
-
if (pluginExpressionProvider && pluginExpressionProvider.has(textEditorModel)) {
|
|
149
|
-
const registeredProviders = pluginExpressionProvider.ordered(textEditorModel);
|
|
150
|
-
const position = new position_1.Position(this.options.selection.startLineNumber, this.options.selection.startColumn);
|
|
151
|
-
const promises = registeredProviders.map(support => Promise.resolve(support.provideEvaluatableExpression(textEditorModel, position, cancellationSource.token)));
|
|
152
|
-
const results = await Promise.all(promises).then(core_1.ArrayUtils.coalesce);
|
|
153
|
-
if (results.length > 0) {
|
|
154
|
-
matchingExpression = results[0].expression;
|
|
155
|
-
const range = results[0].range;
|
|
156
|
-
if (!matchingExpression) {
|
|
157
|
-
const lineContent = textEditorModel.getLineContent(position.lineNumber);
|
|
158
|
-
matchingExpression = lineContent.substring(range.startColumn - 1, range.endColumn - 1);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
else { // use fallback if no provider was registered
|
|
163
|
-
matchingExpression = this.expressionProvider.get(this.editor.getControl().getModel(), options.selection);
|
|
164
|
-
if (matchingExpression) {
|
|
165
|
-
const expressionLineContent = this.editor
|
|
166
|
-
.getControl()
|
|
167
|
-
.getModel()
|
|
168
|
-
.getLineContent(this.options.selection.startLineNumber);
|
|
169
|
-
const startColumn = expressionLineContent.indexOf(matchingExpression, this.options.selection.startColumn - matchingExpression.length) + 1;
|
|
170
|
-
const endColumn = startColumn + matchingExpression.length;
|
|
171
|
-
this.options.selection = new monaco.Range(this.options.selection.startLineNumber, startColumn, this.options.selection.startLineNumber, endColumn);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (!matchingExpression) {
|
|
175
|
-
this.hide();
|
|
176
|
-
return;
|
|
177
|
-
}
|
|
178
|
-
const toFocus = new disposable_1.DisposableCollection();
|
|
179
|
-
if (this.options.focus === true) {
|
|
180
|
-
toFocus.push(this.model.onNodeRefreshed(() => {
|
|
181
|
-
toFocus.dispose();
|
|
182
|
-
this.activate();
|
|
183
|
-
}));
|
|
184
|
-
}
|
|
185
|
-
const expression = await this.hoverSource.evaluate(matchingExpression);
|
|
186
|
-
if (!expression) {
|
|
187
|
-
toFocus.dispose();
|
|
188
|
-
this.hide();
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
this.contentNode.hidden = false;
|
|
192
|
-
['number', 'boolean', 'string'].forEach(token => this.titleNode.classList.remove(token));
|
|
193
|
-
this.domNode.classList.remove('complex-value');
|
|
194
|
-
if (expression.hasElements) {
|
|
195
|
-
this.domNode.classList.add('complex-value');
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
this.contentNode.hidden = true;
|
|
199
|
-
if (expression.type === 'number' || expression.type === 'boolean' || expression.type === 'string') {
|
|
200
|
-
this.titleNode.classList.add(expression.type);
|
|
201
|
-
}
|
|
202
|
-
else if (!isNaN(+expression.value)) {
|
|
203
|
-
this.titleNode.classList.add('number');
|
|
204
|
-
}
|
|
205
|
-
else if (debug_console_items_1.DebugVariable.booleanRegex.test(expression.value)) {
|
|
206
|
-
this.titleNode.classList.add('boolean');
|
|
207
|
-
}
|
|
208
|
-
else if (debug_console_items_1.DebugVariable.stringRegex.test(expression.value)) {
|
|
209
|
-
this.titleNode.classList.add('string');
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
super.show();
|
|
213
|
-
await new Promise(resolve => {
|
|
214
|
-
setTimeout(() => window.requestAnimationFrame(() => {
|
|
215
|
-
this.editor.getControl().layoutContentWidget(this);
|
|
216
|
-
resolve();
|
|
217
|
-
}), 0);
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
isEditorFrame() {
|
|
221
|
-
return this.sessions.isCurrentEditorFrame(this.editor.getControl().getModel().uri);
|
|
222
|
-
}
|
|
223
|
-
getPosition() {
|
|
224
|
-
if (!this.isVisible) {
|
|
225
|
-
return undefined;
|
|
226
|
-
}
|
|
227
|
-
const position = this.options && this.options.selection.getStartPosition();
|
|
228
|
-
return position
|
|
229
|
-
? {
|
|
230
|
-
position: new monaco.Position(position.lineNumber, position.column),
|
|
231
|
-
preference: [
|
|
232
|
-
monaco.editor.ContentWidgetPositionPreference.ABOVE,
|
|
233
|
-
monaco.editor.ContentWidgetPositionPreference.BELOW,
|
|
234
|
-
],
|
|
235
|
-
}
|
|
236
|
-
: undefined;
|
|
237
|
-
}
|
|
238
|
-
onUpdateRequest(msg) {
|
|
239
|
-
super.onUpdateRequest(msg);
|
|
240
|
-
const { expression } = this.hoverSource;
|
|
241
|
-
const value = expression && expression.value || '';
|
|
242
|
-
this.titleNode.textContent = value;
|
|
243
|
-
this.titleNode.title = value;
|
|
244
|
-
}
|
|
245
|
-
onAfterAttach(msg) {
|
|
246
|
-
super.onAfterAttach(msg);
|
|
247
|
-
this.addKeyListener(this.domNode, browser_1.Key.ESCAPE, () => this.hide());
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
DebugHoverWidget.ID = 'debug.editor.hover';
|
|
251
|
-
__decorate([
|
|
252
|
-
(0, inversify_1.inject)(debug_editor_1.DebugEditor),
|
|
253
|
-
__metadata("design:type", Object)
|
|
254
|
-
], DebugHoverWidget.prototype, "editor", void 0);
|
|
255
|
-
__decorate([
|
|
256
|
-
(0, inversify_1.inject)(debug_session_manager_1.DebugSessionManager),
|
|
257
|
-
__metadata("design:type", debug_session_manager_1.DebugSessionManager)
|
|
258
|
-
], DebugHoverWidget.prototype, "sessions", void 0);
|
|
259
|
-
__decorate([
|
|
260
|
-
(0, inversify_1.inject)(debug_hover_source_1.DebugHoverSource),
|
|
261
|
-
__metadata("design:type", debug_hover_source_1.DebugHoverSource)
|
|
262
|
-
], DebugHoverWidget.prototype, "hoverSource", void 0);
|
|
263
|
-
__decorate([
|
|
264
|
-
(0, inversify_1.inject)(debug_expression_provider_1.DebugExpressionProvider),
|
|
265
|
-
__metadata("design:type", debug_expression_provider_1.DebugExpressionProvider)
|
|
266
|
-
], DebugHoverWidget.prototype, "expressionProvider", void 0);
|
|
267
|
-
__decorate([
|
|
268
|
-
(0, inversify_1.postConstruct)(),
|
|
269
|
-
__metadata("design:type", Function),
|
|
270
|
-
__metadata("design:paramtypes", []),
|
|
271
|
-
__metadata("design:returntype", void 0)
|
|
272
|
-
], DebugHoverWidget.prototype, "init", null);
|
|
273
|
-
DebugHoverWidget = DebugHoverWidget_1 = __decorate([
|
|
274
|
-
(0, inversify_1.injectable)()
|
|
275
|
-
], DebugHoverWidget);
|
|
276
|
-
exports.DebugHoverWidget = DebugHoverWidget;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2018 TypeFox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
var DebugHoverWidget_1;
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.DebugHoverWidget = exports.createDebugHoverWidgetContainer = void 0;
|
|
29
|
+
const debounce = require("@theia/core/shared/lodash.debounce");
|
|
30
|
+
const widgets_1 = require("@theia/core/shared/@phosphor/widgets");
|
|
31
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
32
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
33
|
+
const source_tree_1 = require("@theia/core/lib/browser/source-tree");
|
|
34
|
+
const disposable_1 = require("@theia/core/lib/common/disposable");
|
|
35
|
+
const debug_session_manager_1 = require("../debug-session-manager");
|
|
36
|
+
const debug_editor_1 = require("./debug-editor");
|
|
37
|
+
const debug_expression_provider_1 = require("./debug-expression-provider");
|
|
38
|
+
const debug_hover_source_1 = require("./debug-hover-source");
|
|
39
|
+
const debug_console_items_1 = require("../console/debug-console-items");
|
|
40
|
+
const monaco = require("@theia/monaco-editor-core");
|
|
41
|
+
const standaloneServices_1 = require("@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices");
|
|
42
|
+
const languageFeatures_1 = require("@theia/monaco-editor-core/esm/vs/editor/common/services/languageFeatures");
|
|
43
|
+
const cancellation_1 = require("@theia/monaco-editor-core/esm/vs/base/common/cancellation");
|
|
44
|
+
const position_1 = require("@theia/monaco-editor-core/esm/vs/editor/common/core/position");
|
|
45
|
+
const core_1 = require("@theia/core");
|
|
46
|
+
function createDebugHoverWidgetContainer(parent, editor) {
|
|
47
|
+
const child = source_tree_1.SourceTreeWidget.createContainer(parent, {
|
|
48
|
+
virtualized: false
|
|
49
|
+
});
|
|
50
|
+
child.bind(debug_editor_1.DebugEditor).toConstantValue(editor);
|
|
51
|
+
child.bind(debug_hover_source_1.DebugHoverSource).toSelf();
|
|
52
|
+
child.unbind(source_tree_1.SourceTreeWidget);
|
|
53
|
+
child.bind(debug_expression_provider_1.DebugExpressionProvider).toSelf();
|
|
54
|
+
child.bind(DebugHoverWidget).toSelf();
|
|
55
|
+
return child;
|
|
56
|
+
}
|
|
57
|
+
exports.createDebugHoverWidgetContainer = createDebugHoverWidgetContainer;
|
|
58
|
+
let DebugHoverWidget = DebugHoverWidget_1 = class DebugHoverWidget extends source_tree_1.SourceTreeWidget {
|
|
59
|
+
constructor() {
|
|
60
|
+
super(...arguments);
|
|
61
|
+
this.allowEditorOverflow = true;
|
|
62
|
+
this.domNode = document.createElement('div');
|
|
63
|
+
this.titleNode = document.createElement('div');
|
|
64
|
+
this.contentNode = document.createElement('div');
|
|
65
|
+
this.doSchedule = debounce((fn) => fn(), 300);
|
|
66
|
+
}
|
|
67
|
+
getId() {
|
|
68
|
+
return DebugHoverWidget_1.ID;
|
|
69
|
+
}
|
|
70
|
+
getDomNode() {
|
|
71
|
+
return this.domNode;
|
|
72
|
+
}
|
|
73
|
+
init() {
|
|
74
|
+
super.init();
|
|
75
|
+
this.domNode.className = 'theia-debug-hover';
|
|
76
|
+
this.titleNode.className = 'theia-debug-hover-title';
|
|
77
|
+
this.domNode.appendChild(this.titleNode);
|
|
78
|
+
this.contentNode.className = 'theia-debug-hover-content';
|
|
79
|
+
this.domNode.appendChild(this.contentNode);
|
|
80
|
+
// for stopping scroll events from contentNode going to the editor
|
|
81
|
+
this.contentNode.addEventListener('wheel', e => e.stopPropagation());
|
|
82
|
+
this.editor.getControl().addContentWidget(this);
|
|
83
|
+
this.source = this.hoverSource;
|
|
84
|
+
this.toDispose.pushAll([
|
|
85
|
+
this.hoverSource,
|
|
86
|
+
disposable_1.Disposable.create(() => this.editor.getControl().removeContentWidget(this)),
|
|
87
|
+
disposable_1.Disposable.create(() => this.hide()),
|
|
88
|
+
this.sessions.onDidChange(() => {
|
|
89
|
+
if (!this.isEditorFrame()) {
|
|
90
|
+
this.hide();
|
|
91
|
+
}
|
|
92
|
+
})
|
|
93
|
+
]);
|
|
94
|
+
}
|
|
95
|
+
dispose() {
|
|
96
|
+
this.toDispose.dispose();
|
|
97
|
+
}
|
|
98
|
+
show(options) {
|
|
99
|
+
this.schedule(() => this.doShow(options), options && options.immediate);
|
|
100
|
+
}
|
|
101
|
+
hide(options) {
|
|
102
|
+
this.schedule(() => this.doHide(), options && options.immediate);
|
|
103
|
+
}
|
|
104
|
+
schedule(fn, immediate = true) {
|
|
105
|
+
if (immediate) {
|
|
106
|
+
this.doSchedule.cancel();
|
|
107
|
+
fn();
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this.doSchedule(fn);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
doHide() {
|
|
114
|
+
if (!this.isVisible) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (this.domNode.contains(document.activeElement)) {
|
|
118
|
+
this.editor.getControl().focus();
|
|
119
|
+
}
|
|
120
|
+
if (this.isAttached) {
|
|
121
|
+
widgets_1.Widget.detach(this);
|
|
122
|
+
}
|
|
123
|
+
this.hoverSource.reset();
|
|
124
|
+
super.hide();
|
|
125
|
+
this.options = undefined;
|
|
126
|
+
this.editor.getControl().layoutContentWidget(this);
|
|
127
|
+
}
|
|
128
|
+
async doShow(options = this.options) {
|
|
129
|
+
const cancellationSource = new cancellation_1.CancellationTokenSource();
|
|
130
|
+
if (!this.isEditorFrame()) {
|
|
131
|
+
this.hide();
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (!options) {
|
|
135
|
+
this.hide();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (this.options && this.options.selection.equalsRange(options.selection)) {
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (!this.isAttached) {
|
|
142
|
+
widgets_1.Widget.attach(this, this.contentNode);
|
|
143
|
+
}
|
|
144
|
+
this.options = options;
|
|
145
|
+
let matchingExpression;
|
|
146
|
+
const pluginExpressionProvider = standaloneServices_1.StandaloneServices.get(languageFeatures_1.ILanguageFeaturesService).evaluatableExpressionProvider;
|
|
147
|
+
const textEditorModel = this.editor.document.textEditorModel;
|
|
148
|
+
if (pluginExpressionProvider && pluginExpressionProvider.has(textEditorModel)) {
|
|
149
|
+
const registeredProviders = pluginExpressionProvider.ordered(textEditorModel);
|
|
150
|
+
const position = new position_1.Position(this.options.selection.startLineNumber, this.options.selection.startColumn);
|
|
151
|
+
const promises = registeredProviders.map(support => Promise.resolve(support.provideEvaluatableExpression(textEditorModel, position, cancellationSource.token)));
|
|
152
|
+
const results = await Promise.all(promises).then(core_1.ArrayUtils.coalesce);
|
|
153
|
+
if (results.length > 0) {
|
|
154
|
+
matchingExpression = results[0].expression;
|
|
155
|
+
const range = results[0].range;
|
|
156
|
+
if (!matchingExpression) {
|
|
157
|
+
const lineContent = textEditorModel.getLineContent(position.lineNumber);
|
|
158
|
+
matchingExpression = lineContent.substring(range.startColumn - 1, range.endColumn - 1);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
else { // use fallback if no provider was registered
|
|
163
|
+
matchingExpression = this.expressionProvider.get(this.editor.getControl().getModel(), options.selection);
|
|
164
|
+
if (matchingExpression) {
|
|
165
|
+
const expressionLineContent = this.editor
|
|
166
|
+
.getControl()
|
|
167
|
+
.getModel()
|
|
168
|
+
.getLineContent(this.options.selection.startLineNumber);
|
|
169
|
+
const startColumn = expressionLineContent.indexOf(matchingExpression, this.options.selection.startColumn - matchingExpression.length) + 1;
|
|
170
|
+
const endColumn = startColumn + matchingExpression.length;
|
|
171
|
+
this.options.selection = new monaco.Range(this.options.selection.startLineNumber, startColumn, this.options.selection.startLineNumber, endColumn);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (!matchingExpression) {
|
|
175
|
+
this.hide();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const toFocus = new disposable_1.DisposableCollection();
|
|
179
|
+
if (this.options.focus === true) {
|
|
180
|
+
toFocus.push(this.model.onNodeRefreshed(() => {
|
|
181
|
+
toFocus.dispose();
|
|
182
|
+
this.activate();
|
|
183
|
+
}));
|
|
184
|
+
}
|
|
185
|
+
const expression = await this.hoverSource.evaluate(matchingExpression);
|
|
186
|
+
if (!expression) {
|
|
187
|
+
toFocus.dispose();
|
|
188
|
+
this.hide();
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
this.contentNode.hidden = false;
|
|
192
|
+
['number', 'boolean', 'string'].forEach(token => this.titleNode.classList.remove(token));
|
|
193
|
+
this.domNode.classList.remove('complex-value');
|
|
194
|
+
if (expression.hasElements) {
|
|
195
|
+
this.domNode.classList.add('complex-value');
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
this.contentNode.hidden = true;
|
|
199
|
+
if (expression.type === 'number' || expression.type === 'boolean' || expression.type === 'string') {
|
|
200
|
+
this.titleNode.classList.add(expression.type);
|
|
201
|
+
}
|
|
202
|
+
else if (!isNaN(+expression.value)) {
|
|
203
|
+
this.titleNode.classList.add('number');
|
|
204
|
+
}
|
|
205
|
+
else if (debug_console_items_1.DebugVariable.booleanRegex.test(expression.value)) {
|
|
206
|
+
this.titleNode.classList.add('boolean');
|
|
207
|
+
}
|
|
208
|
+
else if (debug_console_items_1.DebugVariable.stringRegex.test(expression.value)) {
|
|
209
|
+
this.titleNode.classList.add('string');
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
super.show();
|
|
213
|
+
await new Promise(resolve => {
|
|
214
|
+
setTimeout(() => window.requestAnimationFrame(() => {
|
|
215
|
+
this.editor.getControl().layoutContentWidget(this);
|
|
216
|
+
resolve();
|
|
217
|
+
}), 0);
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
isEditorFrame() {
|
|
221
|
+
return this.sessions.isCurrentEditorFrame(this.editor.getControl().getModel().uri);
|
|
222
|
+
}
|
|
223
|
+
getPosition() {
|
|
224
|
+
if (!this.isVisible) {
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
const position = this.options && this.options.selection.getStartPosition();
|
|
228
|
+
return position
|
|
229
|
+
? {
|
|
230
|
+
position: new monaco.Position(position.lineNumber, position.column),
|
|
231
|
+
preference: [
|
|
232
|
+
monaco.editor.ContentWidgetPositionPreference.ABOVE,
|
|
233
|
+
monaco.editor.ContentWidgetPositionPreference.BELOW,
|
|
234
|
+
],
|
|
235
|
+
}
|
|
236
|
+
: undefined;
|
|
237
|
+
}
|
|
238
|
+
onUpdateRequest(msg) {
|
|
239
|
+
super.onUpdateRequest(msg);
|
|
240
|
+
const { expression } = this.hoverSource;
|
|
241
|
+
const value = expression && expression.value || '';
|
|
242
|
+
this.titleNode.textContent = value;
|
|
243
|
+
this.titleNode.title = value;
|
|
244
|
+
}
|
|
245
|
+
onAfterAttach(msg) {
|
|
246
|
+
super.onAfterAttach(msg);
|
|
247
|
+
this.addKeyListener(this.domNode, browser_1.Key.ESCAPE, () => this.hide());
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
DebugHoverWidget.ID = 'debug.editor.hover';
|
|
251
|
+
__decorate([
|
|
252
|
+
(0, inversify_1.inject)(debug_editor_1.DebugEditor),
|
|
253
|
+
__metadata("design:type", Object)
|
|
254
|
+
], DebugHoverWidget.prototype, "editor", void 0);
|
|
255
|
+
__decorate([
|
|
256
|
+
(0, inversify_1.inject)(debug_session_manager_1.DebugSessionManager),
|
|
257
|
+
__metadata("design:type", debug_session_manager_1.DebugSessionManager)
|
|
258
|
+
], DebugHoverWidget.prototype, "sessions", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
(0, inversify_1.inject)(debug_hover_source_1.DebugHoverSource),
|
|
261
|
+
__metadata("design:type", debug_hover_source_1.DebugHoverSource)
|
|
262
|
+
], DebugHoverWidget.prototype, "hoverSource", void 0);
|
|
263
|
+
__decorate([
|
|
264
|
+
(0, inversify_1.inject)(debug_expression_provider_1.DebugExpressionProvider),
|
|
265
|
+
__metadata("design:type", debug_expression_provider_1.DebugExpressionProvider)
|
|
266
|
+
], DebugHoverWidget.prototype, "expressionProvider", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
(0, inversify_1.postConstruct)(),
|
|
269
|
+
__metadata("design:type", Function),
|
|
270
|
+
__metadata("design:paramtypes", []),
|
|
271
|
+
__metadata("design:returntype", void 0)
|
|
272
|
+
], DebugHoverWidget.prototype, "init", null);
|
|
273
|
+
DebugHoverWidget = DebugHoverWidget_1 = __decorate([
|
|
274
|
+
(0, inversify_1.injectable)()
|
|
275
|
+
], DebugHoverWidget);
|
|
276
|
+
exports.DebugHoverWidget = DebugHoverWidget;
|
|
277
277
|
//# sourceMappingURL=debug-hover-widget.js.map
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
|
2
|
-
import * as monaco from '@theia/monaco-editor-core';
|
|
3
|
-
import { IDecorationOptions } from '@theia/monaco-editor-core/esm/vs/editor/common/editorCommon';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
export declare
|
|
9
|
-
|
|
10
|
-
protected
|
|
11
|
-
protected
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
protected
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
private getWordToPositionsMap;
|
|
21
|
-
}
|
|
1
|
+
import { FrontendApplicationContribution } from '@theia/core/lib/browser/frontend-application-contribution';
|
|
2
|
+
import * as monaco from '@theia/monaco-editor-core';
|
|
3
|
+
import { IDecorationOptions } from '@theia/monaco-editor-core/esm/vs/editor/common/editorCommon';
|
|
4
|
+
import { DebugPreferences } from '../debug-preferences';
|
|
5
|
+
import { DebugStackFrame } from '../model/debug-stack-frame';
|
|
6
|
+
import { DebugEditorModel } from './debug-editor-model';
|
|
7
|
+
export declare const INLINE_VALUE_DECORATION_KEY = "inlinevaluedecoration";
|
|
8
|
+
export declare class DebugInlineValueDecorator implements FrontendApplicationContribution {
|
|
9
|
+
protected readonly preferences: DebugPreferences;
|
|
10
|
+
protected enabled: boolean;
|
|
11
|
+
protected wordToLineNumbersMap: Map<string, monaco.Position[]> | undefined;
|
|
12
|
+
onStart(): void;
|
|
13
|
+
calculateDecorations(debugEditorModel: DebugEditorModel, stackFrame: DebugStackFrame | undefined): Promise<IDecorationOptions[]>;
|
|
14
|
+
protected updateInlineValueDecorations(debugEditorModel: DebugEditorModel, model: monaco.editor.ITextModel | undefined, stackFrame: DebugStackFrame | undefined): Promise<IDecorationOptions[]>;
|
|
15
|
+
private createInlineValueDecorationsInsideRange;
|
|
16
|
+
protected formatInlineValue(...args: string[]): string;
|
|
17
|
+
private createInlineValueDecoration;
|
|
18
|
+
private getWordToPositionsMap;
|
|
19
|
+
}
|
|
22
20
|
//# sourceMappingURL=debug-inline-value-decorator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-inline-value-decorator.d.ts","sourceRoot":"","sources":["../../../src/browser/editor/debug-inline-value-decorator.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,2DAA2D,CAAC;AAE5G,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAC;
|
|
1
|
+
{"version":3,"file":"debug-inline-value-decorator.d.ts","sourceRoot":"","sources":["../../../src/browser/editor/debug-inline-value-decorator.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,2DAA2D,CAAC;AAE5G,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAC;AAOjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAIxD,eAAO,MAAM,2BAA2B,0BAA0B,CAAC;AAmBnE,qBACa,yBAA0B,YAAW,+BAA+B;IAE7E,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IAEjD,SAAS,CAAC,OAAO,UAAS;IAC1B,SAAS,CAAC,oBAAoB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,SAAS,CAAa;IAEvF,OAAO,IAAI,IAAI;IAUT,oBAAoB,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,UAAU,EAAE,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;cAOtH,4BAA4B,CACxC,gBAAgB,EAAE,gBAAgB,EAClC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,GAAG,SAAS,EAC3C,UAAU,EAAE,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;YA6B7D,uCAAuC;IAiKrD,SAAS,CAAC,iBAAiB,CAAC,GAAG,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM;IAetD,OAAO,CAAC,2BAA2B;IAkCnC,OAAO,CAAC,qBAAqB;CA8ChC"}
|