@theia/memory-inspector 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.
Files changed (102) hide show
  1. package/README.md +71 -71
  2. package/lib/browser/diff-widget/memory-diff-options-widget.d.ts +36 -36
  3. package/lib/browser/diff-widget/memory-diff-options-widget.js +132 -132
  4. package/lib/browser/diff-widget/memory-diff-select-widget.d.ts +50 -50
  5. package/lib/browser/diff-widget/memory-diff-select-widget.js +137 -137
  6. package/lib/browser/diff-widget/memory-diff-table-widget.d.ts +77 -77
  7. package/lib/browser/diff-widget/memory-diff-table-widget.js +314 -314
  8. package/lib/browser/diff-widget/memory-diff-widget-types.d.ts +41 -41
  9. package/lib/browser/diff-widget/memory-diff-widget-types.js +23 -23
  10. package/lib/browser/editable-widget/memory-editable-table-widget.d.ts +64 -64
  11. package/lib/browser/editable-widget/memory-editable-table-widget.js +324 -324
  12. package/lib/browser/memory-inspector-frontend-contribution.d.ts +46 -46
  13. package/lib/browser/memory-inspector-frontend-contribution.js +291 -291
  14. package/lib/browser/memory-inspector-frontend-module.d.ts +21 -21
  15. package/lib/browser/memory-inspector-frontend-module.js +87 -87
  16. package/lib/browser/memory-provider/cdt-gdb-memory-provider.d.ts +35 -35
  17. package/lib/browser/memory-provider/cdt-gdb-memory-provider.js +136 -136
  18. package/lib/browser/memory-provider/memory-provider-service.d.ts +36 -36
  19. package/lib/browser/memory-provider/memory-provider-service.js +101 -101
  20. package/lib/browser/memory-provider/memory-provider.d.ts +65 -65
  21. package/lib/browser/memory-provider/memory-provider.js +96 -96
  22. package/lib/browser/memory-provider/memory-provider.spec.d.ts +16 -16
  23. package/lib/browser/memory-provider/memory-provider.spec.js +23 -23
  24. package/lib/browser/memory-widget/memory-options-widget.d.ts +136 -136
  25. package/lib/browser/memory-widget/memory-options-widget.js +564 -564
  26. package/lib/browser/memory-widget/memory-table-widget.d.ts +146 -146
  27. package/lib/browser/memory-widget/memory-table-widget.js +487 -487
  28. package/lib/browser/memory-widget/memory-widget.d.ts +33 -33
  29. package/lib/browser/memory-widget/memory-widget.js +112 -112
  30. package/lib/browser/register-widget/register-filter-service.d.ts +42 -42
  31. package/lib/browser/register-widget/register-filter-service.js +81 -81
  32. package/lib/browser/register-widget/register-options-widget.d.ts +81 -81
  33. package/lib/browser/register-widget/register-options-widget.js +338 -338
  34. package/lib/browser/register-widget/register-table-widget.d.ts +77 -77
  35. package/lib/browser/register-widget/register-table-widget.js +230 -230
  36. package/lib/browser/register-widget/register-widget-types.d.ts +29 -29
  37. package/lib/browser/register-widget/register-widget-types.js +35 -35
  38. package/lib/browser/utils/memory-commands.d.ts +27 -27
  39. package/lib/browser/utils/memory-commands.js +67 -67
  40. package/lib/browser/utils/memory-hover-renderer.d.ts +33 -33
  41. package/lib/browser/utils/memory-hover-renderer.js +111 -111
  42. package/lib/browser/utils/memory-recents.d.ts +27 -27
  43. package/lib/browser/utils/memory-recents.js +52 -52
  44. package/lib/browser/utils/memory-widget-components.d.ts +58 -58
  45. package/lib/browser/utils/memory-widget-components.js +69 -69
  46. package/lib/browser/utils/memory-widget-manager.d.ts +50 -50
  47. package/lib/browser/utils/memory-widget-manager.js +182 -182
  48. package/lib/browser/utils/memory-widget-utils.d.ts +113 -113
  49. package/lib/browser/utils/memory-widget-utils.js +42 -42
  50. package/lib/browser/utils/memory-widget-variable-utils.d.ts +57 -57
  51. package/lib/browser/utils/memory-widget-variable-utils.js +143 -143
  52. package/lib/browser/utils/multi-select-bar.d.ts +31 -31
  53. package/lib/browser/utils/multi-select-bar.js +34 -34
  54. package/lib/browser/wrapper-widgets/memory-dock-panel.d.ts +24 -24
  55. package/lib/browser/wrapper-widgets/memory-dock-panel.js +48 -48
  56. package/lib/browser/wrapper-widgets/memory-dockpanel-placeholder-widget.d.ts +23 -23
  57. package/lib/browser/wrapper-widgets/memory-dockpanel-placeholder-widget.js +57 -57
  58. package/lib/browser/wrapper-widgets/memory-layout-widget.d.ts +51 -51
  59. package/lib/browser/wrapper-widgets/memory-layout-widget.js +191 -191
  60. package/lib/common/util.d.ts +21 -21
  61. package/lib/common/util.js +30 -30
  62. package/lib/common/utils.spec.d.ts +16 -16
  63. package/lib/common/utils.spec.js +45 -45
  64. package/package.json +4 -4
  65. package/src/browser/diff-widget/memory-diff-options-widget.tsx +152 -152
  66. package/src/browser/diff-widget/memory-diff-select-widget.tsx +163 -163
  67. package/src/browser/diff-widget/memory-diff-table-widget.tsx +366 -366
  68. package/src/browser/diff-widget/memory-diff-widget-types.ts +45 -45
  69. package/src/browser/editable-widget/memory-editable-table-widget.tsx +359 -359
  70. package/src/browser/memory-inspector-frontend-contribution.ts +301 -301
  71. package/src/browser/memory-inspector-frontend-module.ts +118 -118
  72. package/src/browser/memory-provider/cdt-gdb-memory-provider.ts +132 -132
  73. package/src/browser/memory-provider/memory-provider-service.ts +86 -86
  74. package/src/browser/memory-provider/memory-provider.spec.ts +23 -23
  75. package/src/browser/memory-provider/memory-provider.ts +119 -119
  76. package/src/browser/memory-widget/memory-options-widget.tsx +738 -738
  77. package/src/browser/memory-widget/memory-table-widget.tsx +625 -625
  78. package/src/browser/memory-widget/memory-widget.ts +114 -114
  79. package/src/browser/register-widget/register-filter-service.ts +76 -76
  80. package/src/browser/register-widget/register-options-widget.tsx +393 -393
  81. package/src/browser/register-widget/register-table-widget.tsx +276 -276
  82. package/src/browser/register-widget/register-widget-types.ts +45 -45
  83. package/src/browser/register-widget/register-widget.css +34 -34
  84. package/src/browser/style/index.css +746 -746
  85. package/src/browser/style/memory-lock.svg +21 -21
  86. package/src/browser/style/memory-view.svg +20 -20
  87. package/src/browser/style/register-lock.svg +29 -29
  88. package/src/browser/style/register-view.svg +28 -28
  89. package/src/browser/utils/memory-commands.ts +76 -76
  90. package/src/browser/utils/memory-hover-renderer.ts +113 -113
  91. package/src/browser/utils/memory-recents.ts +58 -58
  92. package/src/browser/utils/memory-widget-components.tsx +193 -193
  93. package/src/browser/utils/memory-widget-manager.ts +179 -179
  94. package/src/browser/utils/memory-widget-utils.tsx +132 -132
  95. package/src/browser/utils/memory-widget-variable-utils.ts +170 -170
  96. package/src/browser/utils/multi-select-bar.css +61 -61
  97. package/src/browser/utils/multi-select-bar.tsx +75 -75
  98. package/src/browser/wrapper-widgets/memory-dock-panel.ts +51 -51
  99. package/src/browser/wrapper-widgets/memory-dockpanel-placeholder-widget.tsx +38 -38
  100. package/src/browser/wrapper-widgets/memory-layout-widget.tsx +167 -167
  101. package/src/common/util.ts +28 -28
  102. package/src/common/utils.spec.ts +52 -52
@@ -1,192 +1,192 @@
1
- "use strict";
2
- /********************************************************************************
3
- * Copyright (C) 2021 Ericsson 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 MemoryLayoutWidget_1;
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.MemoryLayoutWidget = void 0;
29
- const core_1 = require("@theia/core");
30
- const browser_1 = require("@theia/core/lib/browser");
31
- const inversify_1 = require("@theia/core/shared/inversify");
32
- const memory_diff_select_widget_1 = require("../diff-widget/memory-diff-select-widget");
33
- const memory_widget_1 = require("../memory-widget/memory-widget");
34
- const memory_widget_manager_1 = require("../utils/memory-widget-manager");
35
- const memory_dock_panel_1 = require("./memory-dock-panel");
36
- const memory_dockpanel_placeholder_widget_1 = require("./memory-dockpanel-placeholder-widget");
37
- let MemoryLayoutWidget = MemoryLayoutWidget_1 = class MemoryLayoutWidget extends browser_1.Panel {
38
- constructor() {
39
- super(...arguments);
40
- this.onDidChangeTrackableWidgetsEmitter = new core_1.Emitter();
41
- this.onDidChangeTrackableWidgets = this.onDidChangeTrackableWidgetsEmitter.event;
42
- this.toDispose = new core_1.DisposableCollection();
43
- this.hasGeneratedWidgetAutomatically = false;
44
- }
45
- init() {
46
- this.doInit();
47
- }
48
- async doInit() {
49
- this.id = MemoryLayoutWidget_1.ID;
50
- this.addClass(MemoryLayoutWidget_1.ID);
51
- this.title.label = MemoryLayoutWidget_1.LABEL;
52
- this.title.caption = MemoryLayoutWidget_1.LABEL;
53
- this.title.closable = true;
54
- this.title.iconClass = 'memory-view-icon';
55
- this.dockPanel = await this.widgetManager.getOrCreateWidget(memory_dock_panel_1.MemoryDockPanel.ID);
56
- this.addWidget(this.dockPanel);
57
- this.addWidget(this.diffSelectWidget);
58
- this.addWidget(this.placeholderWidget);
59
- this.toDispose.push(this.memoryWidgetManager.onDidCreateNewWidget(widget => {
60
- this.dockPanel.addWidget(widget);
61
- this.dockPanel.activateWidget(widget);
62
- this.onDidChangeTrackableWidgetsEmitter.fire([widget]);
63
- }));
64
- this.toDispose.push(this.memoryWidgetManager.onChanged(() => {
65
- if (!this.memoryWidgetManager.canCompare) {
66
- this.diffSelectWidget.hide();
67
- }
68
- }));
69
- this.dockPanel.widgetRemoved.connect(this.handleWidgetRemoved.bind(this), this);
70
- this.dockPanel.widgetAdded.connect(this.handleWidgetsChanged.bind(this), this);
71
- this.toDispose.push(this.onDidChangeTrackableWidgetsEmitter);
72
- this.diffSelectWidget.hide();
73
- this.update();
74
- }
75
- toggleComparisonVisibility() {
76
- if (this.diffSelectWidget.isHidden) {
77
- this.diffSelectWidget.show();
78
- }
79
- else {
80
- this.diffSelectWidget.hide();
81
- }
82
- this.update();
83
- }
84
- dispose() {
85
- this.toDispose.dispose();
86
- super.dispose();
87
- }
88
- dockPanelHoldsWidgets() {
89
- const iter = this.dockPanel.tabBars();
90
- let tabBar = iter.next();
91
- while (tabBar) {
92
- if (tabBar.titles.length) {
93
- return true;
94
- }
95
- tabBar = iter.next();
96
- }
97
- return false;
98
- }
99
- handleWidgetsChanged() {
100
- if (this.dockPanelHoldsWidgets()) {
101
- this.placeholderWidget.hide();
102
- }
103
- else {
104
- this.placeholderWidget.show();
105
- }
106
- }
107
- handleWidgetRemoved(_sender, widgetRemoved) {
108
- if (widgetRemoved instanceof memory_widget_1.MemoryWidget) { // Sometimes it's the tabbar.
109
- this.handleWidgetsChanged();
110
- this.shell.activateWidget(this.id);
111
- }
112
- }
113
- async createAndFocusWidget() {
114
- const widget = await this.memoryWidgetManager.createNewMemoryWidget();
115
- widget.activate();
116
- }
117
- async onAfterShow(msg) {
118
- if (!this.hasGeneratedWidgetAutomatically && !this.dockPanelHoldsWidgets()) {
119
- await this.createAndFocusWidget();
120
- this.hasGeneratedWidgetAutomatically = true;
121
- }
122
- super.onAfterShow(msg);
123
- }
124
- getTrackableWidgets() {
125
- const children = [];
126
- const childIterator = this.dockPanel.children();
127
- let currentChild = childIterator.next();
128
- while (currentChild) {
129
- children.push(currentChild);
130
- currentChild = childIterator.next();
131
- }
132
- return children;
133
- }
134
- activateWidget(id) {
135
- const widget = this.getTrackableWidgets().find(candidateWidget => candidateWidget.id === id);
136
- if (widget) {
137
- this.dockPanel.activateWidget(widget);
138
- }
139
- return widget;
140
- }
141
- onActivateRequest(msg) {
142
- var _a, _b;
143
- const displayedWidget = (_b = (_a = this.dockPanel.currentTabBar) === null || _a === void 0 ? void 0 : _a.currentTitle) === null || _b === void 0 ? void 0 : _b.owner;
144
- if (displayedWidget) {
145
- displayedWidget.activate();
146
- }
147
- else {
148
- // Only happens if you remove all widgets, then close the view.
149
- this.node.tabIndex = -1;
150
- this.node.focus();
151
- }
152
- super.onActivateRequest(msg);
153
- }
154
- };
155
- MemoryLayoutWidget.ID = 'memory-layout-widget';
156
- MemoryLayoutWidget.LABEL = core_1.nls.localize('theia/memory-inspector/memoryInspector', 'Memory Inspector');
157
- // Necessary to inherit theia's tabbar styling
158
- MemoryLayoutWidget.DOCK_PANEL_ID = 'theia-main-content-panel';
159
- MemoryLayoutWidget.THEIA_TABBAR_CLASSES = ['theia-app-centers', 'theia-app-main'];
160
- MemoryLayoutWidget.MEMORY_INSPECTOR_TABBAR_CLASS = 'memory-dock-tabbar';
161
- MemoryLayoutWidget.DOCK_PANEL_CLASS = 'memory-dock-panel';
162
- __decorate([
163
- (0, inversify_1.inject)(browser_1.WidgetManager),
164
- __metadata("design:type", browser_1.WidgetManager)
165
- ], MemoryLayoutWidget.prototype, "widgetManager", void 0);
166
- __decorate([
167
- (0, inversify_1.inject)(memory_widget_manager_1.MemoryWidgetManager),
168
- __metadata("design:type", memory_widget_manager_1.MemoryWidgetManager)
169
- ], MemoryLayoutWidget.prototype, "memoryWidgetManager", void 0);
170
- __decorate([
171
- (0, inversify_1.inject)(memory_diff_select_widget_1.MemoryDiffSelectWidget),
172
- __metadata("design:type", memory_diff_select_widget_1.MemoryDiffSelectWidget)
173
- ], MemoryLayoutWidget.prototype, "diffSelectWidget", void 0);
174
- __decorate([
175
- (0, inversify_1.inject)(memory_dockpanel_placeholder_widget_1.MemoryDockpanelPlaceholder),
176
- __metadata("design:type", memory_dockpanel_placeholder_widget_1.MemoryDockpanelPlaceholder)
177
- ], MemoryLayoutWidget.prototype, "placeholderWidget", void 0);
178
- __decorate([
179
- (0, inversify_1.inject)(browser_1.ApplicationShell),
180
- __metadata("design:type", browser_1.ApplicationShell)
181
- ], MemoryLayoutWidget.prototype, "shell", void 0);
182
- __decorate([
183
- (0, inversify_1.postConstruct)(),
184
- __metadata("design:type", Function),
185
- __metadata("design:paramtypes", []),
186
- __metadata("design:returntype", void 0)
187
- ], MemoryLayoutWidget.prototype, "init", null);
188
- MemoryLayoutWidget = MemoryLayoutWidget_1 = __decorate([
189
- (0, inversify_1.injectable)()
190
- ], MemoryLayoutWidget);
191
- exports.MemoryLayoutWidget = MemoryLayoutWidget;
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (C) 2021 Ericsson 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 MemoryLayoutWidget_1;
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.MemoryLayoutWidget = void 0;
29
+ const core_1 = require("@theia/core");
30
+ const browser_1 = require("@theia/core/lib/browser");
31
+ const inversify_1 = require("@theia/core/shared/inversify");
32
+ const memory_diff_select_widget_1 = require("../diff-widget/memory-diff-select-widget");
33
+ const memory_widget_1 = require("../memory-widget/memory-widget");
34
+ const memory_widget_manager_1 = require("../utils/memory-widget-manager");
35
+ const memory_dock_panel_1 = require("./memory-dock-panel");
36
+ const memory_dockpanel_placeholder_widget_1 = require("./memory-dockpanel-placeholder-widget");
37
+ let MemoryLayoutWidget = MemoryLayoutWidget_1 = class MemoryLayoutWidget extends browser_1.Panel {
38
+ constructor() {
39
+ super(...arguments);
40
+ this.onDidChangeTrackableWidgetsEmitter = new core_1.Emitter();
41
+ this.onDidChangeTrackableWidgets = this.onDidChangeTrackableWidgetsEmitter.event;
42
+ this.toDispose = new core_1.DisposableCollection();
43
+ this.hasGeneratedWidgetAutomatically = false;
44
+ }
45
+ init() {
46
+ this.doInit();
47
+ }
48
+ async doInit() {
49
+ this.id = MemoryLayoutWidget_1.ID;
50
+ this.addClass(MemoryLayoutWidget_1.ID);
51
+ this.title.label = MemoryLayoutWidget_1.LABEL;
52
+ this.title.caption = MemoryLayoutWidget_1.LABEL;
53
+ this.title.closable = true;
54
+ this.title.iconClass = 'memory-view-icon';
55
+ this.dockPanel = await this.widgetManager.getOrCreateWidget(memory_dock_panel_1.MemoryDockPanel.ID);
56
+ this.addWidget(this.dockPanel);
57
+ this.addWidget(this.diffSelectWidget);
58
+ this.addWidget(this.placeholderWidget);
59
+ this.toDispose.push(this.memoryWidgetManager.onDidCreateNewWidget(widget => {
60
+ this.dockPanel.addWidget(widget);
61
+ this.dockPanel.activateWidget(widget);
62
+ this.onDidChangeTrackableWidgetsEmitter.fire([widget]);
63
+ }));
64
+ this.toDispose.push(this.memoryWidgetManager.onChanged(() => {
65
+ if (!this.memoryWidgetManager.canCompare) {
66
+ this.diffSelectWidget.hide();
67
+ }
68
+ }));
69
+ this.dockPanel.widgetRemoved.connect(this.handleWidgetRemoved.bind(this), this);
70
+ this.dockPanel.widgetAdded.connect(this.handleWidgetsChanged.bind(this), this);
71
+ this.toDispose.push(this.onDidChangeTrackableWidgetsEmitter);
72
+ this.diffSelectWidget.hide();
73
+ this.update();
74
+ }
75
+ toggleComparisonVisibility() {
76
+ if (this.diffSelectWidget.isHidden) {
77
+ this.diffSelectWidget.show();
78
+ }
79
+ else {
80
+ this.diffSelectWidget.hide();
81
+ }
82
+ this.update();
83
+ }
84
+ dispose() {
85
+ this.toDispose.dispose();
86
+ super.dispose();
87
+ }
88
+ dockPanelHoldsWidgets() {
89
+ const iter = this.dockPanel.tabBars();
90
+ let tabBar = iter.next();
91
+ while (tabBar) {
92
+ if (tabBar.titles.length) {
93
+ return true;
94
+ }
95
+ tabBar = iter.next();
96
+ }
97
+ return false;
98
+ }
99
+ handleWidgetsChanged() {
100
+ if (this.dockPanelHoldsWidgets()) {
101
+ this.placeholderWidget.hide();
102
+ }
103
+ else {
104
+ this.placeholderWidget.show();
105
+ }
106
+ }
107
+ handleWidgetRemoved(_sender, widgetRemoved) {
108
+ if (widgetRemoved instanceof memory_widget_1.MemoryWidget) { // Sometimes it's the tabbar.
109
+ this.handleWidgetsChanged();
110
+ this.shell.activateWidget(this.id);
111
+ }
112
+ }
113
+ async createAndFocusWidget() {
114
+ const widget = await this.memoryWidgetManager.createNewMemoryWidget();
115
+ widget.activate();
116
+ }
117
+ async onAfterShow(msg) {
118
+ if (!this.hasGeneratedWidgetAutomatically && !this.dockPanelHoldsWidgets()) {
119
+ await this.createAndFocusWidget();
120
+ this.hasGeneratedWidgetAutomatically = true;
121
+ }
122
+ super.onAfterShow(msg);
123
+ }
124
+ getTrackableWidgets() {
125
+ const children = [];
126
+ const childIterator = this.dockPanel.children();
127
+ let currentChild = childIterator.next();
128
+ while (currentChild) {
129
+ children.push(currentChild);
130
+ currentChild = childIterator.next();
131
+ }
132
+ return children;
133
+ }
134
+ activateWidget(id) {
135
+ const widget = this.getTrackableWidgets().find(candidateWidget => candidateWidget.id === id);
136
+ if (widget) {
137
+ this.dockPanel.activateWidget(widget);
138
+ }
139
+ return widget;
140
+ }
141
+ onActivateRequest(msg) {
142
+ var _a, _b;
143
+ const displayedWidget = (_b = (_a = this.dockPanel.currentTabBar) === null || _a === void 0 ? void 0 : _a.currentTitle) === null || _b === void 0 ? void 0 : _b.owner;
144
+ if (displayedWidget) {
145
+ displayedWidget.activate();
146
+ }
147
+ else {
148
+ // Only happens if you remove all widgets, then close the view.
149
+ this.node.tabIndex = -1;
150
+ this.node.focus();
151
+ }
152
+ super.onActivateRequest(msg);
153
+ }
154
+ };
155
+ MemoryLayoutWidget.ID = 'memory-layout-widget';
156
+ MemoryLayoutWidget.LABEL = core_1.nls.localize('theia/memory-inspector/memoryInspector', 'Memory Inspector');
157
+ // Necessary to inherit theia's tabbar styling
158
+ MemoryLayoutWidget.DOCK_PANEL_ID = 'theia-main-content-panel';
159
+ MemoryLayoutWidget.THEIA_TABBAR_CLASSES = ['theia-app-centers', 'theia-app-main'];
160
+ MemoryLayoutWidget.MEMORY_INSPECTOR_TABBAR_CLASS = 'memory-dock-tabbar';
161
+ MemoryLayoutWidget.DOCK_PANEL_CLASS = 'memory-dock-panel';
162
+ __decorate([
163
+ (0, inversify_1.inject)(browser_1.WidgetManager),
164
+ __metadata("design:type", browser_1.WidgetManager)
165
+ ], MemoryLayoutWidget.prototype, "widgetManager", void 0);
166
+ __decorate([
167
+ (0, inversify_1.inject)(memory_widget_manager_1.MemoryWidgetManager),
168
+ __metadata("design:type", memory_widget_manager_1.MemoryWidgetManager)
169
+ ], MemoryLayoutWidget.prototype, "memoryWidgetManager", void 0);
170
+ __decorate([
171
+ (0, inversify_1.inject)(memory_diff_select_widget_1.MemoryDiffSelectWidget),
172
+ __metadata("design:type", memory_diff_select_widget_1.MemoryDiffSelectWidget)
173
+ ], MemoryLayoutWidget.prototype, "diffSelectWidget", void 0);
174
+ __decorate([
175
+ (0, inversify_1.inject)(memory_dockpanel_placeholder_widget_1.MemoryDockpanelPlaceholder),
176
+ __metadata("design:type", memory_dockpanel_placeholder_widget_1.MemoryDockpanelPlaceholder)
177
+ ], MemoryLayoutWidget.prototype, "placeholderWidget", void 0);
178
+ __decorate([
179
+ (0, inversify_1.inject)(browser_1.ApplicationShell),
180
+ __metadata("design:type", browser_1.ApplicationShell)
181
+ ], MemoryLayoutWidget.prototype, "shell", void 0);
182
+ __decorate([
183
+ (0, inversify_1.postConstruct)(),
184
+ __metadata("design:type", Function),
185
+ __metadata("design:paramtypes", []),
186
+ __metadata("design:returntype", void 0)
187
+ ], MemoryLayoutWidget.prototype, "init", null);
188
+ MemoryLayoutWidget = MemoryLayoutWidget_1 = __decorate([
189
+ (0, inversify_1.injectable)()
190
+ ], MemoryLayoutWidget);
191
+ exports.MemoryLayoutWidget = MemoryLayoutWidget;
192
192
  //# sourceMappingURL=memory-layout-widget.js.map
@@ -1,22 +1,22 @@
1
- /********************************************************************************
2
- * Copyright (C) 2019 Ericsson and others.
3
- *
4
- * This program and the accompanying materials are made available under the
5
- * terms of the Eclipse Public License v. 2.0 which is available at
6
- * http://www.eclipse.org/legal/epl-2.0.
7
- *
8
- * This Source Code may also be made available under the following Secondary
9
- * Licenses when the conditions for such availability set forth in the Eclipse
10
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- * with the GNU Classpath Exception which is available at
12
- * https://www.gnu.org/software/classpath/license.html.
13
- *
14
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- ********************************************************************************/
16
- import * as Long from 'long';
17
- /**
18
- * Parse `hexStr` as an hexadecimal string (with or without the leading 0x)
19
- * and return the value as a Long.
20
- */
21
- export declare function hexStrToUnsignedLong(hexStr: string): Long;
1
+ /********************************************************************************
2
+ * Copyright (C) 2019 Ericsson and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ import * as Long from 'long';
17
+ /**
18
+ * Parse `hexStr` as an hexadecimal string (with or without the leading 0x)
19
+ * and return the value as a Long.
20
+ */
21
+ export declare function hexStrToUnsignedLong(hexStr: string): Long;
22
22
  //# sourceMappingURL=util.d.ts.map
@@ -1,31 +1,31 @@
1
- "use strict";
2
- /********************************************************************************
3
- * Copyright (C) 2019 Ericsson 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.hexStrToUnsignedLong = void 0;
19
- const Long = require("long");
20
- /**
21
- * Parse `hexStr` as an hexadecimal string (with or without the leading 0x)
22
- * and return the value as a Long.
23
- */
24
- function hexStrToUnsignedLong(hexStr) {
25
- if (hexStr.trim().length === 0) {
26
- return new Long(0, 0, true);
27
- }
28
- return Long.fromString(hexStr, true, 16);
29
- }
30
- exports.hexStrToUnsignedLong = hexStrToUnsignedLong;
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (C) 2019 Ericsson 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
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.hexStrToUnsignedLong = void 0;
19
+ const Long = require("long");
20
+ /**
21
+ * Parse `hexStr` as an hexadecimal string (with or without the leading 0x)
22
+ * and return the value as a Long.
23
+ */
24
+ function hexStrToUnsignedLong(hexStr) {
25
+ if (hexStr.trim().length === 0) {
26
+ return new Long(0, 0, true);
27
+ }
28
+ return Long.fromString(hexStr, true, 16);
29
+ }
30
+ exports.hexStrToUnsignedLong = hexStrToUnsignedLong;
31
31
  //# sourceMappingURL=util.js.map
@@ -1,17 +1,17 @@
1
- /********************************************************************************
2
- * Copyright (C) 2019 Ericsson and others.
3
- *
4
- * This program and the accompanying materials are made available under the
5
- * terms of the Eclipse Public License v. 2.0 which is available at
6
- * http://www.eclipse.org/legal/epl-2.0.
7
- *
8
- * This Source Code may also be made available under the following Secondary
9
- * Licenses when the conditions for such availability set forth in the Eclipse
10
- * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
- * with the GNU Classpath Exception which is available at
12
- * https://www.gnu.org/software/classpath/license.html.
13
- *
14
- * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
- ********************************************************************************/
16
- export {};
1
+ /********************************************************************************
2
+ * Copyright (C) 2019 Ericsson and others.
3
+ *
4
+ * This program and the accompanying materials are made available under the
5
+ * terms of the Eclipse Public License v. 2.0 which is available at
6
+ * http://www.eclipse.org/legal/epl-2.0.
7
+ *
8
+ * This Source Code may also be made available under the following Secondary
9
+ * Licenses when the conditions for such availability set forth in the Eclipse
10
+ * Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ * with the GNU Classpath Exception which is available at
12
+ * https://www.gnu.org/software/classpath/license.html.
13
+ *
14
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ ********************************************************************************/
16
+ export {};
17
17
  //# sourceMappingURL=utils.spec.d.ts.map
@@ -1,46 +1,46 @@
1
- "use strict";
2
- /********************************************************************************
3
- * Copyright (C) 2019 Ericsson 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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const util_1 = require("./util");
19
- const chai_1 = require("chai");
20
- const Long = require("long");
21
- describe('utils', function () {
22
- it('#hexStrToUnsignedLong', function () {
23
- let val = (0, util_1.hexStrToUnsignedLong)('');
24
- (0, chai_1.expect)(val).eql(new Long(0, 0, true));
25
- val = (0, util_1.hexStrToUnsignedLong)('0x');
26
- (0, chai_1.expect)(val).eql(new Long(0, 0, true));
27
- val = (0, util_1.hexStrToUnsignedLong)('0x0');
28
- (0, chai_1.expect)(val).eql(new Long(0, 0, true));
29
- val = (0, util_1.hexStrToUnsignedLong)('0x1');
30
- (0, chai_1.expect)(val).eql(new Long(0x1, 0, true));
31
- val = (0, util_1.hexStrToUnsignedLong)('0x12345678abcd');
32
- (0, chai_1.expect)(val).eql(new Long(0x5678abcd, 0x1234, true));
33
- val = (0, util_1.hexStrToUnsignedLong)('0x12345678abcd1234');
34
- (0, chai_1.expect)(val).eql(new Long(0xabcd1234, 0x12345678, true));
35
- });
36
- it('should handle -1 correctly', () => {
37
- const val = (0, util_1.hexStrToUnsignedLong)('-0x1');
38
- (0, chai_1.expect)(val).eql(Long.fromInt(-1, true));
39
- });
40
- it('should handle long decimal numbers (up to 2^64-1)', () => {
41
- const input = '18446744073709551615';
42
- const val = Long.fromString(input, true, 10);
43
- (0, chai_1.expect)(val.toString(10)).eql(input);
44
- });
45
- });
1
+ "use strict";
2
+ /********************************************************************************
3
+ * Copyright (C) 2019 Ericsson 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
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ const util_1 = require("./util");
19
+ const chai_1 = require("chai");
20
+ const Long = require("long");
21
+ describe('utils', function () {
22
+ it('#hexStrToUnsignedLong', function () {
23
+ let val = (0, util_1.hexStrToUnsignedLong)('');
24
+ (0, chai_1.expect)(val).eql(new Long(0, 0, true));
25
+ val = (0, util_1.hexStrToUnsignedLong)('0x');
26
+ (0, chai_1.expect)(val).eql(new Long(0, 0, true));
27
+ val = (0, util_1.hexStrToUnsignedLong)('0x0');
28
+ (0, chai_1.expect)(val).eql(new Long(0, 0, true));
29
+ val = (0, util_1.hexStrToUnsignedLong)('0x1');
30
+ (0, chai_1.expect)(val).eql(new Long(0x1, 0, true));
31
+ val = (0, util_1.hexStrToUnsignedLong)('0x12345678abcd');
32
+ (0, chai_1.expect)(val).eql(new Long(0x5678abcd, 0x1234, true));
33
+ val = (0, util_1.hexStrToUnsignedLong)('0x12345678abcd1234');
34
+ (0, chai_1.expect)(val).eql(new Long(0xabcd1234, 0x12345678, true));
35
+ });
36
+ it('should handle -1 correctly', () => {
37
+ const val = (0, util_1.hexStrToUnsignedLong)('-0x1');
38
+ (0, chai_1.expect)(val).eql(Long.fromInt(-1, true));
39
+ });
40
+ it('should handle long decimal numbers (up to 2^64-1)', () => {
41
+ const input = '18446744073709551615';
42
+ const val = Long.fromString(input, true, 10);
43
+ (0, chai_1.expect)(val.toString(10)).eql(input);
44
+ });
45
+ });
46
46
  //# sourceMappingURL=utils.spec.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theia/memory-inspector",
3
- "version": "1.45.0",
3
+ "version": "1.46.0-next.72+4a275b29d",
4
4
  "description": "Theia - Memory Inspector",
5
5
  "keywords": [
6
6
  "theia-extension"
@@ -27,8 +27,8 @@
27
27
  "watch": "theiaext watch"
28
28
  },
29
29
  "dependencies": {
30
- "@theia/core": "1.45.0",
31
- "@theia/debug": "1.45.0",
30
+ "@theia/core": "1.46.0-next.72+4a275b29d",
31
+ "@theia/debug": "1.46.0-next.72+4a275b29d",
32
32
  "@vscode/debugprotocol": "^1.51.0",
33
33
  "long": "^4.0.0"
34
34
  },
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "2b20a60a0f9b54b19838a0f71760989a19622495"
46
+ "gitHead": "4a275b29d0db6c81190488c7f76cb667da05ef19"
47
47
  }