@theia/monaco 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.
- package/LICENSE +641 -641
- package/README.md +100 -100
- package/data/monaco-nls.json +1379 -1379
- package/data/monaco-themes/vscode/dark_plus.json +201 -201
- package/data/monaco-themes/vscode/dark_theia.json +5 -5
- package/data/monaco-themes/vscode/dark_vs.json +392 -392
- package/data/monaco-themes/vscode/hc_black.json +457 -457
- package/data/monaco-themes/vscode/hc_light.json +590 -590
- package/data/monaco-themes/vscode/hc_theia.json +5 -5
- package/data/monaco-themes/vscode/hc_theia_light.json +5 -5
- package/data/monaco-themes/vscode/light_plus.json +202 -202
- package/data/monaco-themes/vscode/light_theia.json +10 -10
- package/data/monaco-themes/vscode/light_vs.json +421 -421
- package/lib/browser/index.d.ts +1 -1
- package/lib/browser/index.js +28 -28
- package/lib/browser/markdown-renderer/monaco-markdown-renderer.d.ts +24 -24
- package/lib/browser/markdown-renderer/monaco-markdown-renderer.js +137 -137
- package/lib/browser/monaco-bulk-edit-service.d.ts +14 -14
- package/lib/browser/monaco-bulk-edit-service.js +66 -66
- package/lib/browser/monaco-color-registry.d.ts +16 -16
- package/lib/browser/monaco-color-registry.js +82 -82
- package/lib/browser/monaco-command-registry.d.ts +19 -19
- package/lib/browser/monaco-command-registry.js +82 -82
- package/lib/browser/monaco-command-service.d.ts +26 -26
- package/lib/browser/monaco-command-service.js +92 -92
- package/lib/browser/monaco-command.d.ts +94 -94
- package/lib/browser/monaco-command.js +306 -306
- package/lib/browser/monaco-context-key-service.d.ts +22 -22
- package/lib/browser/monaco-context-key-service.js +147 -147
- package/lib/browser/monaco-context-menu.d.ts +16 -16
- package/lib/browser/monaco-context-menu.js +102 -102
- package/lib/browser/monaco-diagnostic-collection.d.ts +28 -28
- package/lib/browser/monaco-diagnostic-collection.js +86 -86
- package/lib/browser/monaco-diff-editor.d.ts +29 -29
- package/lib/browser/monaco-diff-editor.js +74 -74
- package/lib/browser/monaco-diff-navigator-factory.d.ts +7 -7
- package/lib/browser/monaco-diff-navigator-factory.js +66 -66
- package/lib/browser/monaco-editor-model.d.ts +156 -156
- package/lib/browser/monaco-editor-model.js +555 -555
- package/lib/browser/monaco-editor-provider.d.ts +89 -89
- package/lib/browser/monaco-editor-provider.js +440 -440
- package/lib/browser/monaco-editor-service.d.ts +27 -27
- package/lib/browser/monaco-editor-service.js +151 -151
- package/lib/browser/monaco-editor-zone-widget.d.ts +43 -43
- package/lib/browser/monaco-editor-zone-widget.js +194 -194
- package/lib/browser/monaco-editor.d.ts +151 -151
- package/lib/browser/monaco-editor.js +497 -497
- package/lib/browser/monaco-formatting-conflicts.d.ts +13 -13
- package/lib/browser/monaco-formatting-conflicts.js +110 -110
- package/lib/browser/monaco-frontend-application-contribution.d.ts +26 -26
- package/lib/browser/monaco-frontend-application-contribution.js +201 -201
- package/lib/browser/monaco-frontend-module.d.ts +7 -7
- package/lib/browser/monaco-frontend-module.js +266 -266
- package/lib/browser/monaco-gotoline-quick-access.d.ts +11 -11
- package/lib/browser/monaco-gotoline-quick-access.js +64 -64
- package/lib/browser/monaco-gotosymbol-quick-access.d.ts +16 -16
- package/lib/browser/monaco-gotosymbol-quick-access.js +70 -70
- package/lib/browser/monaco-indexed-db.d.ts +28 -28
- package/lib/browser/monaco-indexed-db.js +131 -131
- package/lib/browser/monaco-keybinding-contexts.d.ts +15 -15
- package/lib/browser/monaco-keybinding-contexts.js +50 -50
- package/lib/browser/monaco-keybinding.d.ts +16 -16
- package/lib/browser/monaco-keybinding.js +134 -134
- package/lib/browser/monaco-keycode-map.d.ts +2 -2
- package/lib/browser/monaco-keycode-map.js +163 -163
- package/lib/browser/monaco-languages.d.ts +27 -27
- package/lib/browser/monaco-languages.js +136 -136
- package/lib/browser/monaco-menu.d.ts +20 -20
- package/lib/browser/monaco-menu.js +145 -145
- package/lib/browser/monaco-mime-service.d.ts +10 -10
- package/lib/browser/monaco-mime-service.js +78 -78
- package/lib/browser/monaco-outline-contribution.d.ts +78 -78
- package/lib/browser/monaco-outline-contribution.js +384 -384
- package/lib/browser/monaco-outline-decorator.d.ts +12 -12
- package/lib/browser/monaco-outline-decorator.js +67 -67
- package/lib/browser/monaco-quick-access-registry.d.ts +11 -11
- package/lib/browser/monaco-quick-access-registry.js +99 -99
- package/lib/browser/monaco-quick-input-service.d.ts +99 -99
- package/lib/browser/monaco-quick-input-service.js +555 -555
- package/lib/browser/monaco-resolved-keybinding.d.ts +23 -23
- package/lib/browser/monaco-resolved-keybinding.js +131 -131
- package/lib/browser/monaco-snippet-suggest-provider.d.ts +64 -64
- package/lib/browser/monaco-snippet-suggest-provider.js +269 -269
- package/lib/browser/monaco-status-bar-contribution.d.ts +17 -17
- package/lib/browser/monaco-status-bar-contribution.js +120 -120
- package/lib/browser/monaco-text-model-service.d.ts +51 -51
- package/lib/browser/monaco-text-model-service.js +184 -184
- package/lib/browser/monaco-theming-service.d.ts +67 -67
- package/lib/browser/monaco-theming-service.js +171 -171
- package/lib/browser/monaco-to-protocol-converter.d.ts +26 -26
- package/lib/browser/monaco-to-protocol-converter.js +61 -61
- package/lib/browser/monaco-workspace.d.ts +83 -83
- package/lib/browser/monaco-workspace.js +369 -369
- package/lib/browser/protocol-to-monaco-converter.d.ts +31 -31
- package/lib/browser/protocol-to-monaco-converter.js +133 -133
- package/lib/browser/textmate/index.d.ts +4 -4
- package/lib/browser/textmate/index.js +31 -31
- package/lib/browser/textmate/monaco-textmate-frontend-bindings.d.ts +12 -12
- package/lib/browser/textmate/monaco-textmate-frontend-bindings.js +94 -94
- package/lib/browser/textmate/monaco-textmate-service.d.ts +30 -30
- package/lib/browser/textmate/monaco-textmate-service.js +185 -185
- package/lib/browser/textmate/monaco-theme-registry.d.ts +27 -27
- package/lib/browser/textmate/monaco-theme-registry.js +171 -171
- package/lib/browser/textmate/monaco-theme-types.d.ts +20 -20
- package/lib/browser/textmate/monaco-theme-types.js +21 -21
- package/lib/browser/textmate/textmate-contribution.d.ts +9 -9
- package/lib/browser/textmate/textmate-contribution.js +27 -27
- package/lib/browser/textmate/textmate-registry.d.ts +31 -31
- package/lib/browser/textmate/textmate-registry.js +109 -109
- package/lib/browser/textmate/textmate-snippet-completion-provider.d.ts +26 -26
- package/lib/browser/textmate/textmate-snippet-completion-provider.js +53 -53
- package/lib/browser/textmate/textmate-tokenizer.d.ts +22 -22
- package/lib/browser/textmate/textmate-tokenizer.js +65 -65
- package/lib/browser/workspace-symbol-command.d.ts +55 -55
- package/lib/browser/workspace-symbol-command.js +215 -215
- package/lib/package.spec.js +25 -25
- package/package.json +8 -8
- package/src/browser/index.ts +17 -17
- package/src/browser/markdown-renderer/monaco-markdown-renderer.ts +117 -117
- package/src/browser/monaco-bulk-edit-service.ts +64 -64
- package/src/browser/monaco-color-registry.ts +73 -73
- package/src/browser/monaco-command-registry.ts +82 -82
- package/src/browser/monaco-command-service.ts +99 -99
- package/src/browser/monaco-command.ts +311 -311
- package/src/browser/monaco-context-key-service.ts +143 -143
- package/src/browser/monaco-context-menu.ts +90 -90
- package/src/browser/monaco-diagnostic-collection.ts +101 -101
- package/src/browser/monaco-diff-editor.ts +101 -101
- package/src/browser/monaco-diff-navigator-factory.ts +61 -61
- package/src/browser/monaco-editor-model.ts +681 -681
- package/src/browser/monaco-editor-provider.ts +452 -452
- package/src/browser/monaco-editor-service.ts +144 -144
- package/src/browser/monaco-editor-zone-widget.ts +250 -250
- package/src/browser/monaco-editor.ts +644 -644
- package/src/browser/monaco-formatting-conflicts.ts +115 -115
- package/src/browser/monaco-frontend-application-contribution.ts +188 -188
- package/src/browser/monaco-frontend-module.ts +314 -314
- package/src/browser/monaco-gotoline-quick-access.ts +47 -47
- package/src/browser/monaco-gotosymbol-quick-access.ts +53 -53
- package/src/browser/monaco-indexed-db.ts +130 -130
- package/src/browser/monaco-keybinding-contexts.ts +43 -43
- package/src/browser/monaco-keybinding.ts +111 -111
- package/src/browser/monaco-keycode-map.ts +171 -171
- package/src/browser/monaco-languages.ts +129 -129
- package/src/browser/monaco-menu.ts +142 -142
- package/src/browser/monaco-mime-service.ts +71 -71
- package/src/browser/monaco-outline-contribution.ts +404 -404
- package/src/browser/monaco-outline-decorator.ts +66 -66
- package/src/browser/monaco-quick-access-registry.ts +112 -112
- package/src/browser/monaco-quick-input-service.ts +651 -651
- package/src/browser/monaco-resolved-keybinding.ts +162 -162
- package/src/browser/monaco-snippet-suggest-provider.ts +300 -300
- package/src/browser/monaco-status-bar-contribution.ts +109 -109
- package/src/browser/monaco-text-model-service.ts +194 -194
- package/src/browser/monaco-theming-service.ts +204 -204
- package/src/browser/monaco-to-protocol-converter.ts +71 -71
- package/src/browser/monaco-workspace.ts +393 -393
- package/src/browser/protocol-to-monaco-converter.ts +158 -158
- package/src/browser/style/index.css +267 -267
- package/src/browser/textmate/index.ts +20 -20
- package/src/browser/textmate/monaco-textmate-frontend-bindings.ts +94 -94
- package/src/browser/textmate/monaco-textmate-service.ts +187 -187
- package/src/browser/textmate/monaco-theme-registry.ts +176 -176
- package/src/browser/textmate/monaco-theme-types.ts +37 -37
- package/src/browser/textmate/textmate-contribution.ts +29 -29
- package/src/browser/textmate/textmate-registry.ts +129 -129
- package/src/browser/textmate/textmate-snippet-completion-provider.ts +73 -73
- package/src/browser/textmate/textmate-tokenizer.ts +84 -84
- package/src/browser/workspace-symbol-command.ts +196 -196
- package/src/package.spec.ts +28 -28
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { ContextKeyService as TheiaContextKeyService, ContextKey, ContextKeyChangeEvent, ScopedValueStore, ContextMatcher, ContextKeyValue } from '@theia/core/lib/browser/context-key-service';
|
|
2
|
-
import { Emitter } from '@theia/core';
|
|
3
|
-
import { ContextKeyService as VSCodeContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/browser/contextKeyService';
|
|
4
|
-
import { ContextKeyExpression, IContext, IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
|
|
5
|
-
export declare class MonacoContextKeyService implements TheiaContextKeyService {
|
|
6
|
-
protected readonly onDidChangeEmitter: Emitter<ContextKeyChangeEvent>;
|
|
7
|
-
readonly onDidChange: import("@theia/core").Event<ContextKeyChangeEvent>;
|
|
8
|
-
protected readonly contextKeyService: VSCodeContextKeyService;
|
|
9
|
-
protected init(): void;
|
|
10
|
-
createKey<T extends ContextKeyValue>(key: string, defaultValue: T | undefined): ContextKey<T>;
|
|
11
|
-
activeContext?: HTMLElement | IContext;
|
|
12
|
-
match(expression: string, context?: HTMLElement): boolean;
|
|
13
|
-
protected identifyContext(callersContext?: HTMLElement | IContext, service?: IContextKeyService): IContext | undefined;
|
|
14
|
-
protected readonly expressions: Map<string, ContextKeyExpression>;
|
|
15
|
-
parse(when: string): ContextKeyExpression | undefined;
|
|
16
|
-
parseKeys(expression: string): Set<string> | undefined;
|
|
17
|
-
with<T>(values: Record<string, unknown>, callback: () => T): T;
|
|
18
|
-
createScoped(target: HTMLElement): ScopedValueStore;
|
|
19
|
-
createOverlay(overlay: Iterable<[string, unknown]>): ContextMatcher;
|
|
20
|
-
setContext(key: string, value: unknown): void;
|
|
21
|
-
dispose(): void;
|
|
22
|
-
}
|
|
1
|
+
import { ContextKeyService as TheiaContextKeyService, ContextKey, ContextKeyChangeEvent, ScopedValueStore, ContextMatcher, ContextKeyValue } from '@theia/core/lib/browser/context-key-service';
|
|
2
|
+
import { Emitter } from '@theia/core';
|
|
3
|
+
import { ContextKeyService as VSCodeContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/browser/contextKeyService';
|
|
4
|
+
import { ContextKeyExpression, IContext, IContextKeyService } from '@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey';
|
|
5
|
+
export declare class MonacoContextKeyService implements TheiaContextKeyService {
|
|
6
|
+
protected readonly onDidChangeEmitter: Emitter<ContextKeyChangeEvent>;
|
|
7
|
+
readonly onDidChange: import("@theia/core").Event<ContextKeyChangeEvent>;
|
|
8
|
+
protected readonly contextKeyService: VSCodeContextKeyService;
|
|
9
|
+
protected init(): void;
|
|
10
|
+
createKey<T extends ContextKeyValue>(key: string, defaultValue: T | undefined): ContextKey<T>;
|
|
11
|
+
activeContext?: HTMLElement | IContext;
|
|
12
|
+
match(expression: string, context?: HTMLElement): boolean;
|
|
13
|
+
protected identifyContext(callersContext?: HTMLElement | IContext, service?: IContextKeyService): IContext | undefined;
|
|
14
|
+
protected readonly expressions: Map<string, ContextKeyExpression>;
|
|
15
|
+
parse(when: string): ContextKeyExpression | undefined;
|
|
16
|
+
parseKeys(expression: string): Set<string> | undefined;
|
|
17
|
+
with<T>(values: Record<string, unknown>, callback: () => T): T;
|
|
18
|
+
createScoped(target: HTMLElement): ScopedValueStore;
|
|
19
|
+
createOverlay(overlay: Iterable<[string, unknown]>): ContextMatcher;
|
|
20
|
+
setContext(key: string, value: unknown): void;
|
|
21
|
+
dispose(): void;
|
|
22
|
+
}
|
|
23
23
|
//# sourceMappingURL=monaco-context-key-service.d.ts.map
|
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2019 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 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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.MonacoContextKeyService = void 0;
|
|
28
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
-
const core_1 = require("@theia/core");
|
|
30
|
-
const contextKeyService_1 = require("@theia/monaco-editor-core/esm/vs/platform/contextkey/browser/contextKeyService");
|
|
31
|
-
const contextkey_1 = require("@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey");
|
|
32
|
-
let MonacoContextKeyService = class MonacoContextKeyService {
|
|
33
|
-
constructor() {
|
|
34
|
-
this.onDidChangeEmitter = new core_1.Emitter();
|
|
35
|
-
this.onDidChange = this.onDidChangeEmitter.event;
|
|
36
|
-
this.expressions = new Map();
|
|
37
|
-
}
|
|
38
|
-
init() {
|
|
39
|
-
this.contextKeyService.onDidChangeContext(e => this.onDidChangeEmitter.fire({
|
|
40
|
-
affects: keys => e.affectsSome(keys)
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
createKey(key, defaultValue) {
|
|
44
|
-
return this.contextKeyService.createKey(key, defaultValue);
|
|
45
|
-
}
|
|
46
|
-
match(expression, context) {
|
|
47
|
-
const parsed = this.parse(expression);
|
|
48
|
-
if (parsed) {
|
|
49
|
-
const ctx = this.identifyContext(context);
|
|
50
|
-
if (!ctx) {
|
|
51
|
-
return this.contextKeyService.contextMatchesRules(parsed);
|
|
52
|
-
}
|
|
53
|
-
return parsed.evaluate(ctx);
|
|
54
|
-
}
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
identifyContext(callersContext, service = this.contextKeyService) {
|
|
58
|
-
var _a;
|
|
59
|
-
if (callersContext && 'getValue' in callersContext) {
|
|
60
|
-
return callersContext;
|
|
61
|
-
}
|
|
62
|
-
else if (this.activeContext && 'getValue' in this.activeContext) {
|
|
63
|
-
return this.activeContext;
|
|
64
|
-
}
|
|
65
|
-
const browserContext = (_a = callersContext !== null && callersContext !== void 0 ? callersContext : this.activeContext) !== null && _a !== void 0 ? _a : (document.activeElement instanceof HTMLElement ? document.activeElement : undefined);
|
|
66
|
-
if (browserContext) {
|
|
67
|
-
return service.getContext(browserContext);
|
|
68
|
-
}
|
|
69
|
-
return undefined;
|
|
70
|
-
}
|
|
71
|
-
parse(when) {
|
|
72
|
-
let expression = this.expressions.get(when);
|
|
73
|
-
if (!expression) {
|
|
74
|
-
expression = contextkey_1.ContextKeyExpr.deserialize(when);
|
|
75
|
-
if (expression) {
|
|
76
|
-
this.expressions.set(when, expression);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return expression;
|
|
80
|
-
}
|
|
81
|
-
parseKeys(expression) {
|
|
82
|
-
const expr = contextkey_1.ContextKeyExpr.deserialize(expression);
|
|
83
|
-
return expr ? new Set(expr.keys()) : expr;
|
|
84
|
-
}
|
|
85
|
-
with(values, callback) {
|
|
86
|
-
const oldActive = this.activeContext;
|
|
87
|
-
const id = this.contextKeyService.createChildContext();
|
|
88
|
-
const child = this.contextKeyService.getContextValuesContainer(id);
|
|
89
|
-
for (const [key, value] of Object.entries(values)) {
|
|
90
|
-
child.setValue(key, value);
|
|
91
|
-
}
|
|
92
|
-
this.activeContext = child;
|
|
93
|
-
try {
|
|
94
|
-
return callback();
|
|
95
|
-
}
|
|
96
|
-
finally {
|
|
97
|
-
this.activeContext = oldActive;
|
|
98
|
-
this.contextKeyService.disposeContext(id);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
createScoped(target) {
|
|
102
|
-
const scoped = this.contextKeyService.createScoped(target);
|
|
103
|
-
if (scoped instanceof contextKeyService_1.AbstractContextKeyService) {
|
|
104
|
-
return scoped;
|
|
105
|
-
}
|
|
106
|
-
return this;
|
|
107
|
-
}
|
|
108
|
-
createOverlay(overlay) {
|
|
109
|
-
const delegate = this.contextKeyService.createOverlay(overlay);
|
|
110
|
-
return {
|
|
111
|
-
match: (expression, context) => {
|
|
112
|
-
const parsed = this.parse(expression);
|
|
113
|
-
if (parsed) {
|
|
114
|
-
const ctx = this.identifyContext(context, delegate);
|
|
115
|
-
if (!ctx) {
|
|
116
|
-
return delegate.contextMatchesRules(parsed);
|
|
117
|
-
}
|
|
118
|
-
return parsed.evaluate(ctx);
|
|
119
|
-
}
|
|
120
|
-
return true;
|
|
121
|
-
},
|
|
122
|
-
dispose: () => delegate.dispose(),
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
setContext(key, value) {
|
|
126
|
-
this.contextKeyService.setContext(key, value);
|
|
127
|
-
}
|
|
128
|
-
dispose() {
|
|
129
|
-
this.activeContext = undefined;
|
|
130
|
-
this.onDidChangeEmitter.dispose();
|
|
131
|
-
this.contextKeyService.dispose();
|
|
132
|
-
}
|
|
133
|
-
};
|
|
134
|
-
__decorate([
|
|
135
|
-
(0, inversify_1.inject)(contextKeyService_1.ContextKeyService),
|
|
136
|
-
__metadata("design:type", contextKeyService_1.ContextKeyService)
|
|
137
|
-
], MonacoContextKeyService.prototype, "contextKeyService", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
(0, inversify_1.postConstruct)(),
|
|
140
|
-
__metadata("design:type", Function),
|
|
141
|
-
__metadata("design:paramtypes", []),
|
|
142
|
-
__metadata("design:returntype", void 0)
|
|
143
|
-
], MonacoContextKeyService.prototype, "init", null);
|
|
144
|
-
MonacoContextKeyService = __decorate([
|
|
145
|
-
(0, inversify_1.injectable)()
|
|
146
|
-
], MonacoContextKeyService);
|
|
147
|
-
exports.MonacoContextKeyService = MonacoContextKeyService;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2019 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 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.MonacoContextKeyService = void 0;
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const core_1 = require("@theia/core");
|
|
30
|
+
const contextKeyService_1 = require("@theia/monaco-editor-core/esm/vs/platform/contextkey/browser/contextKeyService");
|
|
31
|
+
const contextkey_1 = require("@theia/monaco-editor-core/esm/vs/platform/contextkey/common/contextkey");
|
|
32
|
+
let MonacoContextKeyService = class MonacoContextKeyService {
|
|
33
|
+
constructor() {
|
|
34
|
+
this.onDidChangeEmitter = new core_1.Emitter();
|
|
35
|
+
this.onDidChange = this.onDidChangeEmitter.event;
|
|
36
|
+
this.expressions = new Map();
|
|
37
|
+
}
|
|
38
|
+
init() {
|
|
39
|
+
this.contextKeyService.onDidChangeContext(e => this.onDidChangeEmitter.fire({
|
|
40
|
+
affects: keys => e.affectsSome(keys)
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
createKey(key, defaultValue) {
|
|
44
|
+
return this.contextKeyService.createKey(key, defaultValue);
|
|
45
|
+
}
|
|
46
|
+
match(expression, context) {
|
|
47
|
+
const parsed = this.parse(expression);
|
|
48
|
+
if (parsed) {
|
|
49
|
+
const ctx = this.identifyContext(context);
|
|
50
|
+
if (!ctx) {
|
|
51
|
+
return this.contextKeyService.contextMatchesRules(parsed);
|
|
52
|
+
}
|
|
53
|
+
return parsed.evaluate(ctx);
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
identifyContext(callersContext, service = this.contextKeyService) {
|
|
58
|
+
var _a;
|
|
59
|
+
if (callersContext && 'getValue' in callersContext) {
|
|
60
|
+
return callersContext;
|
|
61
|
+
}
|
|
62
|
+
else if (this.activeContext && 'getValue' in this.activeContext) {
|
|
63
|
+
return this.activeContext;
|
|
64
|
+
}
|
|
65
|
+
const browserContext = (_a = callersContext !== null && callersContext !== void 0 ? callersContext : this.activeContext) !== null && _a !== void 0 ? _a : (document.activeElement instanceof HTMLElement ? document.activeElement : undefined);
|
|
66
|
+
if (browserContext) {
|
|
67
|
+
return service.getContext(browserContext);
|
|
68
|
+
}
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
parse(when) {
|
|
72
|
+
let expression = this.expressions.get(when);
|
|
73
|
+
if (!expression) {
|
|
74
|
+
expression = contextkey_1.ContextKeyExpr.deserialize(when);
|
|
75
|
+
if (expression) {
|
|
76
|
+
this.expressions.set(when, expression);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return expression;
|
|
80
|
+
}
|
|
81
|
+
parseKeys(expression) {
|
|
82
|
+
const expr = contextkey_1.ContextKeyExpr.deserialize(expression);
|
|
83
|
+
return expr ? new Set(expr.keys()) : expr;
|
|
84
|
+
}
|
|
85
|
+
with(values, callback) {
|
|
86
|
+
const oldActive = this.activeContext;
|
|
87
|
+
const id = this.contextKeyService.createChildContext();
|
|
88
|
+
const child = this.contextKeyService.getContextValuesContainer(id);
|
|
89
|
+
for (const [key, value] of Object.entries(values)) {
|
|
90
|
+
child.setValue(key, value);
|
|
91
|
+
}
|
|
92
|
+
this.activeContext = child;
|
|
93
|
+
try {
|
|
94
|
+
return callback();
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
this.activeContext = oldActive;
|
|
98
|
+
this.contextKeyService.disposeContext(id);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
createScoped(target) {
|
|
102
|
+
const scoped = this.contextKeyService.createScoped(target);
|
|
103
|
+
if (scoped instanceof contextKeyService_1.AbstractContextKeyService) {
|
|
104
|
+
return scoped;
|
|
105
|
+
}
|
|
106
|
+
return this;
|
|
107
|
+
}
|
|
108
|
+
createOverlay(overlay) {
|
|
109
|
+
const delegate = this.contextKeyService.createOverlay(overlay);
|
|
110
|
+
return {
|
|
111
|
+
match: (expression, context) => {
|
|
112
|
+
const parsed = this.parse(expression);
|
|
113
|
+
if (parsed) {
|
|
114
|
+
const ctx = this.identifyContext(context, delegate);
|
|
115
|
+
if (!ctx) {
|
|
116
|
+
return delegate.contextMatchesRules(parsed);
|
|
117
|
+
}
|
|
118
|
+
return parsed.evaluate(ctx);
|
|
119
|
+
}
|
|
120
|
+
return true;
|
|
121
|
+
},
|
|
122
|
+
dispose: () => delegate.dispose(),
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
setContext(key, value) {
|
|
126
|
+
this.contextKeyService.setContext(key, value);
|
|
127
|
+
}
|
|
128
|
+
dispose() {
|
|
129
|
+
this.activeContext = undefined;
|
|
130
|
+
this.onDidChangeEmitter.dispose();
|
|
131
|
+
this.contextKeyService.dispose();
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, inversify_1.inject)(contextKeyService_1.ContextKeyService),
|
|
136
|
+
__metadata("design:type", contextKeyService_1.ContextKeyService)
|
|
137
|
+
], MonacoContextKeyService.prototype, "contextKeyService", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, inversify_1.postConstruct)(),
|
|
140
|
+
__metadata("design:type", Function),
|
|
141
|
+
__metadata("design:paramtypes", []),
|
|
142
|
+
__metadata("design:returntype", void 0)
|
|
143
|
+
], MonacoContextKeyService.prototype, "init", null);
|
|
144
|
+
MonacoContextKeyService = __decorate([
|
|
145
|
+
(0, inversify_1.injectable)()
|
|
146
|
+
], MonacoContextKeyService);
|
|
147
|
+
exports.MonacoContextKeyService = MonacoContextKeyService;
|
|
148
148
|
//# sourceMappingURL=monaco-context-key-service.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { MenuPath } from '@theia/core/lib/common/menu';
|
|
2
|
-
import { ContextMenuRenderer } from '@theia/core/lib/browser';
|
|
3
|
-
import { IContextMenuService } from '@theia/monaco-editor-core/esm/vs/platform/contextview/browser/contextView';
|
|
4
|
-
import { IContextMenuDelegate } from '@theia/monaco-editor-core/esm/vs/base/browser/contextmenu';
|
|
5
|
-
import { Event, Emitter } from '@theia/monaco-editor-core/esm/vs/base/common/event';
|
|
6
|
-
export declare class MonacoContextMenuService implements IContextMenuService {
|
|
7
|
-
protected readonly contextMenuRenderer: ContextMenuRenderer;
|
|
8
|
-
readonly _serviceBrand: undefined;
|
|
9
|
-
protected readonly onDidShowContextMenuEmitter: Emitter<void>;
|
|
10
|
-
get onDidShowContextMenu(): Event<void>;
|
|
11
|
-
protected readonly onDidHideContextMenuEmitter: Emitter<void>;
|
|
12
|
-
get onDidHideContextMenu(): Event<void>;
|
|
13
|
-
constructor(contextMenuRenderer: ContextMenuRenderer);
|
|
14
|
-
showContextMenu(delegate: IContextMenuDelegate): void;
|
|
15
|
-
protected menuPath(): MenuPath;
|
|
16
|
-
}
|
|
1
|
+
import { MenuPath } from '@theia/core/lib/common/menu';
|
|
2
|
+
import { ContextMenuRenderer } from '@theia/core/lib/browser';
|
|
3
|
+
import { IContextMenuService } from '@theia/monaco-editor-core/esm/vs/platform/contextview/browser/contextView';
|
|
4
|
+
import { IContextMenuDelegate } from '@theia/monaco-editor-core/esm/vs/base/browser/contextmenu';
|
|
5
|
+
import { Event, Emitter } from '@theia/monaco-editor-core/esm/vs/base/common/event';
|
|
6
|
+
export declare class MonacoContextMenuService implements IContextMenuService {
|
|
7
|
+
protected readonly contextMenuRenderer: ContextMenuRenderer;
|
|
8
|
+
readonly _serviceBrand: undefined;
|
|
9
|
+
protected readonly onDidShowContextMenuEmitter: Emitter<void>;
|
|
10
|
+
get onDidShowContextMenu(): Event<void>;
|
|
11
|
+
protected readonly onDidHideContextMenuEmitter: Emitter<void>;
|
|
12
|
+
get onDidHideContextMenu(): Event<void>;
|
|
13
|
+
constructor(contextMenuRenderer: ContextMenuRenderer);
|
|
14
|
+
showContextMenu(delegate: IContextMenuDelegate): void;
|
|
15
|
+
protected menuPath(): MenuPath;
|
|
16
|
+
}
|
|
17
17
|
//# sourceMappingURL=monaco-context-menu.d.ts.map
|
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2017 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 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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
27
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.MonacoContextMenuService = void 0;
|
|
31
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
32
|
-
const browser_1 = require("@theia/editor/lib/browser");
|
|
33
|
-
const browser_2 = require("@theia/core/lib/browser");
|
|
34
|
-
const widgets_1 = require("@theia/core/shared/@phosphor/widgets");
|
|
35
|
-
const commands_1 = require("@theia/core/shared/@phosphor/commands");
|
|
36
|
-
const actions_1 = require("@theia/monaco-editor-core/esm/vs/platform/actions/common/actions");
|
|
37
|
-
const event_1 = require("@theia/monaco-editor-core/esm/vs/base/common/event");
|
|
38
|
-
let MonacoContextMenuService = class MonacoContextMenuService {
|
|
39
|
-
constructor(contextMenuRenderer) {
|
|
40
|
-
this.contextMenuRenderer = contextMenuRenderer;
|
|
41
|
-
this.onDidShowContextMenuEmitter = new event_1.Emitter();
|
|
42
|
-
this.onDidHideContextMenuEmitter = new event_1.Emitter();
|
|
43
|
-
}
|
|
44
|
-
get onDidShowContextMenu() {
|
|
45
|
-
return this.onDidShowContextMenuEmitter.event;
|
|
46
|
-
}
|
|
47
|
-
;
|
|
48
|
-
get onDidHideContextMenu() {
|
|
49
|
-
return this.onDidShowContextMenuEmitter.event;
|
|
50
|
-
}
|
|
51
|
-
;
|
|
52
|
-
showContextMenu(delegate) {
|
|
53
|
-
const anchor = (0, browser_2.toAnchor)(delegate.getAnchor());
|
|
54
|
-
const actions = delegate.getActions();
|
|
55
|
-
const onHide = () => {
|
|
56
|
-
var _a;
|
|
57
|
-
(_a = delegate.onHide) === null || _a === void 0 ? void 0 : _a.call(delegate, false);
|
|
58
|
-
this.onDidHideContextMenuEmitter.fire();
|
|
59
|
-
};
|
|
60
|
-
// Actions for editor context menu come as 'MenuItemAction' items
|
|
61
|
-
// In case of 'Quick Fix' actions come as 'CodeActionAction' items
|
|
62
|
-
if (actions.length > 0 && actions[0] instanceof actions_1.MenuItemAction) {
|
|
63
|
-
this.contextMenuRenderer.render({
|
|
64
|
-
menuPath: this.menuPath(),
|
|
65
|
-
anchor,
|
|
66
|
-
onHide
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
const commands = new commands_1.CommandRegistry();
|
|
71
|
-
const menu = new widgets_1.Menu({
|
|
72
|
-
commands
|
|
73
|
-
});
|
|
74
|
-
for (const action of actions) {
|
|
75
|
-
const commandId = 'quickfix_' + actions.indexOf(action);
|
|
76
|
-
commands.addCommand(commandId, {
|
|
77
|
-
label: action.label,
|
|
78
|
-
className: action.class,
|
|
79
|
-
isToggled: () => Boolean(action.checked),
|
|
80
|
-
isEnabled: () => action.enabled,
|
|
81
|
-
execute: () => action.run()
|
|
82
|
-
});
|
|
83
|
-
menu.addItem({
|
|
84
|
-
type: 'command',
|
|
85
|
-
command: commandId
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
menu.aboutToClose.connect(() => onHide());
|
|
89
|
-
menu.open(anchor.x, anchor.y);
|
|
90
|
-
}
|
|
91
|
-
this.onDidShowContextMenuEmitter.fire();
|
|
92
|
-
}
|
|
93
|
-
menuPath() {
|
|
94
|
-
return browser_1.EDITOR_CONTEXT_MENU;
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
MonacoContextMenuService = __decorate([
|
|
98
|
-
(0, inversify_1.injectable)(),
|
|
99
|
-
__param(0, (0, inversify_1.inject)(browser_2.ContextMenuRenderer)),
|
|
100
|
-
__metadata("design:paramtypes", [browser_2.ContextMenuRenderer])
|
|
101
|
-
], MonacoContextMenuService);
|
|
102
|
-
exports.MonacoContextMenuService = MonacoContextMenuService;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2017 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 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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
27
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.MonacoContextMenuService = void 0;
|
|
31
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
32
|
+
const browser_1 = require("@theia/editor/lib/browser");
|
|
33
|
+
const browser_2 = require("@theia/core/lib/browser");
|
|
34
|
+
const widgets_1 = require("@theia/core/shared/@phosphor/widgets");
|
|
35
|
+
const commands_1 = require("@theia/core/shared/@phosphor/commands");
|
|
36
|
+
const actions_1 = require("@theia/monaco-editor-core/esm/vs/platform/actions/common/actions");
|
|
37
|
+
const event_1 = require("@theia/monaco-editor-core/esm/vs/base/common/event");
|
|
38
|
+
let MonacoContextMenuService = class MonacoContextMenuService {
|
|
39
|
+
constructor(contextMenuRenderer) {
|
|
40
|
+
this.contextMenuRenderer = contextMenuRenderer;
|
|
41
|
+
this.onDidShowContextMenuEmitter = new event_1.Emitter();
|
|
42
|
+
this.onDidHideContextMenuEmitter = new event_1.Emitter();
|
|
43
|
+
}
|
|
44
|
+
get onDidShowContextMenu() {
|
|
45
|
+
return this.onDidShowContextMenuEmitter.event;
|
|
46
|
+
}
|
|
47
|
+
;
|
|
48
|
+
get onDidHideContextMenu() {
|
|
49
|
+
return this.onDidShowContextMenuEmitter.event;
|
|
50
|
+
}
|
|
51
|
+
;
|
|
52
|
+
showContextMenu(delegate) {
|
|
53
|
+
const anchor = (0, browser_2.toAnchor)(delegate.getAnchor());
|
|
54
|
+
const actions = delegate.getActions();
|
|
55
|
+
const onHide = () => {
|
|
56
|
+
var _a;
|
|
57
|
+
(_a = delegate.onHide) === null || _a === void 0 ? void 0 : _a.call(delegate, false);
|
|
58
|
+
this.onDidHideContextMenuEmitter.fire();
|
|
59
|
+
};
|
|
60
|
+
// Actions for editor context menu come as 'MenuItemAction' items
|
|
61
|
+
// In case of 'Quick Fix' actions come as 'CodeActionAction' items
|
|
62
|
+
if (actions.length > 0 && actions[0] instanceof actions_1.MenuItemAction) {
|
|
63
|
+
this.contextMenuRenderer.render({
|
|
64
|
+
menuPath: this.menuPath(),
|
|
65
|
+
anchor,
|
|
66
|
+
onHide
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
const commands = new commands_1.CommandRegistry();
|
|
71
|
+
const menu = new widgets_1.Menu({
|
|
72
|
+
commands
|
|
73
|
+
});
|
|
74
|
+
for (const action of actions) {
|
|
75
|
+
const commandId = 'quickfix_' + actions.indexOf(action);
|
|
76
|
+
commands.addCommand(commandId, {
|
|
77
|
+
label: action.label,
|
|
78
|
+
className: action.class,
|
|
79
|
+
isToggled: () => Boolean(action.checked),
|
|
80
|
+
isEnabled: () => action.enabled,
|
|
81
|
+
execute: () => action.run()
|
|
82
|
+
});
|
|
83
|
+
menu.addItem({
|
|
84
|
+
type: 'command',
|
|
85
|
+
command: commandId
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
menu.aboutToClose.connect(() => onHide());
|
|
89
|
+
menu.open(anchor.x, anchor.y);
|
|
90
|
+
}
|
|
91
|
+
this.onDidShowContextMenuEmitter.fire();
|
|
92
|
+
}
|
|
93
|
+
menuPath() {
|
|
94
|
+
return browser_1.EDITOR_CONTEXT_MENU;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
MonacoContextMenuService = __decorate([
|
|
98
|
+
(0, inversify_1.injectable)(),
|
|
99
|
+
__param(0, (0, inversify_1.inject)(browser_2.ContextMenuRenderer)),
|
|
100
|
+
__metadata("design:paramtypes", [browser_2.ContextMenuRenderer])
|
|
101
|
+
], MonacoContextMenuService);
|
|
102
|
+
exports.MonacoContextMenuService = MonacoContextMenuService;
|
|
103
103
|
//# sourceMappingURL=monaco-context-menu.js.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Diagnostic } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
2
|
-
import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable';
|
|
3
|
-
import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter';
|
|
4
|
-
import * as monaco from '@theia/monaco-editor-core';
|
|
5
|
-
export declare class MonacoDiagnosticCollection implements Disposable {
|
|
6
|
-
protected readonly name: string;
|
|
7
|
-
protected readonly p2m: ProtocolToMonacoConverter;
|
|
8
|
-
protected readonly diagnostics: Map<string, MonacoModelDiagnostics | undefined>;
|
|
9
|
-
protected readonly toDispose: DisposableCollection;
|
|
10
|
-
constructor(name: string, p2m: ProtocolToMonacoConverter);
|
|
11
|
-
dispose(): void;
|
|
12
|
-
get(uri: string): Diagnostic[];
|
|
13
|
-
set(uri: string, diagnostics: Diagnostic[]): void;
|
|
14
|
-
}
|
|
15
|
-
export declare class MonacoModelDiagnostics implements Disposable {
|
|
16
|
-
readonly owner: string;
|
|
17
|
-
protected readonly p2m: ProtocolToMonacoConverter;
|
|
18
|
-
readonly uri: monaco.Uri;
|
|
19
|
-
protected _markers: monaco.editor.IMarkerData[];
|
|
20
|
-
protected _diagnostics: Diagnostic[];
|
|
21
|
-
constructor(uri: string, diagnostics: Diagnostic[], owner: string, p2m: ProtocolToMonacoConverter);
|
|
22
|
-
set diagnostics(diagnostics: Diagnostic[]);
|
|
23
|
-
get diagnostics(): Diagnostic[];
|
|
24
|
-
get markers(): ReadonlyArray<monaco.editor.IMarkerData>;
|
|
25
|
-
dispose(): void;
|
|
26
|
-
updateModelMarkers(): void;
|
|
27
|
-
protected doUpdateModelMarkers(model: monaco.editor.ITextModel | undefined): void;
|
|
28
|
-
}
|
|
1
|
+
import { Diagnostic } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
2
|
+
import { DisposableCollection, Disposable } from '@theia/core/lib/common/disposable';
|
|
3
|
+
import { ProtocolToMonacoConverter } from './protocol-to-monaco-converter';
|
|
4
|
+
import * as monaco from '@theia/monaco-editor-core';
|
|
5
|
+
export declare class MonacoDiagnosticCollection implements Disposable {
|
|
6
|
+
protected readonly name: string;
|
|
7
|
+
protected readonly p2m: ProtocolToMonacoConverter;
|
|
8
|
+
protected readonly diagnostics: Map<string, MonacoModelDiagnostics | undefined>;
|
|
9
|
+
protected readonly toDispose: DisposableCollection;
|
|
10
|
+
constructor(name: string, p2m: ProtocolToMonacoConverter);
|
|
11
|
+
dispose(): void;
|
|
12
|
+
get(uri: string): Diagnostic[];
|
|
13
|
+
set(uri: string, diagnostics: Diagnostic[]): void;
|
|
14
|
+
}
|
|
15
|
+
export declare class MonacoModelDiagnostics implements Disposable {
|
|
16
|
+
readonly owner: string;
|
|
17
|
+
protected readonly p2m: ProtocolToMonacoConverter;
|
|
18
|
+
readonly uri: monaco.Uri;
|
|
19
|
+
protected _markers: monaco.editor.IMarkerData[];
|
|
20
|
+
protected _diagnostics: Diagnostic[];
|
|
21
|
+
constructor(uri: string, diagnostics: Diagnostic[], owner: string, p2m: ProtocolToMonacoConverter);
|
|
22
|
+
set diagnostics(diagnostics: Diagnostic[]);
|
|
23
|
+
get diagnostics(): Diagnostic[];
|
|
24
|
+
get markers(): ReadonlyArray<monaco.editor.IMarkerData>;
|
|
25
|
+
dispose(): void;
|
|
26
|
+
updateModelMarkers(): void;
|
|
27
|
+
protected doUpdateModelMarkers(model: monaco.editor.ITextModel | undefined): void;
|
|
28
|
+
}
|
|
29
29
|
//# sourceMappingURL=monaco-diagnostic-collection.d.ts.map
|