@theia/editor 1.69.0-next.55 → 1.69.0-next.65
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/lib/browser/editor-formatter-service.d.ts +67 -0
- package/lib/browser/editor-formatter-service.d.ts.map +1 -0
- package/lib/browser/editor-formatter-service.js +20 -0
- package/lib/browser/editor-formatter-service.js.map +1 -0
- package/lib/browser/editor-frontend-module.d.ts.map +1 -1
- package/lib/browser/editor-frontend-module.js +2 -0
- package/lib/browser/editor-frontend-module.js.map +1 -1
- package/lib/browser/index.d.ts +1 -0
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +1 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/language-status/editor-formatter-status-contribution.d.ts +89 -0
- package/lib/browser/language-status/editor-formatter-status-contribution.d.ts.map +1 -0
- package/lib/browser/language-status/editor-formatter-status-contribution.js +325 -0
- package/lib/browser/language-status/editor-formatter-status-contribution.js.map +1 -0
- package/lib/browser/language-status/editor-language-status-service.d.ts +49 -6
- package/lib/browser/language-status/editor-language-status-service.d.ts.map +1 -1
- package/lib/browser/language-status/editor-language-status-service.js +246 -81
- package/lib/browser/language-status/editor-language-status-service.js.map +1 -1
- package/package.json +4 -4
- package/src/browser/editor-formatter-service.ts +92 -0
- package/src/browser/editor-frontend-module.ts +2 -0
- package/src/browser/index.ts +1 -0
- package/src/browser/language-status/editor-formatter-status-contribution.ts +420 -0
- package/src/browser/language-status/editor-language-status-service.ts +281 -83
- package/src/browser/language-status/editor-language-status.css +19 -5
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Event, PreferenceScope } from '@theia/core';
|
|
2
|
+
import { TextEditor } from './editor';
|
|
3
|
+
export declare const FormatterService: unique symbol;
|
|
4
|
+
export interface FormatterInfo {
|
|
5
|
+
id: string;
|
|
6
|
+
displayName: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Represents the scope at which a formatter setting is configured.
|
|
10
|
+
* - 'user': Configured in user settings, applies globally across all workspaces
|
|
11
|
+
* - 'workspace': Configured in workspace settings, applies to the current workspace
|
|
12
|
+
* - 'folder': Configured in folder settings, applies to a specific workspace folder
|
|
13
|
+
* - 'auto': No explicit configuration, formatter is automatically selected (e.g., only one available)
|
|
14
|
+
* - 'none': No formatter is configured or available
|
|
15
|
+
*/
|
|
16
|
+
export type FormatterSettingScope = 'user' | 'workspace' | 'folder' | 'auto' | 'none';
|
|
17
|
+
export interface FormatterStatus {
|
|
18
|
+
formatter: FormatterInfo | undefined;
|
|
19
|
+
scope: FormatterSettingScope;
|
|
20
|
+
/**
|
|
21
|
+
* If true, the configured formatter ID does not match any available formatter.
|
|
22
|
+
* The configuredFormatterId will contain the invalid ID.
|
|
23
|
+
*/
|
|
24
|
+
isInvalid: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The formatter ID that was configured in settings, even if it doesn't exist.
|
|
27
|
+
*/
|
|
28
|
+
configuredFormatterId: string | undefined;
|
|
29
|
+
}
|
|
30
|
+
export interface FormatterService {
|
|
31
|
+
/**
|
|
32
|
+
* Event fired when formatters change (e.g., new formatter registered/unregistered)
|
|
33
|
+
*/
|
|
34
|
+
readonly onDidChangeFormatters: Event<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Get the complete formatter status including the formatter info, scope, and validation state.
|
|
37
|
+
* This is the preferred method to get formatter information as it provides all necessary context.
|
|
38
|
+
*/
|
|
39
|
+
getFormatterStatus(editor: TextEditor): FormatterStatus;
|
|
40
|
+
/**
|
|
41
|
+
* Get all available formatters for the given editor's language
|
|
42
|
+
*/
|
|
43
|
+
getAvailableFormatters(editor: TextEditor): FormatterInfo[];
|
|
44
|
+
/**
|
|
45
|
+
* Set the default formatter for the given language or editor's language
|
|
46
|
+
* @param languageIdOrEditor The language ID or editor to set the formatter for
|
|
47
|
+
* @param formatterId The formatter ID, or undefined to clear the setting
|
|
48
|
+
* @param scope The preference scope to save to
|
|
49
|
+
*/
|
|
50
|
+
setDefaultFormatter(languageIdOrEditor: string | TextEditor, formatterId: string | undefined, scope: PreferenceScope): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Get the default formatter ID for the given language and resource URI.
|
|
53
|
+
* This is used internally during formatting operations.
|
|
54
|
+
* @param languageId The language identifier
|
|
55
|
+
* @param resourceUri The resource URI
|
|
56
|
+
* @returns The formatter ID or undefined if not set
|
|
57
|
+
*/
|
|
58
|
+
getDefaultFormatter(languageId: string, resourceUri: string): string | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Get the scope at which the formatter is currently configured for the given editor.
|
|
61
|
+
* Returns undefined if no formatter is configured.
|
|
62
|
+
* @param editor The text editor
|
|
63
|
+
* @returns The preference scope where the formatter is set, or undefined
|
|
64
|
+
*/
|
|
65
|
+
getConfiguredScope(editor: TextEditor): PreferenceScope | undefined;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=editor-formatter-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-formatter-service.d.ts","sourceRoot":"","sources":["../../src/browser/editor-formatter-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtF,MAAM,WAAW,eAAe;IAC5B,SAAS,EAAE,aAAa,GAAG,SAAS,CAAC;IACrC,KAAK,EAAE,qBAAqB,CAAC;IAC7B;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7C;AAED,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,QAAQ,CAAC,qBAAqB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAE5C;;;OAGG;IACH,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,eAAe,CAAC;IAExD;;OAEG;IACH,sBAAsB,CAAC,MAAM,EAAE,UAAU,GAAG,aAAa,EAAE,CAAC;IAE5D;;;;;OAKG;IACH,mBAAmB,CAAC,kBAAkB,EAAE,MAAM,GAAG,UAAU,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErI;;;;;;OAMG;IACH,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAEjF;;;;;OAKG;IACH,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,eAAe,GAAG,SAAS,CAAC;CACvE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 EclipseSource 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.FormatterService = void 0;
|
|
19
|
+
exports.FormatterService = Symbol('FormatterService');
|
|
20
|
+
//# sourceMappingURL=editor-formatter-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-formatter-service.js","sourceRoot":"","sources":["../../src/browser/editor-formatter-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAKnE,QAAA,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/editor-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,8DAA8D,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;
|
|
1
|
+
{"version":3,"file":"editor-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/editor-frontend-module.ts"],"names":[],"mappings":"AAgBA,OAAO,mCAAmC,CAAC;AAC3C,OAAO,8DAA8D,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AA0B/D,wBA2DG"}
|
|
@@ -36,6 +36,7 @@ const editor_variable_contribution_1 = require("./editor-variable-contribution")
|
|
|
36
36
|
const quick_access_1 = require("@theia/core/lib/browser/quick-input/quick-access");
|
|
37
37
|
const quick_editor_service_1 = require("./quick-editor-service");
|
|
38
38
|
const editor_language_status_service_1 = require("./language-status/editor-language-status-service");
|
|
39
|
+
const editor_formatter_status_contribution_1 = require("./language-status/editor-formatter-status-contribution");
|
|
39
40
|
const editor_linenumber_contribution_1 = require("./editor-linenumber-contribution");
|
|
40
41
|
const undo_redo_service_1 = require("./undo-redo-service");
|
|
41
42
|
const editor_language_quick_pick_service_1 = require("./editor-language-quick-pick-service");
|
|
@@ -59,6 +60,7 @@ exports.default = new inversify_1.ContainerModule(bind => {
|
|
|
59
60
|
bind(browser_1.KeybindingContribution).toService(editor_keybinding_1.EditorKeybindingContribution);
|
|
60
61
|
bind(editor_contribution_1.EditorContribution).toSelf().inSingletonScope();
|
|
61
62
|
bind(editor_language_status_service_1.EditorLanguageStatusService).toSelf().inSingletonScope();
|
|
63
|
+
bind(editor_formatter_status_contribution_1.EditorFormatterStatusContribution).toSelf().inSingletonScope();
|
|
62
64
|
bind(editor_linenumber_contribution_1.EditorLineNumberContribution).toSelf().inSingletonScope();
|
|
63
65
|
bind(browser_1.FrontendApplicationContribution).toService(editor_linenumber_contribution_1.EditorLineNumberContribution);
|
|
64
66
|
bind(editor_navigation_contribution_1.EditorNavigationContribution).toSelf().inSingletonScope();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor-frontend-module.js","sourceRoot":"","sources":["../../src/browser/editor-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,6CAA2C;AAC3C,wEAAsE;AAEtE,4DAA+D;AAC/D,mDAAyG;AACzG,qDAA2J;AAC3J,kEAA4E;AAC5E,qDAAiI;AACjI,+DAA2D;AAC3D,+CAAuD;AACvD,qDAA6D;AAC7D,2DAAmE;AACnE,qEAAqE;AACrE,mEAA8D;AAC9D,qFAAgF;AAChF,0FAAqF;AACrF,0FAAqF;AACrF,gGAA2F;AAC3F,iFAA4E;AAC5E,mFAA2F;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AAkB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACrD,IAAI,CAAC,4DAA2B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"editor-frontend-module.js","sourceRoot":"","sources":["../../src/browser/editor-frontend-module.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,6CAA2C;AAC3C,wEAAsE;AAEtE,4DAA+D;AAC/D,mDAAyG;AACzG,qDAA2J;AAC3J,kEAA4E;AAC5E,qDAAiI;AACjI,+DAA2D;AAC3D,+CAAuD;AACvD,qDAA6D;AAC7D,2DAAmE;AACnE,qEAAqE;AACrE,mEAA8D;AAC9D,qFAAgF;AAChF,0FAAqF;AACrF,0FAAqF;AACrF,gGAA2F;AAC3F,iFAA4E;AAC5E,mFAA2F;AAC3F,iEAA4D;AAC5D,qGAA+F;AAC/F,iHAA2G;AAC3G,qFAAgF;AAChF,2DAAsD;AACtD,6FAAsF;AACtF,2EAAsE;AACtE,qFAA+E;AAE/E,kBAAe,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACtC,IAAA,0CAAqB,EAAC,IAAI,CAAC,CAAC;IAE5B,IAAI,CAAC,2CAAmB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IACtD,IAAI,CAAC,uBAAa,CAAC,CAAC,SAAS,CAAC,2CAAmB,CAAC,CAAC;IAEnD,IAAI,CAAC,8BAAa,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAChD,IAAI,CAAC,qBAAW,CAAC,CAAC,SAAS,CAAC,8BAAa,CAAC,CAA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mEAA8B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;AACrE,CAAC,CAAC,CAAC"}
|
package/lib/browser/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAgBA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAgBA,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC"}
|
package/lib/browser/index.js
CHANGED
|
@@ -27,4 +27,5 @@ tslib_1.__exportStar(require("./decorations"), exports);
|
|
|
27
27
|
tslib_1.__exportStar(require("./editor-linenumber-contribution"), exports);
|
|
28
28
|
tslib_1.__exportStar(require("./split-editor-contribution"), exports);
|
|
29
29
|
tslib_1.__exportStar(require("./text-editor-split-contribution"), exports);
|
|
30
|
+
tslib_1.__exportStar(require("./editor-formatter-service"), exports);
|
|
30
31
|
//# sourceMappingURL=index.js.map
|
package/lib/browser/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,2DAAiC;AACjC,mDAAyB;AACzB,0DAAgC;AAChC,2DAAiC;AACjC,2DAAiC;AACjC,wDAA8B;AAC9B,mEAAyC;AACzC,wDAA8B;AAC9B,2EAAiD;AACjD,sEAA4C;AAC5C,2EAAiD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,2DAAiC;AACjC,mDAAyB;AACzB,0DAAgC;AAChC,2DAAiC;AACjC,2DAAiC;AACjC,wDAA8B;AAC9B,mEAAyC;AACzC,wDAA8B;AAC9B,2EAAiD;AACjD,sEAA4C;AAC5C,2EAAiD;AACjD,qEAA2C"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { QuickInputService, QuickPickItem, StatusBarEntry } from '@theia/core/lib/browser';
|
|
2
|
+
import { PreferenceScope } from '@theia/core';
|
|
3
|
+
import { Severity } from '@theia/core/lib/common/severity';
|
|
4
|
+
import { TextEditor } from '../editor';
|
|
5
|
+
import { FormatterService, FormatterStatus, FormatterInfo } from '../editor-formatter-service';
|
|
6
|
+
import { LanguageStatus } from './editor-language-status-service';
|
|
7
|
+
/**
|
|
8
|
+
* Icons used for formatter status display.
|
|
9
|
+
* - info: normal state (configured, auto-selected, or no formatters)
|
|
10
|
+
* - error: invalid configuration with no fallback
|
|
11
|
+
* - warning: invalid config with fallback available (single formatter case)
|
|
12
|
+
*/
|
|
13
|
+
declare const enum FormatterIcon {
|
|
14
|
+
Info = "$(info)",
|
|
15
|
+
Error = "$(error)",
|
|
16
|
+
Warning = "$(warning)"
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Display information for a formatter status.
|
|
20
|
+
*/
|
|
21
|
+
interface FormatterDisplayInfo {
|
|
22
|
+
/** Icon to display (check, error, warning) */
|
|
23
|
+
icon: FormatterIcon;
|
|
24
|
+
/** Label text (formatter name or status) */
|
|
25
|
+
label: string;
|
|
26
|
+
/** Tooltip text for hover */
|
|
27
|
+
tooltip: string;
|
|
28
|
+
/** Whether the configure action should be available */
|
|
29
|
+
hasConfigureAction: boolean;
|
|
30
|
+
/** Severity for the language status item */
|
|
31
|
+
severity: Severity;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Handles formatter-related status bar functionality.
|
|
35
|
+
* Responsible for creating formatter status items, displaying formatter quick picks,
|
|
36
|
+
* and managing pinned formatter items in the status bar.
|
|
37
|
+
*/
|
|
38
|
+
export declare class EditorFormatterStatusContribution {
|
|
39
|
+
static readonly FORMATTER_STATUS_ITEM_ID = "editor-formatter-status";
|
|
40
|
+
protected readonly formatterService: FormatterService | undefined;
|
|
41
|
+
protected readonly quickInputService: QuickInputService | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Creates a language status item for the formatter.
|
|
44
|
+
* Returns undefined if no formatter service is available.
|
|
45
|
+
*/
|
|
46
|
+
createFormatterStatusItem(editor: TextEditor): LanguageStatus | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Gets the tooltip text for the formatter status item.
|
|
49
|
+
*/
|
|
50
|
+
getTooltip(editor: TextEditor): string;
|
|
51
|
+
/**
|
|
52
|
+
* Creates a status bar entry for a pinned formatter item.
|
|
53
|
+
* Includes proper tooltip and icon.
|
|
54
|
+
*/
|
|
55
|
+
createPinnedStatusBarEntry(editor: TextEditor | undefined, onclick?: (e: MouseEvent) => void): StatusBarEntry;
|
|
56
|
+
/**
|
|
57
|
+
* Shows the formatter selection quick pick dialog.
|
|
58
|
+
*/
|
|
59
|
+
showFormatterQuickPick(editor: TextEditor): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns true if the formatter service is available.
|
|
62
|
+
*/
|
|
63
|
+
isAvailable(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Returns true if the configure action should be available for the given editor.
|
|
66
|
+
* Configure is available when there are multiple formatters or an invalid configuration.
|
|
67
|
+
*/
|
|
68
|
+
hasConfigureAction(editor: TextEditor): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Gets the formatter display info for the given editor.
|
|
71
|
+
* Caches the status to avoid repeated service calls.
|
|
72
|
+
*/
|
|
73
|
+
protected getFormatterDisplayInfo(editor: TextEditor, useShortLabel?: boolean): FormatterDisplayInfo;
|
|
74
|
+
/**
|
|
75
|
+
* Builds display info based on the current formatter state.
|
|
76
|
+
* @param status The formatter status
|
|
77
|
+
* @param availableFormatters List of available formatters
|
|
78
|
+
* @param useShortLabel If true, uses shorter labels suitable for status bar
|
|
79
|
+
*/
|
|
80
|
+
protected buildDisplayInfo(status: FormatterStatus, availableFormatters: FormatterInfo[], useShortLabel?: boolean): FormatterDisplayInfo;
|
|
81
|
+
protected buildNoFormattersDisplayInfo(status: FormatterStatus, useShortLabel?: boolean): FormatterDisplayInfo;
|
|
82
|
+
protected buildSingleFormatterDisplayInfo(status: FormatterStatus, formatter: FormatterInfo): FormatterDisplayInfo;
|
|
83
|
+
protected buildMultipleFormattersDisplayInfo(status: FormatterStatus, formatterCount: number): FormatterDisplayInfo;
|
|
84
|
+
protected showFormatterSelectionPick(editor: TextEditor, formatters: FormatterInfo[]): Promise<QuickPickItem | undefined>;
|
|
85
|
+
protected determineTargetScope(editor: TextEditor): Promise<PreferenceScope | undefined>;
|
|
86
|
+
protected showScopeSelectionPick(): Promise<PreferenceScope | undefined>;
|
|
87
|
+
}
|
|
88
|
+
export {};
|
|
89
|
+
//# sourceMappingURL=editor-formatter-status-contribution.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-formatter-status-contribution.d.ts","sourceRoot":"","sources":["../../../src/browser/language-status/editor-formatter-status-contribution.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAsB,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAO,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAyB,eAAe,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACtH,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAkClE;;;;;GAKG;AACH,mBAAW,aAAa;IACpB,IAAI,YAAY;IAChB,KAAK,aAAa;IAClB,OAAO,eAAe;CACzB;AAED;;GAEG;AACH,UAAU,oBAAoB;IAC1B,8CAA8C;IAC9C,IAAI,EAAE,aAAa,CAAC;IACpB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,4CAA4C;IAC5C,QAAQ,EAAE,QAAQ,CAAC;CACtB;AAED;;;;GAIG;AACH,qBACa,iCAAiC;IAC1C,MAAM,CAAC,QAAQ,CAAC,wBAAwB,6BAA6B;IAGrE,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAGlE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAi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AAC;CA2BjF"}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2026 EclipseSource 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 EditorFormatterStatusContribution_1;
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.EditorFormatterStatusContribution = void 0;
|
|
20
|
+
const tslib_1 = require("tslib");
|
|
21
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
23
|
+
const core_1 = require("@theia/core");
|
|
24
|
+
const severity_1 = require("@theia/core/lib/common/severity");
|
|
25
|
+
const editor_formatter_service_1 = require("../editor-formatter-service");
|
|
26
|
+
const SCOPE_DISPLAY_MAP = {
|
|
27
|
+
user: () => ({
|
|
28
|
+
icon: '$(account)',
|
|
29
|
+
text: core_1.nls.localizeByDefault('User Settings')
|
|
30
|
+
}),
|
|
31
|
+
workspace: () => ({
|
|
32
|
+
icon: '$(folder)',
|
|
33
|
+
text: core_1.nls.localizeByDefault('Workspace Settings')
|
|
34
|
+
}),
|
|
35
|
+
folder: () => ({
|
|
36
|
+
icon: '$(folder-opened)',
|
|
37
|
+
text: core_1.nls.localizeByDefault('Folder Settings')
|
|
38
|
+
}),
|
|
39
|
+
auto: () => ({
|
|
40
|
+
icon: '$(check)',
|
|
41
|
+
text: core_1.nls.localize('theia/editor/onlyAvailableFormatter', 'Only Available Formatter')
|
|
42
|
+
}),
|
|
43
|
+
none: () => ({
|
|
44
|
+
icon: '$(question)',
|
|
45
|
+
text: core_1.nls.localizeByDefault('Unknown')
|
|
46
|
+
})
|
|
47
|
+
};
|
|
48
|
+
function getScopeDisplayInfo(scope) {
|
|
49
|
+
return SCOPE_DISPLAY_MAP[scope]();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Handles formatter-related status bar functionality.
|
|
53
|
+
* Responsible for creating formatter status items, displaying formatter quick picks,
|
|
54
|
+
* and managing pinned formatter items in the status bar.
|
|
55
|
+
*/
|
|
56
|
+
let EditorFormatterStatusContribution = class EditorFormatterStatusContribution {
|
|
57
|
+
static { EditorFormatterStatusContribution_1 = this; }
|
|
58
|
+
static { this.FORMATTER_STATUS_ITEM_ID = 'editor-formatter-status'; }
|
|
59
|
+
/**
|
|
60
|
+
* Creates a language status item for the formatter.
|
|
61
|
+
* Returns undefined if no formatter service is available.
|
|
62
|
+
*/
|
|
63
|
+
createFormatterStatusItem(editor) {
|
|
64
|
+
if (!this.formatterService) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const displayInfo = this.getFormatterDisplayInfo(editor);
|
|
68
|
+
return {
|
|
69
|
+
id: EditorFormatterStatusContribution_1.FORMATTER_STATUS_ITEM_ID,
|
|
70
|
+
name: core_1.nls.localize('theia/editor/formatter', 'Formatter'),
|
|
71
|
+
selector: { language: editor.document.languageId },
|
|
72
|
+
severity: displayInfo.severity,
|
|
73
|
+
label: displayInfo.label,
|
|
74
|
+
detail: '',
|
|
75
|
+
busy: false,
|
|
76
|
+
source: 'theia',
|
|
77
|
+
command: {
|
|
78
|
+
id: EditorFormatterStatusContribution_1.FORMATTER_STATUS_ITEM_ID,
|
|
79
|
+
title: '',
|
|
80
|
+
tooltip: displayInfo.tooltip
|
|
81
|
+
},
|
|
82
|
+
accessibilityInfo: undefined
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Gets the tooltip text for the formatter status item.
|
|
87
|
+
*/
|
|
88
|
+
getTooltip(editor) {
|
|
89
|
+
if (!this.formatterService) {
|
|
90
|
+
return '';
|
|
91
|
+
}
|
|
92
|
+
const displayInfo = this.getFormatterDisplayInfo(editor);
|
|
93
|
+
return displayInfo.tooltip;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Creates a status bar entry for a pinned formatter item.
|
|
97
|
+
* Includes proper tooltip and icon.
|
|
98
|
+
*/
|
|
99
|
+
createPinnedStatusBarEntry(editor, onclick) {
|
|
100
|
+
if (!this.formatterService || !editor) {
|
|
101
|
+
return {
|
|
102
|
+
text: `${"$(warning)" /* FormatterIcon.Warning */} ${core_1.nls.localize('theia/editor/formatter', 'Formatter')}`,
|
|
103
|
+
tooltip: core_1.nls.localize('theia/editor/noEditor', 'No editor active'),
|
|
104
|
+
affinity: { id: 'editor-status-language', alignment: browser_1.StatusBarAlignment.RIGHT, compact: false },
|
|
105
|
+
alignment: browser_1.StatusBarAlignment.RIGHT,
|
|
106
|
+
onclick,
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
const displayInfo = this.getFormatterDisplayInfo(editor, true);
|
|
110
|
+
return {
|
|
111
|
+
text: `${displayInfo.icon} ${displayInfo.label}`,
|
|
112
|
+
tooltip: displayInfo.tooltip,
|
|
113
|
+
affinity: { id: 'editor-status-language', alignment: browser_1.StatusBarAlignment.RIGHT, compact: false },
|
|
114
|
+
alignment: browser_1.StatusBarAlignment.RIGHT,
|
|
115
|
+
onclick,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Shows the formatter selection quick pick dialog.
|
|
120
|
+
*/
|
|
121
|
+
async showFormatterQuickPick(editor) {
|
|
122
|
+
if (!this.formatterService || !this.quickInputService) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const formatters = this.formatterService.getAvailableFormatters(editor);
|
|
126
|
+
if (formatters.length === 0) {
|
|
127
|
+
await this.quickInputService.showQuickPick([{ label: core_1.nls.localize('theia/editor/noFormattersAvailable', 'No formatters available for this language') }], { placeholder: core_1.nls.localize('theia/editor/selectFormatter', 'Select Default Formatter') });
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
const selectedFormatter = await this.showFormatterSelectionPick(editor, formatters);
|
|
131
|
+
if (selectedFormatter === undefined) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const targetScope = await this.determineTargetScope(editor);
|
|
135
|
+
if (targetScope === undefined) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const formatterId = selectedFormatter.id === '' ? undefined : selectedFormatter.id;
|
|
139
|
+
await this.formatterService.setDefaultFormatter(editor, formatterId, targetScope);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Returns true if the formatter service is available.
|
|
143
|
+
*/
|
|
144
|
+
isAvailable() {
|
|
145
|
+
return this.formatterService !== undefined;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns true if the configure action should be available for the given editor.
|
|
149
|
+
* Configure is available when there are multiple formatters or an invalid configuration.
|
|
150
|
+
*/
|
|
151
|
+
hasConfigureAction(editor) {
|
|
152
|
+
if (!this.formatterService) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
const displayInfo = this.getFormatterDisplayInfo(editor);
|
|
156
|
+
return displayInfo.hasConfigureAction;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Gets the formatter display info for the given editor.
|
|
160
|
+
* Caches the status to avoid repeated service calls.
|
|
161
|
+
*/
|
|
162
|
+
getFormatterDisplayInfo(editor, useShortLabel = false) {
|
|
163
|
+
const status = this.formatterService.getFormatterStatus(editor);
|
|
164
|
+
const availableFormatters = this.formatterService.getAvailableFormatters(editor);
|
|
165
|
+
return this.buildDisplayInfo(status, availableFormatters, useShortLabel);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Builds display info based on the current formatter state.
|
|
169
|
+
* @param status The formatter status
|
|
170
|
+
* @param availableFormatters List of available formatters
|
|
171
|
+
* @param useShortLabel If true, uses shorter labels suitable for status bar
|
|
172
|
+
*/
|
|
173
|
+
buildDisplayInfo(status, availableFormatters, useShortLabel = false) {
|
|
174
|
+
const formatterCount = availableFormatters.length;
|
|
175
|
+
if (formatterCount === 0) {
|
|
176
|
+
return this.buildNoFormattersDisplayInfo(status, useShortLabel);
|
|
177
|
+
}
|
|
178
|
+
if (formatterCount === 1) {
|
|
179
|
+
return this.buildSingleFormatterDisplayInfo(status, availableFormatters[0]);
|
|
180
|
+
}
|
|
181
|
+
return this.buildMultipleFormattersDisplayInfo(status, formatterCount);
|
|
182
|
+
}
|
|
183
|
+
buildNoFormattersDisplayInfo(status, useShortLabel = false) {
|
|
184
|
+
const label = useShortLabel
|
|
185
|
+
? core_1.nls.localize('theia/editor/noFormatter', 'No Formatter')
|
|
186
|
+
: core_1.nls.localize('theia/editor/noFormatterInstalled', 'No Formatter installed');
|
|
187
|
+
if (status.configuredFormatterId) {
|
|
188
|
+
const scopeInfo = getScopeDisplayInfo(status.scope);
|
|
189
|
+
return {
|
|
190
|
+
icon: "$(error)" /* FormatterIcon.Error */,
|
|
191
|
+
label,
|
|
192
|
+
tooltip: core_1.nls.localize('theia/editor/configuredNotInstalled', "'{0}' configured in {1} but not installed", status.configuredFormatterId, scopeInfo.text),
|
|
193
|
+
hasConfigureAction: false,
|
|
194
|
+
severity: severity_1.Severity.Error
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
icon: "$(info)" /* FormatterIcon.Info */,
|
|
199
|
+
label,
|
|
200
|
+
tooltip: core_1.nls.localize('theia/editor/noFormattersInstalledTooltip', 'No formatters are installed for this language.'),
|
|
201
|
+
hasConfigureAction: false,
|
|
202
|
+
severity: severity_1.Severity.Info
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
buildSingleFormatterDisplayInfo(status, formatter) {
|
|
206
|
+
// Invalid config but we have a fallback
|
|
207
|
+
if (status.isInvalid && status.configuredFormatterId) {
|
|
208
|
+
const scopeInfo = getScopeDisplayInfo(status.scope);
|
|
209
|
+
return {
|
|
210
|
+
icon: "$(warning)" /* FormatterIcon.Warning */,
|
|
211
|
+
label: formatter.displayName,
|
|
212
|
+
tooltip: core_1.nls.localize('theia/editor/configuredNotInstalledFallbackNamed', "'{0}' configured in {1} not installed, using '{2}'", status.configuredFormatterId, scopeInfo.text, formatter.displayName),
|
|
213
|
+
hasConfigureAction: true,
|
|
214
|
+
severity: severity_1.Severity.Warning
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
// Normal case - auto-selected single formatter
|
|
218
|
+
return {
|
|
219
|
+
icon: "$(info)" /* FormatterIcon.Info */,
|
|
220
|
+
label: formatter.displayName,
|
|
221
|
+
tooltip: core_1.nls.localize('theia/editor/onlyFormatterInstalled', '{0} (only formatter installed)', formatter.displayName),
|
|
222
|
+
hasConfigureAction: false,
|
|
223
|
+
severity: severity_1.Severity.Info
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
buildMultipleFormattersDisplayInfo(status, formatterCount) {
|
|
227
|
+
// Invalid config - configured formatter not installed
|
|
228
|
+
if (status.isInvalid && status.configuredFormatterId) {
|
|
229
|
+
const scopeInfo = getScopeDisplayInfo(status.scope);
|
|
230
|
+
return {
|
|
231
|
+
icon: "$(error)" /* FormatterIcon.Error */,
|
|
232
|
+
label: status.configuredFormatterId,
|
|
233
|
+
tooltip: core_1.nls.localize('theia/editor/configuredNotInstalled', "'{0}' configured in {1} but not installed", status.configuredFormatterId, scopeInfo.text),
|
|
234
|
+
hasConfigureAction: true,
|
|
235
|
+
severity: severity_1.Severity.Error
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
// Configured formatter
|
|
239
|
+
if (status.formatter) {
|
|
240
|
+
const scopeInfo = getScopeDisplayInfo(status.scope);
|
|
241
|
+
return {
|
|
242
|
+
icon: "$(info)" /* FormatterIcon.Info */,
|
|
243
|
+
label: status.formatter.displayName,
|
|
244
|
+
tooltip: core_1.nls.localize('theia/editor/configuredIn', 'Configured in {0}', scopeInfo.text),
|
|
245
|
+
hasConfigureAction: true,
|
|
246
|
+
severity: severity_1.Severity.Info
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
// No formatter configured
|
|
250
|
+
return {
|
|
251
|
+
icon: "$(info)" /* FormatterIcon.Info */,
|
|
252
|
+
label: core_1.nls.localize('theia/editor/noDefaultConfiguredLabel', 'No default formatter configured'),
|
|
253
|
+
tooltip: core_1.nls.localize('theia/editor/noDefaultConfiguredTooltip', 'No default formatter configured ({0} formatters available)', formatterCount),
|
|
254
|
+
hasConfigureAction: true,
|
|
255
|
+
severity: severity_1.Severity.Info
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
async showFormatterSelectionPick(editor, formatters) {
|
|
259
|
+
if (!this.formatterService || !this.quickInputService) {
|
|
260
|
+
return undefined;
|
|
261
|
+
}
|
|
262
|
+
const status = this.formatterService.getFormatterStatus(editor);
|
|
263
|
+
const currentFormatterId = status.formatter?.id;
|
|
264
|
+
const currentLabel = core_1.nls.localize('theia/editor/currentFormatter', '(Current)');
|
|
265
|
+
const formatterItems = formatters.map(formatter => ({
|
|
266
|
+
label: formatter.displayName,
|
|
267
|
+
description: formatter.id === currentFormatterId ? currentLabel : undefined,
|
|
268
|
+
detail: formatter.id,
|
|
269
|
+
id: formatter.id
|
|
270
|
+
}));
|
|
271
|
+
const noneItem = {
|
|
272
|
+
label: core_1.nls.localizeByDefault('None'),
|
|
273
|
+
description: !currentFormatterId ? currentLabel : undefined,
|
|
274
|
+
detail: core_1.nls.localize('theia/editor/clearFormatterSetting', 'Clear formatter setting'),
|
|
275
|
+
id: ''
|
|
276
|
+
};
|
|
277
|
+
return this.quickInputService.showQuickPick([noneItem, ...formatterItems], { placeholder: core_1.nls.localize('theia/editor/selectFormatter', 'Select Default Formatter') });
|
|
278
|
+
}
|
|
279
|
+
async determineTargetScope(editor) {
|
|
280
|
+
if (!this.formatterService) {
|
|
281
|
+
return undefined;
|
|
282
|
+
}
|
|
283
|
+
const currentScope = this.formatterService.getConfiguredScope(editor);
|
|
284
|
+
if (currentScope === core_1.PreferenceScope.Folder || currentScope === core_1.PreferenceScope.Workspace) {
|
|
285
|
+
return currentScope;
|
|
286
|
+
}
|
|
287
|
+
return this.showScopeSelectionPick();
|
|
288
|
+
}
|
|
289
|
+
async showScopeSelectionPick() {
|
|
290
|
+
if (!this.quickInputService) {
|
|
291
|
+
return undefined;
|
|
292
|
+
}
|
|
293
|
+
const userScopeInfo = getScopeDisplayInfo('user');
|
|
294
|
+
const workspaceScopeInfo = getScopeDisplayInfo('workspace');
|
|
295
|
+
const scopeItems = [
|
|
296
|
+
{
|
|
297
|
+
label: `${userScopeInfo.icon} ${userScopeInfo.text}`,
|
|
298
|
+
detail: core_1.nls.localize('theia/editor/userSettingsDetail', 'Apply to all workspaces'),
|
|
299
|
+
value: core_1.PreferenceScope.User
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
label: `${workspaceScopeInfo.icon} ${workspaceScopeInfo.text}`,
|
|
303
|
+
detail: core_1.nls.localize('theia/editor/workspaceSettingsDetail', 'Apply to current workspace only'),
|
|
304
|
+
value: core_1.PreferenceScope.Workspace
|
|
305
|
+
}
|
|
306
|
+
];
|
|
307
|
+
const result = await this.quickInputService.showQuickPick(scopeItems, { placeholder: core_1.nls.localize('theia/editor/selectScope', 'Select where to save the setting') });
|
|
308
|
+
return result?.value;
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
exports.EditorFormatterStatusContribution = EditorFormatterStatusContribution;
|
|
312
|
+
tslib_1.__decorate([
|
|
313
|
+
(0, inversify_1.inject)(editor_formatter_service_1.FormatterService),
|
|
314
|
+
(0, inversify_1.optional)(),
|
|
315
|
+
tslib_1.__metadata("design:type", Object)
|
|
316
|
+
], EditorFormatterStatusContribution.prototype, "formatterService", void 0);
|
|
317
|
+
tslib_1.__decorate([
|
|
318
|
+
(0, inversify_1.inject)(browser_1.QuickInputService),
|
|
319
|
+
(0, inversify_1.optional)(),
|
|
320
|
+
tslib_1.__metadata("design:type", Object)
|
|
321
|
+
], EditorFormatterStatusContribution.prototype, "quickInputService", void 0);
|
|
322
|
+
exports.EditorFormatterStatusContribution = EditorFormatterStatusContribution = EditorFormatterStatusContribution_1 = tslib_1.__decorate([
|
|
323
|
+
(0, inversify_1.injectable)()
|
|
324
|
+
], EditorFormatterStatusContribution);
|
|
325
|
+
//# sourceMappingURL=editor-formatter-status-contribution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-formatter-status-contribution.js","sourceRoot":"","sources":["../../../src/browser/language-status/editor-formatter-status-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAEhF,4DAA4E;AAC5E,qDAA+G;AAC/G,sCAAmD;AACnD,8DAA2D;AAE3D,0EAAsH;AAQtH,MAAM,iBAAiB,GAA0D;IAC7E,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACT,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,UAAG,CAAC,iBAAiB,CAAC,eAAe,CAAC;KAC/C,CAAC;IACF,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC;QACd,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,UAAG,CAAC,iBAAiB,CAAC,oBAAoB,CAAC;KACpD,CAAC;IACF,MAAM,EAAE,GAAG,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