@theia/memory-inspector 1.34.1 → 1.34.3

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 (103) hide show
  1. package/LICENSE +641 -641
  2. package/README.md +71 -71
  3. package/lib/browser/diff-widget/memory-diff-options-widget.d.ts +36 -36
  4. package/lib/browser/diff-widget/memory-diff-options-widget.js +129 -129
  5. package/lib/browser/diff-widget/memory-diff-select-widget.d.ts +50 -50
  6. package/lib/browser/diff-widget/memory-diff-select-widget.js +137 -137
  7. package/lib/browser/diff-widget/memory-diff-table-widget.d.ts +77 -77
  8. package/lib/browser/diff-widget/memory-diff-table-widget.js +314 -314
  9. package/lib/browser/diff-widget/memory-diff-widget-types.d.ts +41 -41
  10. package/lib/browser/diff-widget/memory-diff-widget-types.js +23 -23
  11. package/lib/browser/editable-widget/memory-editable-table-widget.d.ts +64 -64
  12. package/lib/browser/editable-widget/memory-editable-table-widget.js +329 -329
  13. package/lib/browser/memory-inspector-frontend-contribution.d.ts +46 -46
  14. package/lib/browser/memory-inspector-frontend-contribution.js +291 -291
  15. package/lib/browser/memory-inspector-frontend-module.d.ts +21 -21
  16. package/lib/browser/memory-inspector-frontend-module.js +87 -87
  17. package/lib/browser/memory-provider/cdt-gdb-memory-provider.d.ts +35 -35
  18. package/lib/browser/memory-provider/cdt-gdb-memory-provider.js +136 -136
  19. package/lib/browser/memory-provider/memory-provider-service.d.ts +36 -36
  20. package/lib/browser/memory-provider/memory-provider-service.js +101 -101
  21. package/lib/browser/memory-provider/memory-provider.d.ts +65 -65
  22. package/lib/browser/memory-provider/memory-provider.js +96 -96
  23. package/lib/browser/memory-provider/memory-provider.spec.d.ts +16 -16
  24. package/lib/browser/memory-provider/memory-provider.spec.js +23 -23
  25. package/lib/browser/memory-widget/memory-options-widget.d.ts +136 -136
  26. package/lib/browser/memory-widget/memory-options-widget.js +561 -561
  27. package/lib/browser/memory-widget/memory-table-widget.d.ts +145 -145
  28. package/lib/browser/memory-widget/memory-table-widget.js +484 -484
  29. package/lib/browser/memory-widget/memory-widget.d.ts +32 -32
  30. package/lib/browser/memory-widget/memory-widget.js +109 -109
  31. package/lib/browser/register-widget/register-filter-service.d.ts +42 -42
  32. package/lib/browser/register-widget/register-filter-service.js +82 -82
  33. package/lib/browser/register-widget/register-options-widget.d.ts +81 -81
  34. package/lib/browser/register-widget/register-options-widget.js +343 -343
  35. package/lib/browser/register-widget/register-table-widget.d.ts +77 -77
  36. package/lib/browser/register-widget/register-table-widget.js +236 -236
  37. package/lib/browser/register-widget/register-widget-types.d.ts +29 -29
  38. package/lib/browser/register-widget/register-widget-types.js +35 -35
  39. package/lib/browser/utils/memory-commands.d.ts +27 -27
  40. package/lib/browser/utils/memory-commands.js +67 -67
  41. package/lib/browser/utils/memory-hover-renderer.d.ts +33 -33
  42. package/lib/browser/utils/memory-hover-renderer.js +111 -111
  43. package/lib/browser/utils/memory-recents.d.ts +27 -27
  44. package/lib/browser/utils/memory-recents.js +52 -52
  45. package/lib/browser/utils/memory-widget-components.d.ts +58 -58
  46. package/lib/browser/utils/memory-widget-components.js +69 -69
  47. package/lib/browser/utils/memory-widget-manager.d.ts +50 -50
  48. package/lib/browser/utils/memory-widget-manager.js +182 -182
  49. package/lib/browser/utils/memory-widget-utils.d.ts +113 -113
  50. package/lib/browser/utils/memory-widget-utils.js +42 -42
  51. package/lib/browser/utils/memory-widget-variable-utils.d.ts +57 -57
  52. package/lib/browser/utils/memory-widget-variable-utils.js +143 -143
  53. package/lib/browser/utils/multi-select-bar.d.ts +31 -31
  54. package/lib/browser/utils/multi-select-bar.js +34 -34
  55. package/lib/browser/wrapper-widgets/memory-dock-panel.d.ts +24 -24
  56. package/lib/browser/wrapper-widgets/memory-dock-panel.js +48 -48
  57. package/lib/browser/wrapper-widgets/memory-dockpanel-placeholder-widget.d.ts +23 -23
  58. package/lib/browser/wrapper-widgets/memory-dockpanel-placeholder-widget.js +57 -57
  59. package/lib/browser/wrapper-widgets/memory-layout-widget.d.ts +50 -50
  60. package/lib/browser/wrapper-widgets/memory-layout-widget.js +188 -188
  61. package/lib/common/util.d.ts +21 -21
  62. package/lib/common/util.js +30 -30
  63. package/lib/common/utils.spec.d.ts +16 -16
  64. package/lib/common/utils.spec.js +45 -45
  65. package/package.json +4 -4
  66. package/src/browser/diff-widget/memory-diff-options-widget.tsx +152 -152
  67. package/src/browser/diff-widget/memory-diff-select-widget.tsx +163 -163
  68. package/src/browser/diff-widget/memory-diff-table-widget.tsx +366 -366
  69. package/src/browser/diff-widget/memory-diff-widget-types.ts +45 -45
  70. package/src/browser/editable-widget/memory-editable-table-widget.tsx +360 -360
  71. package/src/browser/memory-inspector-frontend-contribution.ts +301 -301
  72. package/src/browser/memory-inspector-frontend-module.ts +118 -118
  73. package/src/browser/memory-provider/cdt-gdb-memory-provider.ts +132 -132
  74. package/src/browser/memory-provider/memory-provider-service.ts +86 -86
  75. package/src/browser/memory-provider/memory-provider.spec.ts +23 -23
  76. package/src/browser/memory-provider/memory-provider.ts +119 -119
  77. package/src/browser/memory-widget/memory-options-widget.tsx +738 -738
  78. package/src/browser/memory-widget/memory-table-widget.tsx +621 -621
  79. package/src/browser/memory-widget/memory-widget.ts +110 -110
  80. package/src/browser/register-widget/register-filter-service.ts +77 -77
  81. package/src/browser/register-widget/register-options-widget.tsx +393 -393
  82. package/src/browser/register-widget/register-table-widget.tsx +277 -277
  83. package/src/browser/register-widget/register-widget-types.ts +45 -45
  84. package/src/browser/register-widget/register-widget.css +34 -34
  85. package/src/browser/style/index.css +750 -750
  86. package/src/browser/style/memory-lock.svg +21 -21
  87. package/src/browser/style/memory-view.svg +20 -20
  88. package/src/browser/style/register-lock.svg +29 -29
  89. package/src/browser/style/register-view.svg +28 -28
  90. package/src/browser/utils/memory-commands.ts +76 -76
  91. package/src/browser/utils/memory-hover-renderer.ts +113 -113
  92. package/src/browser/utils/memory-recents.ts +58 -58
  93. package/src/browser/utils/memory-widget-components.tsx +193 -193
  94. package/src/browser/utils/memory-widget-manager.ts +179 -179
  95. package/src/browser/utils/memory-widget-utils.tsx +132 -132
  96. package/src/browser/utils/memory-widget-variable-utils.ts +170 -170
  97. package/src/browser/utils/multi-select-bar.css +62 -62
  98. package/src/browser/utils/multi-select-bar.tsx +75 -75
  99. package/src/browser/wrapper-widgets/memory-dock-panel.ts +51 -51
  100. package/src/browser/wrapper-widgets/memory-dockpanel-placeholder-widget.tsx +38 -38
  101. package/src/browser/wrapper-widgets/memory-layout-widget.tsx +163 -163
  102. package/src/common/util.ts +28 -28
  103. package/src/common/utils.spec.ts +52 -52
@@ -1,189 +1,189 @@
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 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
- async init() {
46
- this.id = MemoryLayoutWidget_1.ID;
47
- this.addClass(MemoryLayoutWidget_1.ID);
48
- this.title.label = MemoryLayoutWidget_1.LABEL;
49
- this.title.caption = MemoryLayoutWidget_1.LABEL;
50
- this.title.closable = true;
51
- this.title.iconClass = 'memory-view-icon';
52
- this.dockPanel = await this.widgetManager.getOrCreateWidget(memory_dock_panel_1.MemoryDockPanel.ID);
53
- this.addWidget(this.dockPanel);
54
- this.addWidget(this.diffSelectWidget);
55
- this.addWidget(this.placeholderWidget);
56
- this.toDispose.push(this.memoryWidgetManager.onDidCreateNewWidget(widget => {
57
- this.dockPanel.addWidget(widget);
58
- this.dockPanel.activateWidget(widget);
59
- this.onDidChangeTrackableWidgetsEmitter.fire([widget]);
60
- }));
61
- this.toDispose.push(this.memoryWidgetManager.onChanged(() => {
62
- if (!this.memoryWidgetManager.canCompare) {
63
- this.diffSelectWidget.hide();
64
- }
65
- }));
66
- this.dockPanel.widgetRemoved.connect(this.handleWidgetRemoved.bind(this), this);
67
- this.dockPanel.widgetAdded.connect(this.handleWidgetsChanged.bind(this), this);
68
- this.toDispose.push(this.onDidChangeTrackableWidgetsEmitter);
69
- this.diffSelectWidget.hide();
70
- this.update();
71
- }
72
- toggleComparisonVisibility() {
73
- if (this.diffSelectWidget.isHidden) {
74
- this.diffSelectWidget.show();
75
- }
76
- else {
77
- this.diffSelectWidget.hide();
78
- }
79
- this.update();
80
- }
81
- dispose() {
82
- this.toDispose.dispose();
83
- super.dispose();
84
- }
85
- dockPanelHoldsWidgets() {
86
- const iter = this.dockPanel.tabBars();
87
- let tabBar = iter.next();
88
- while (tabBar) {
89
- if (tabBar.titles.length) {
90
- return true;
91
- }
92
- tabBar = iter.next();
93
- }
94
- return false;
95
- }
96
- handleWidgetsChanged() {
97
- if (this.dockPanelHoldsWidgets()) {
98
- this.placeholderWidget.hide();
99
- }
100
- else {
101
- this.placeholderWidget.show();
102
- }
103
- }
104
- handleWidgetRemoved(_sender, widgetRemoved) {
105
- if (widgetRemoved instanceof memory_widget_1.MemoryWidget) { // Sometimes it's the tabbar.
106
- this.handleWidgetsChanged();
107
- this.shell.activateWidget(this.id);
108
- }
109
- }
110
- async createAndFocusWidget() {
111
- const widget = await this.memoryWidgetManager.createNewMemoryWidget();
112
- widget.activate();
113
- }
114
- async onAfterShow(msg) {
115
- if (!this.hasGeneratedWidgetAutomatically && !this.dockPanelHoldsWidgets()) {
116
- await this.createAndFocusWidget();
117
- this.hasGeneratedWidgetAutomatically = true;
118
- }
119
- super.onAfterShow(msg);
120
- }
121
- getTrackableWidgets() {
122
- const children = [];
123
- const childIterator = this.dockPanel.children();
124
- let currentChild = childIterator.next();
125
- while (currentChild) {
126
- children.push(currentChild);
127
- currentChild = childIterator.next();
128
- }
129
- return children;
130
- }
131
- activateWidget(id) {
132
- const widget = this.getTrackableWidgets().find(candidateWidget => candidateWidget.id === id);
133
- if (widget) {
134
- this.dockPanel.activateWidget(widget);
135
- }
136
- return widget;
137
- }
138
- onActivateRequest(msg) {
139
- var _a, _b;
140
- const displayedWidget = (_b = (_a = this.dockPanel.currentTabBar) === null || _a === void 0 ? void 0 : _a.currentTitle) === null || _b === void 0 ? void 0 : _b.owner;
141
- if (displayedWidget) {
142
- displayedWidget.activate();
143
- }
144
- else {
145
- // Only happens if you remove all widgets, then close the view.
146
- this.node.tabIndex = -1;
147
- this.node.focus();
148
- }
149
- super.onActivateRequest(msg);
150
- }
151
- };
152
- MemoryLayoutWidget.ID = 'memory-layout-widget';
153
- MemoryLayoutWidget.LABEL = core_1.nls.localize('theia/memory-inspector/memoryInspector', 'Memory Inspector');
154
- // Necessary to inherit theia's tabbar styling
155
- MemoryLayoutWidget.DOCK_PANEL_ID = 'theia-main-content-panel';
156
- MemoryLayoutWidget.THEIA_TABBAR_CLASSES = ['theia-app-centers', 'theia-app-main'];
157
- MemoryLayoutWidget.MEMORY_INSPECTOR_TABBAR_CLASS = 'memory-dock-tabbar';
158
- MemoryLayoutWidget.DOCK_PANEL_CLASS = 'memory-dock-panel';
159
- __decorate([
160
- (0, inversify_1.inject)(browser_1.WidgetManager),
161
- __metadata("design:type", browser_1.WidgetManager)
162
- ], MemoryLayoutWidget.prototype, "widgetManager", void 0);
163
- __decorate([
164
- (0, inversify_1.inject)(memory_widget_manager_1.MemoryWidgetManager),
165
- __metadata("design:type", memory_widget_manager_1.MemoryWidgetManager)
166
- ], MemoryLayoutWidget.prototype, "memoryWidgetManager", void 0);
167
- __decorate([
168
- (0, inversify_1.inject)(memory_diff_select_widget_1.MemoryDiffSelectWidget),
169
- __metadata("design:type", memory_diff_select_widget_1.MemoryDiffSelectWidget)
170
- ], MemoryLayoutWidget.prototype, "diffSelectWidget", void 0);
171
- __decorate([
172
- (0, inversify_1.inject)(memory_dockpanel_placeholder_widget_1.MemoryDockpanelPlaceholder),
173
- __metadata("design:type", memory_dockpanel_placeholder_widget_1.MemoryDockpanelPlaceholder)
174
- ], MemoryLayoutWidget.prototype, "placeholderWidget", void 0);
175
- __decorate([
176
- (0, inversify_1.inject)(browser_1.ApplicationShell),
177
- __metadata("design:type", browser_1.ApplicationShell)
178
- ], MemoryLayoutWidget.prototype, "shell", void 0);
179
- __decorate([
180
- (0, inversify_1.postConstruct)(),
181
- __metadata("design:type", Function),
182
- __metadata("design:paramtypes", []),
183
- __metadata("design:returntype", Promise)
184
- ], MemoryLayoutWidget.prototype, "init", null);
185
- MemoryLayoutWidget = MemoryLayoutWidget_1 = __decorate([
186
- (0, inversify_1.injectable)()
187
- ], MemoryLayoutWidget);
188
- 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 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
+ async init() {
46
+ this.id = MemoryLayoutWidget_1.ID;
47
+ this.addClass(MemoryLayoutWidget_1.ID);
48
+ this.title.label = MemoryLayoutWidget_1.LABEL;
49
+ this.title.caption = MemoryLayoutWidget_1.LABEL;
50
+ this.title.closable = true;
51
+ this.title.iconClass = 'memory-view-icon';
52
+ this.dockPanel = await this.widgetManager.getOrCreateWidget(memory_dock_panel_1.MemoryDockPanel.ID);
53
+ this.addWidget(this.dockPanel);
54
+ this.addWidget(this.diffSelectWidget);
55
+ this.addWidget(this.placeholderWidget);
56
+ this.toDispose.push(this.memoryWidgetManager.onDidCreateNewWidget(widget => {
57
+ this.dockPanel.addWidget(widget);
58
+ this.dockPanel.activateWidget(widget);
59
+ this.onDidChangeTrackableWidgetsEmitter.fire([widget]);
60
+ }));
61
+ this.toDispose.push(this.memoryWidgetManager.onChanged(() => {
62
+ if (!this.memoryWidgetManager.canCompare) {
63
+ this.diffSelectWidget.hide();
64
+ }
65
+ }));
66
+ this.dockPanel.widgetRemoved.connect(this.handleWidgetRemoved.bind(this), this);
67
+ this.dockPanel.widgetAdded.connect(this.handleWidgetsChanged.bind(this), this);
68
+ this.toDispose.push(this.onDidChangeTrackableWidgetsEmitter);
69
+ this.diffSelectWidget.hide();
70
+ this.update();
71
+ }
72
+ toggleComparisonVisibility() {
73
+ if (this.diffSelectWidget.isHidden) {
74
+ this.diffSelectWidget.show();
75
+ }
76
+ else {
77
+ this.diffSelectWidget.hide();
78
+ }
79
+ this.update();
80
+ }
81
+ dispose() {
82
+ this.toDispose.dispose();
83
+ super.dispose();
84
+ }
85
+ dockPanelHoldsWidgets() {
86
+ const iter = this.dockPanel.tabBars();
87
+ let tabBar = iter.next();
88
+ while (tabBar) {
89
+ if (tabBar.titles.length) {
90
+ return true;
91
+ }
92
+ tabBar = iter.next();
93
+ }
94
+ return false;
95
+ }
96
+ handleWidgetsChanged() {
97
+ if (this.dockPanelHoldsWidgets()) {
98
+ this.placeholderWidget.hide();
99
+ }
100
+ else {
101
+ this.placeholderWidget.show();
102
+ }
103
+ }
104
+ handleWidgetRemoved(_sender, widgetRemoved) {
105
+ if (widgetRemoved instanceof memory_widget_1.MemoryWidget) { // Sometimes it's the tabbar.
106
+ this.handleWidgetsChanged();
107
+ this.shell.activateWidget(this.id);
108
+ }
109
+ }
110
+ async createAndFocusWidget() {
111
+ const widget = await this.memoryWidgetManager.createNewMemoryWidget();
112
+ widget.activate();
113
+ }
114
+ async onAfterShow(msg) {
115
+ if (!this.hasGeneratedWidgetAutomatically && !this.dockPanelHoldsWidgets()) {
116
+ await this.createAndFocusWidget();
117
+ this.hasGeneratedWidgetAutomatically = true;
118
+ }
119
+ super.onAfterShow(msg);
120
+ }
121
+ getTrackableWidgets() {
122
+ const children = [];
123
+ const childIterator = this.dockPanel.children();
124
+ let currentChild = childIterator.next();
125
+ while (currentChild) {
126
+ children.push(currentChild);
127
+ currentChild = childIterator.next();
128
+ }
129
+ return children;
130
+ }
131
+ activateWidget(id) {
132
+ const widget = this.getTrackableWidgets().find(candidateWidget => candidateWidget.id === id);
133
+ if (widget) {
134
+ this.dockPanel.activateWidget(widget);
135
+ }
136
+ return widget;
137
+ }
138
+ onActivateRequest(msg) {
139
+ var _a, _b;
140
+ const displayedWidget = (_b = (_a = this.dockPanel.currentTabBar) === null || _a === void 0 ? void 0 : _a.currentTitle) === null || _b === void 0 ? void 0 : _b.owner;
141
+ if (displayedWidget) {
142
+ displayedWidget.activate();
143
+ }
144
+ else {
145
+ // Only happens if you remove all widgets, then close the view.
146
+ this.node.tabIndex = -1;
147
+ this.node.focus();
148
+ }
149
+ super.onActivateRequest(msg);
150
+ }
151
+ };
152
+ MemoryLayoutWidget.ID = 'memory-layout-widget';
153
+ MemoryLayoutWidget.LABEL = core_1.nls.localize('theia/memory-inspector/memoryInspector', 'Memory Inspector');
154
+ // Necessary to inherit theia's tabbar styling
155
+ MemoryLayoutWidget.DOCK_PANEL_ID = 'theia-main-content-panel';
156
+ MemoryLayoutWidget.THEIA_TABBAR_CLASSES = ['theia-app-centers', 'theia-app-main'];
157
+ MemoryLayoutWidget.MEMORY_INSPECTOR_TABBAR_CLASS = 'memory-dock-tabbar';
158
+ MemoryLayoutWidget.DOCK_PANEL_CLASS = 'memory-dock-panel';
159
+ __decorate([
160
+ (0, inversify_1.inject)(browser_1.WidgetManager),
161
+ __metadata("design:type", browser_1.WidgetManager)
162
+ ], MemoryLayoutWidget.prototype, "widgetManager", void 0);
163
+ __decorate([
164
+ (0, inversify_1.inject)(memory_widget_manager_1.MemoryWidgetManager),
165
+ __metadata("design:type", memory_widget_manager_1.MemoryWidgetManager)
166
+ ], MemoryLayoutWidget.prototype, "memoryWidgetManager", void 0);
167
+ __decorate([
168
+ (0, inversify_1.inject)(memory_diff_select_widget_1.MemoryDiffSelectWidget),
169
+ __metadata("design:type", memory_diff_select_widget_1.MemoryDiffSelectWidget)
170
+ ], MemoryLayoutWidget.prototype, "diffSelectWidget", void 0);
171
+ __decorate([
172
+ (0, inversify_1.inject)(memory_dockpanel_placeholder_widget_1.MemoryDockpanelPlaceholder),
173
+ __metadata("design:type", memory_dockpanel_placeholder_widget_1.MemoryDockpanelPlaceholder)
174
+ ], MemoryLayoutWidget.prototype, "placeholderWidget", void 0);
175
+ __decorate([
176
+ (0, inversify_1.inject)(browser_1.ApplicationShell),
177
+ __metadata("design:type", browser_1.ApplicationShell)
178
+ ], MemoryLayoutWidget.prototype, "shell", void 0);
179
+ __decorate([
180
+ (0, inversify_1.postConstruct)(),
181
+ __metadata("design:type", Function),
182
+ __metadata("design:paramtypes", []),
183
+ __metadata("design:returntype", Promise)
184
+ ], MemoryLayoutWidget.prototype, "init", null);
185
+ MemoryLayoutWidget = MemoryLayoutWidget_1 = __decorate([
186
+ (0, inversify_1.injectable)()
187
+ ], MemoryLayoutWidget);
188
+ exports.MemoryLayoutWidget = MemoryLayoutWidget;
189
189
  //# 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 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 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 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 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 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 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 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 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.34.1",
3
+ "version": "1.34.3",
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.34.1",
31
- "@theia/debug": "1.34.1",
30
+ "@theia/core": "1.34.3",
31
+ "@theia/debug": "1.34.3",
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": "474bdc10b58be92953496b8bcac2af25ee2b48a3"
46
+ "gitHead": "a6cf9fe96b1624d6e27a11dce2ebdeae820478e5"
47
47
  }