@codingame/monaco-vscode-api 1.83.5 → 1.83.7
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/assets.js +3 -14
- package/lifecycle.js +3 -1
- package/missing-services.js +32 -28
- package/monaco-editor-treemending.patch +26330 -3867
- package/monaco.js +4 -0
- package/package.json +1 -1
- package/service-override/extensions.js +5 -5
- package/service-override/files.js +37 -13
- package/service-override/keybindings.js +10 -4
- package/service-override/layout.js +1 -3
- package/services.d.ts +13 -2
- package/services.js +35 -5
- package/vscode/src/vs/base/browser/broadcast.js +52 -0
- package/vscode/src/vs/base/browser/ui/menu/menubar.js +1 -1
- package/vscode/src/vs/base/browser/ui/splitview/paneview.js +6 -1
- package/vscode/src/vs/base/common/date.js +244 -54
- package/vscode/src/vs/base/common/jsonErrorMessages.js +45 -9
- package/vscode/src/vs/editor/common/services/textResourceConfiguration.d.ts +65 -0
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess.js +33 -5
- package/vscode/src/vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess.js +165 -32
- package/vscode/src/vs/platform/dialogs/common/dialogs.js +30 -9
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +0 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionNls.js +6 -1
- package/vscode/src/vs/platform/files/browser/indexedDBFileSystemProvider.js +404 -0
- package/vscode/src/vs/platform/files/common/fileService.js +13 -2
- package/vscode/src/vs/platform/files/common/files.js +25 -5
- package/vscode/src/vs/platform/keyboardLayout/common/keyboardConfig.js +15 -3
- package/vscode/src/vs/platform/quickinput/browser/commandsQuickAccess.js +38 -7
- package/vscode/src/vs/platform/quickinput/browser/helpQuickAccess.js +7 -1
- package/vscode/src/vs/platform/request/common/request.js +1 -1
- package/vscode/src/vs/platform/theme/common/tokenClassificationRegistry.js +210 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +73 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +5 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +11 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +70 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +108 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +17 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +7 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +14 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +12 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +6 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +32 -5
- package/vscode/src/vs/workbench/api/browser/statusBarExtensionPoint.js +0 -60
- package/vscode/src/vs/workbench/api/common/extHostChat.js +11 -2
- package/vscode/src/vs/workbench/api/common/extHostDiagnostics.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +12 -2
- package/vscode/src/vs/workbench/api/common/extHostLogService.js +9 -1
- package/vscode/src/vs/workbench/api/common/extHostProgress.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostStatusBar.js +11 -2
- package/vscode/src/vs/workbench/api/common/extHostTelemetry.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalService.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostTunnelService.js +10 -2
- package/vscode/src/vs/workbench/api/common/extHostWorkspace.js +7 -1
- package/vscode/src/vs/workbench/api/common/jsonValidationExtensionPoint.js +49 -9
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +397 -274
- package/vscode/src/vs/workbench/browser/actions/quickAccessActions.js +30 -6
- package/vscode/src/vs/workbench/browser/actions/windowActions.js +85 -31
- package/vscode/src/vs/workbench/browser/actions/workspaceActions.js +56 -102
- package/vscode/src/vs/workbench/browser/actions/workspaceCommands.js +5 -1
- package/vscode/src/vs/workbench/browser/editor.js +2 -2
- package/vscode/src/vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions.js +55 -11
- package/vscode/src/vs/workbench/browser/parts/compositeBarActions.js +63 -11
- package/vscode/src/vs/workbench/browser/parts/editor/binaryDiffEditor.js +7 -1
- package/vscode/src/vs/workbench/browser/parts/editor/binaryEditor.js +15 -3
- package/vscode/src/vs/workbench/browser/parts/editor/breadcrumbs.js +205 -41
- package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +617 -139
- package/vscode/src/vs/workbench/browser/parts/editor/editorActions.js +578 -114
- package/vscode/src/vs/workbench/browser/parts/editor/editorCommands.js +96 -20
- package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +30 -6
- package/vscode/src/vs/workbench/browser/parts/editor/editorPlaceholder.js +46 -9
- package/vscode/src/vs/workbench/browser/parts/editor/editorQuickAccess.js +30 -5
- package/vscode/src/vs/workbench/browser/parts/editor/editorStatus.js +309 -59
- package/vscode/src/vs/workbench/browser/parts/editor/sideBySideEditor.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textCodeEditor.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/editor/textDiffEditor.js +16 -3
- package/vscode/src/vs/workbench/browser/parts/editor/textEditor.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsCommands.js +35 -7
- package/vscode/src/vs/workbench/browser/parts/panel/panelActions.js +185 -33
- package/vscode/src/vs/workbench/browser/parts/titlebar/menubarControl.js +90 -57
- package/vscode/src/vs/workbench/browser/parts/views/viewFilter.js +5 -1
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +16 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPaneContainer.js +26 -6
- package/vscode/src/vs/workbench/browser/parts/views/viewsService.js +35 -6
- package/vscode/src/vs/workbench/browser/quickaccess.js +6 -6
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +918 -185
- package/vscode/src/vs/workbench/common/configuration.js +25 -11
- package/vscode/src/vs/workbench/common/contextkeys.js +244 -228
- package/vscode/src/vs/workbench/common/editor/diffEditorInput.js +7 -1
- package/vscode/src/vs/workbench/common/editor/resourceEditorInput.d.ts +44 -0
- package/vscode/src/vs/workbench/common/editor/sideBySideEditorInput.js +7 -1
- package/vscode/src/vs/workbench/common/editor/textEditorModel.js +6 -1
- package/vscode/src/vs/workbench/common/editor/textResourceEditorInput.d.ts +23 -0
- package/vscode/src/vs/workbench/common/editor.d.ts +26 -1
- package/vscode/src/vs/workbench/common/editor.js +26 -5
- package/vscode/src/vs/workbench/common/theme.js +676 -136
- package/vscode/src/vs/workbench/common/views.js +8 -3
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +71 -14
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityContributions.js +21 -2
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +133 -21
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +36 -8
- package/vscode/src/vs/workbench/contrib/bulkEdit/browser/bulkEditService.js +96 -17
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +0 -2
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +22 -4
- package/vscode/src/vs/workbench/contrib/chat/common/chatSlashCommands.js +22 -4
- package/vscode/src/vs/workbench/contrib/codeActions/browser/codeActionsContribution.js +41 -8
- package/vscode/src/vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint.js +25 -5
- package/vscode/src/vs/workbench/contrib/codeActions/common/documentationExtensionPoint.js +30 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +34 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/editorFeatures.js +44 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens.js +10 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint.js +320 -63
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/largeFileOptimizations.js +12 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess.js +15 -3
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess.js +30 -6
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/saveParticipants.js +25 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMinimap.js +10 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier.js +20 -4
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter.js +10 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace.js +10 -2
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/toggleWordWrap.js +25 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +30 -6
- package/vscode/src/vs/workbench/contrib/comments/browser/commentGlyphWidget.js +25 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +16 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +8 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +23 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +15 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +18 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/comments.contribution.js +142 -26
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +33 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +45 -7
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +63 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsViewActions.js +45 -9
- package/vscode/src/vs/workbench/contrib/comments/browser/reactionsAction.js +16 -8
- package/vscode/src/vs/workbench/contrib/comments/common/commentContextKeys.js +41 -21
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +5 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +5 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugColors.js +60 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugIcons.js +275 -55
- package/vscode/src/vs/workbench/contrib/debug/common/abstractDebugAdapter.js +7 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +255 -94
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsIcons.js +120 -24
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/configuration.js +22 -4
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +21 -4
- package/vscode/src/vs/workbench/contrib/files/browser/explorerViewlet.js +39 -51
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +394 -75
- package/vscode/src/vs/workbench/contrib/files/browser/fileConstants.js +17 -6
- package/vscode/src/vs/workbench/contrib/files/browser/fileImportExport.js +190 -32
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +5 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerDecorationsProvider.js +21 -4
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +26 -5
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerViewer.js +81 -14
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +26 -5
- package/vscode/src/vs/workbench/contrib/files/common/files.js +70 -26
- package/vscode/src/vs/workbench/contrib/folding/browser/folding.contribution.js +11 -3
- package/vscode/src/vs/workbench/contrib/format/browser/formatModified.js +5 -1
- package/vscode/src/vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty.js +20 -4
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +75 -111
- package/vscode/src/vs/workbench/contrib/keybindings/browser/keybindings.contribution.js +5 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +6 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +151 -29
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel.js +10 -2
- package/vscode/src/vs/workbench/contrib/mergeEditor/common/mergeEditor.js +0 -42
- package/vscode/src/vs/workbench/contrib/output/browser/output.contribution.js +115 -23
- package/vscode/src/vs/workbench/contrib/output/browser/outputView.js +17 -3
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/commandsQuickAccess.js +49 -9
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.js +66 -13
- package/vscode/src/vs/workbench/contrib/quickaccess/browser/viewQuickAccess.js +52 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtyDiffSwitcher.js +10 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +110 -26
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetCompletionProvider.js +21 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsFile.js +15 -3
- package/vscode/src/vs/workbench/contrib/snippets/browser/snippetsService.js +56 -9
- package/vscode/src/vs/workbench/contrib/tasks/common/taskDefinitionRegistry.js +25 -5
- package/vscode/src/vs/workbench/contrib/tasks/common/taskService.js +16 -26
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +7 -8
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEditorInput.js +20 -4
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.js +35 -7
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +106 -21
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalContextKey.js +81 -21
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +6 -1
- package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +6 -2
- package/vscode/src/vs/workbench/services/actions/common/menusExtensionPoint.js +592 -112
- package/vscode/src/vs/workbench/services/assignment/common/assignmentService.js +5 -1
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationService.js +6 -32
- package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +5 -1
- package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +5 -1
- package/vscode/src/vs/workbench/services/editor/common/editorResolverService.js +5 -1
- package/vscode/src/vs/workbench/services/extensions/browser/extensionUrlHandler.js +15 -3
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +58 -10
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +5 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsRegistry.js +392 -80
- package/vscode/src/vs/workbench/services/filesConfiguration/common/filesConfigurationService.js +28 -5
- package/vscode/src/vs/workbench/services/host/browser/browserHostService.js +10 -2
- package/vscode/src/vs/workbench/services/keybinding/browser/keybindingService.js +129 -24
- package/vscode/src/vs/workbench/services/keybinding/browser/keyboardLayoutService.js +10 -2
- package/vscode/src/vs/workbench/services/keybinding/common/keybindingEditing.js +20 -10
- package/vscode/src/vs/workbench/services/language/common/languageService.js +122 -22
- package/vscode/src/vs/workbench/services/remote/common/tunnelModel.js +28 -9
- package/vscode/src/vs/workbench/services/search/common/queryBuilder.js +6 -1
- package/vscode/src/vs/workbench/services/textfile/browser/textFileService.js +48 -9
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModel.js +5 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileEditorModelManager.js +7 -1
- package/vscode/src/vs/workbench/services/textfile/common/textFileSaveParticipant.js +6 -1
- package/vscode/src/vs/workbench/services/themes/common/colorExtensionPoint.js +81 -16
- package/vscode/src/vs/workbench/services/themes/common/iconExtensionPoint.js +1 -50
- package/vscode/src/vs/workbench/services/themes/common/tokenClassificationExtensionPoint.js +126 -25
- package/vscode/src/vs/workbench/services/userDataProfile/common/userDataProfile.js +6 -5
- package/vscode/src/vs/workbench/services/userDataSync/common/userDataSync.js +6 -14
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +6 -1
|
@@ -41,7 +41,13 @@ let DiffEditorInput = class DiffEditorInput extends SideBySideEditorInput {
|
|
|
41
41
|
else {
|
|
42
42
|
const originalName = this.original.getName();
|
|
43
43
|
const modifiedName = this.modified.getName();
|
|
44
|
-
name = localizeWithPath(
|
|
44
|
+
name = ( localizeWithPath(
|
|
45
|
+
'vs/workbench/common/editor/diffEditorInput',
|
|
46
|
+
'sideBySideLabels',
|
|
47
|
+
"{0} ↔ {1}",
|
|
48
|
+
originalName,
|
|
49
|
+
modifiedName
|
|
50
|
+
));
|
|
45
51
|
forceDescription = originalName === modifiedName;
|
|
46
52
|
}
|
|
47
53
|
let shortDescription;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { EditorInputWithPreferredResource, EditorInputCapabilities, Verbosity } from '../editor.js';
|
|
2
|
+
import { EditorInput } from './editorInput.js';
|
|
3
|
+
import { URI } from '../../../base/common/uri.js';
|
|
4
|
+
import { IFileService } from '../../../platform/files/common/files.js';
|
|
5
|
+
import { ILabelService } from '../../../platform/label/common/label.js';
|
|
6
|
+
import { IFilesConfigurationService } from '../../services/filesConfiguration/common/filesConfigurationService.js';
|
|
7
|
+
import { IMarkdownString } from '../../../base/common/htmlContent.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The base class for all editor inputs that open resources.
|
|
11
|
+
*/
|
|
12
|
+
declare abstract class AbstractResourceEditorInput extends EditorInput implements EditorInputWithPreferredResource {
|
|
13
|
+
readonly resource: URI;
|
|
14
|
+
protected readonly labelService: ILabelService;
|
|
15
|
+
protected readonly fileService: IFileService;
|
|
16
|
+
protected readonly filesConfigurationService: IFilesConfigurationService;
|
|
17
|
+
get capabilities(): EditorInputCapabilities;
|
|
18
|
+
private _preferredResource;
|
|
19
|
+
get preferredResource(): URI;
|
|
20
|
+
constructor(resource: URI, preferredResource: URI | undefined, labelService: ILabelService, fileService: IFileService, filesConfigurationService: IFilesConfigurationService);
|
|
21
|
+
private registerListeners;
|
|
22
|
+
private onLabelEvent;
|
|
23
|
+
private updateLabel;
|
|
24
|
+
setPreferredResource(preferredResource: URI): void;
|
|
25
|
+
private _name;
|
|
26
|
+
getName(): string;
|
|
27
|
+
getDescription(verbosity?: Verbosity): string | undefined;
|
|
28
|
+
private _shortDescription;
|
|
29
|
+
private get shortDescription();
|
|
30
|
+
private _mediumDescription;
|
|
31
|
+
private get mediumDescription();
|
|
32
|
+
private _longDescription;
|
|
33
|
+
private get longDescription();
|
|
34
|
+
private _shortTitle;
|
|
35
|
+
private get shortTitle();
|
|
36
|
+
private _mediumTitle;
|
|
37
|
+
private get mediumTitle();
|
|
38
|
+
private _longTitle;
|
|
39
|
+
private get longTitle();
|
|
40
|
+
getTitle(verbosity?: Verbosity): string;
|
|
41
|
+
isReadonly(): boolean | IMarkdownString;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { AbstractResourceEditorInput };
|
|
@@ -59,7 +59,13 @@ let SideBySideEditorInput = class SideBySideEditorInput extends EditorInput {
|
|
|
59
59
|
if (this.hasIdenticalSides) {
|
|
60
60
|
return this.primary.getName();
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return ( localizeWithPath(
|
|
63
|
+
'vs/workbench/common/editor/sideBySideEditorInput',
|
|
64
|
+
'sideBySideLabels',
|
|
65
|
+
"{0} - {1}",
|
|
66
|
+
this.secondary.getName(),
|
|
67
|
+
this.primary.getName()
|
|
68
|
+
));
|
|
63
69
|
}
|
|
64
70
|
getPreferredName() {
|
|
65
71
|
return this.preferredName;
|
|
@@ -87,7 +87,12 @@ let BaseTextEditorModel = class BaseTextEditorModel extends EditorModel {
|
|
|
87
87
|
if (lang && lang !== prevLang && !this.isDisposed()) {
|
|
88
88
|
this.setLanguageIdInternal(lang, LanguageDetectionLanguageEventSource);
|
|
89
89
|
const languageName = this.languageService.getLanguageName(lang);
|
|
90
|
-
this.accessibilityService.alert(localizeWithPath(
|
|
90
|
+
this.accessibilityService.alert(( localizeWithPath(
|
|
91
|
+
'vs/workbench/common/editor/textEditorModel',
|
|
92
|
+
'languageAutoDetected',
|
|
93
|
+
"Language {0} was automatically detected and set as the language mode.",
|
|
94
|
+
languageName ?? lang
|
|
95
|
+
)));
|
|
91
96
|
}
|
|
92
97
|
}
|
|
93
98
|
createTextEditorModel(value, resource, preferredLanguageId) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { GroupIdentifier, IUntypedEditorInput, IRevertOptions } from '../editor.js';
|
|
2
|
+
import { URI } from '../../../base/common/uri.js';
|
|
3
|
+
import { AbstractResourceEditorInput } from './resourceEditorInput.js';
|
|
4
|
+
import { ITextFileService, ITextFileSaveOptions } from '../../services/textfile/common/textfiles.js';
|
|
5
|
+
import { IEditorService } from '../../services/editor/common/editorService.js';
|
|
6
|
+
import { IFileService } from '../../../platform/files/common/files.js';
|
|
7
|
+
import { ILabelService } from '../../../platform/label/common/label.js';
|
|
8
|
+
import { IFilesConfigurationService } from '../../services/filesConfiguration/common/filesConfigurationService.js';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The base class for all editor inputs that open in text editors.
|
|
12
|
+
*/
|
|
13
|
+
declare abstract class AbstractTextResourceEditorInput extends AbstractResourceEditorInput {
|
|
14
|
+
protected readonly editorService: IEditorService;
|
|
15
|
+
protected readonly textFileService: ITextFileService;
|
|
16
|
+
constructor(resource: URI, preferredResource: URI | undefined, editorService: IEditorService, textFileService: ITextFileService, labelService: ILabelService, fileService: IFileService, filesConfigurationService: IFilesConfigurationService);
|
|
17
|
+
save(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise<IUntypedEditorInput | undefined>;
|
|
18
|
+
saveAs(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise<IUntypedEditorInput | undefined>;
|
|
19
|
+
private doSave;
|
|
20
|
+
revert(group: GroupIdentifier, options?: IRevertOptions): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { AbstractTextResourceEditorInput };
|
|
@@ -9,6 +9,7 @@ import { IContextKeyService } from '../../platform/contextkey/common/contextkey.
|
|
|
9
9
|
import { IEncodingSupport, ILanguageSupport } from '../services/textfile/common/textfiles.js';
|
|
10
10
|
import { IEditorGroup } from '../services/editor/common/editorGroupsService.js';
|
|
11
11
|
import { IComposite, ICompositeControl } from './composite.js';
|
|
12
|
+
import { IExtUri } from '../../base/common/resources.js';
|
|
12
13
|
|
|
13
14
|
interface IEditorDescriptor<T extends IEditorPane> {
|
|
14
15
|
/**
|
|
@@ -519,6 +520,20 @@ interface EditorInputWithOptions {
|
|
|
519
520
|
interface EditorInputWithOptionsAndGroup extends EditorInputWithOptions {
|
|
520
521
|
group: IEditorGroup;
|
|
521
522
|
}
|
|
523
|
+
/**
|
|
524
|
+
* Context passed into `EditorPane#setInput` to give additional
|
|
525
|
+
* context information around why the editor was opened.
|
|
526
|
+
*/
|
|
527
|
+
interface IEditorOpenContext {
|
|
528
|
+
/**
|
|
529
|
+
* An indicator if the editor input is new for the group the editor is in.
|
|
530
|
+
* An editor is new for a group if it was not part of the group before and
|
|
531
|
+
* otherwise was already opened in the group and just became the active editor.
|
|
532
|
+
*
|
|
533
|
+
* This hint can e.g. be used to decide whether to restore view state or not.
|
|
534
|
+
*/
|
|
535
|
+
newInGroup?: boolean;
|
|
536
|
+
}
|
|
522
537
|
interface IEditorIdentifier {
|
|
523
538
|
groupId: GroupIdentifier;
|
|
524
539
|
editor: EditorInput;
|
|
@@ -675,6 +690,16 @@ declare const enum CloseDirection {
|
|
|
675
690
|
LEFT = 0,
|
|
676
691
|
RIGHT = 1
|
|
677
692
|
}
|
|
693
|
+
interface IEditorMemento<T> {
|
|
694
|
+
saveEditorState(group: IEditorGroup, resource: URI, state: T): void;
|
|
695
|
+
saveEditorState(group: IEditorGroup, editor: EditorInput, state: T): void;
|
|
696
|
+
loadEditorState(group: IEditorGroup, resource: URI): T | undefined;
|
|
697
|
+
loadEditorState(group: IEditorGroup, editor: EditorInput): T | undefined;
|
|
698
|
+
clearEditorState(resource: URI, group?: IEditorGroup): void;
|
|
699
|
+
clearEditorState(editor: EditorInput, group?: IEditorGroup): void;
|
|
700
|
+
clearEditorStateOnDispose(resource: URI, editor: EditorInput): void;
|
|
701
|
+
moveEditorState(source: URI, target: URI, comparer: IExtUri): void;
|
|
702
|
+
}
|
|
678
703
|
declare const enum EditorsOrder {
|
|
679
704
|
/**
|
|
680
705
|
* Editors sorted by most recent activity (most recent active first)
|
|
@@ -686,4 +711,4 @@ declare const enum EditorsOrder {
|
|
|
686
711
|
SEQUENTIAL = 1
|
|
687
712
|
}
|
|
688
713
|
|
|
689
|
-
export { AbstractEditorInput, CloseDirection, EditorCloseContext, EditorInputCapabilities, type EditorInputWithOptions, type EditorInputWithOptionsAndGroup, type EditorInputWithPreferredResource, EditorPaneSelectionChangeReason, EditorPaneSelectionCompareResult, EditorsOrder, type GroupIdentifier, GroupModelChangeKind, type IActiveEditorChangeEvent, type IEditorCloseEvent, type IEditorControl, type IEditorDescriptor, type IEditorIdentifier, type IEditorPane, type IEditorPaneSelection, type IEditorPaneSelectionChangeEvent, type IEditorPartOptions, type IEditorPartOptionsChangeEvent, type IEditorWillMoveEvent, type IEditorWillOpenEvent, type IFileEditorInput, type IFindEditorOptions, type IMatchEditorOptions, type IMoveResult, type IResourceDiffEditorInput, type IResourceMergeEditorInput, type IResourceMergeEditorInputSide, type IResourceSideBySideEditorInput, type IRevertOptions, type ISaveOptions, type ITextDiffEditorPane, type IUntitledTextResourceEditorInput, type IUntypedEditorInput, type IUntypedFileEditorInput, type IVisibleEditorPane, type PreventPinnedEditorClose, SaveReason, type SaveSource, SideBySideEditor, Verbosity };
|
|
714
|
+
export { AbstractEditorInput, CloseDirection, EditorCloseContext, EditorInputCapabilities, type EditorInputWithOptions, type EditorInputWithOptionsAndGroup, type EditorInputWithPreferredResource, EditorPaneSelectionChangeReason, EditorPaneSelectionCompareResult, EditorsOrder, type GroupIdentifier, GroupModelChangeKind, type IActiveEditorChangeEvent, type IEditorCloseEvent, type IEditorControl, type IEditorDescriptor, type IEditorIdentifier, type IEditorMemento, type IEditorOpenContext, type IEditorPane, type IEditorPaneSelection, type IEditorPaneSelectionChangeEvent, type IEditorPartOptions, type IEditorPartOptionsChangeEvent, type IEditorWillMoveEvent, type IEditorWillOpenEvent, type IFileEditorInput, type IFindEditorOptions, type IMatchEditorOptions, type IMoveResult, type IResourceDiffEditorInput, type IResourceMergeEditorInput, type IResourceMergeEditorInputSide, type IResourceSideBySideEditorInput, type IRevertOptions, type ISaveOptions, type ITextDiffEditorPane, type IUntitledTextResourceEditorInput, type IUntypedEditorInput, type IUntypedFileEditorInput, type IVisibleEditorPane, type PreventPinnedEditorClose, SaveReason, type SaveSource, SideBySideEditor, Verbosity };
|
|
@@ -15,8 +15,12 @@ const EditorExtensions = {
|
|
|
15
15
|
};
|
|
16
16
|
const DEFAULT_EDITOR_ASSOCIATION = {
|
|
17
17
|
id: 'default',
|
|
18
|
-
displayName: localizeWithPath(
|
|
19
|
-
|
|
18
|
+
displayName: ( localizeWithPath(
|
|
19
|
+
'vs/workbench/common/editor',
|
|
20
|
+
'promptOpenWith.defaultEditor.displayName',
|
|
21
|
+
"Text Editor"
|
|
22
|
+
)),
|
|
23
|
+
providerDisplayName: ( localizeWithPath('vs/workbench/common/editor', 'builtinProviderDisplayName', "Built-in"))
|
|
20
24
|
};
|
|
21
25
|
const SIDE_BY_SIDE_EDITOR_ID = 'workbench.editor.sidebysideEditor';
|
|
22
26
|
const TEXT_DIFF_EDITOR_ID = 'workbench.editors.textDiffEditor';
|
|
@@ -91,6 +95,19 @@ class SaveSourceFactory {
|
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
const SaveSourceRegistry = ( new SaveSourceFactory());
|
|
98
|
+
var EditorInputCapabilities;
|
|
99
|
+
( (function(EditorInputCapabilities) {
|
|
100
|
+
EditorInputCapabilities[EditorInputCapabilities["None"] = 0] = "None";
|
|
101
|
+
EditorInputCapabilities[EditorInputCapabilities["Readonly"] = 2] = "Readonly";
|
|
102
|
+
EditorInputCapabilities[EditorInputCapabilities["Untitled"] = 4] = "Untitled";
|
|
103
|
+
EditorInputCapabilities[EditorInputCapabilities["Singleton"] = 8] = "Singleton";
|
|
104
|
+
EditorInputCapabilities[EditorInputCapabilities["RequiresTrust"] = 16] = "RequiresTrust";
|
|
105
|
+
EditorInputCapabilities[EditorInputCapabilities["CanSplitInGroup"] = 32] = "CanSplitInGroup";
|
|
106
|
+
EditorInputCapabilities[EditorInputCapabilities["ForceDescription"] = 64] = "ForceDescription";
|
|
107
|
+
EditorInputCapabilities[EditorInputCapabilities["CanDropIntoEditor"] = 128] = "CanDropIntoEditor";
|
|
108
|
+
EditorInputCapabilities[EditorInputCapabilities["MultipleEditors"] = 256] = "MultipleEditors";
|
|
109
|
+
EditorInputCapabilities[EditorInputCapabilities["Scratchpad"] = 512] = "Scratchpad";
|
|
110
|
+
})(EditorInputCapabilities || (EditorInputCapabilities = {})));
|
|
94
111
|
class AbstractEditorInput extends Disposable {
|
|
95
112
|
}
|
|
96
113
|
function isEditorInput(editor) {
|
|
@@ -111,7 +128,7 @@ function isDiffEditorInput(editor) {
|
|
|
111
128
|
function createTooLargeFileError(group, input, options, message, preferencesService) {
|
|
112
129
|
return createEditorOpenError(message, [
|
|
113
130
|
toAction({
|
|
114
|
-
id: 'workbench.action.openLargeFile', label: localizeWithPath('vs/workbench/common/editor', 'openLargeFile', "Open Anyway"), run: () => {
|
|
131
|
+
id: 'workbench.action.openLargeFile', label: ( localizeWithPath('vs/workbench/common/editor', 'openLargeFile', "Open Anyway")), run: () => {
|
|
115
132
|
const fileEditorOptions = {
|
|
116
133
|
...options,
|
|
117
134
|
limits: {
|
|
@@ -122,7 +139,11 @@ function createTooLargeFileError(group, input, options, message, preferencesServ
|
|
|
122
139
|
}
|
|
123
140
|
}),
|
|
124
141
|
toAction({
|
|
125
|
-
id: 'workbench.action.configureEditorLargeFileConfirmation', label:
|
|
142
|
+
id: 'workbench.action.configureEditorLargeFileConfirmation', label: ( localizeWithPath(
|
|
143
|
+
'vs/workbench/common/editor',
|
|
144
|
+
'configureEditorLargeFileConfirmation',
|
|
145
|
+
"Configure Limit"
|
|
146
|
+
)), run: () => {
|
|
126
147
|
return preferencesService.openUserSettings({ query: 'workbench.editorLargeFileConfirmation' });
|
|
127
148
|
}
|
|
128
149
|
}),
|
|
@@ -383,4 +404,4 @@ function createEditorOpenError(messageOrError, actions, options) {
|
|
|
383
404
|
error.allowDialog = options?.allowDialog;
|
|
384
405
|
return error;
|
|
385
406
|
}
|
|
386
|
-
export { AbstractEditorInput, BINARY_DIFF_EDITOR_ID, CloseDirection, DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorCloseMethod, EditorExtensions, EditorResourceAccessor, EditorsOrder, SIDE_BY_SIDE_EDITOR_ID, SaveSourceRegistry, SideBySideEditor, TEXT_DIFF_EDITOR_ID, createEditorOpenError, createTooLargeFileError, findViewStateForEditor, isDiffEditorInput, isEditorIdentifier, isEditorInput, isEditorInputWithOptions, isEditorInputWithOptionsAndGroup, isEditorOpenError, isEditorPaneWithSelection, isResourceDiffEditorInput, isResourceEditorInput, isResourceMergeEditorInput, isResourceSideBySideEditorInput, isSideBySideEditorInput, isTextEditorViewState, isUntitledResourceEditorInput, pathsToEditors, preventEditorClose };
|
|
407
|
+
export { AbstractEditorInput, BINARY_DIFF_EDITOR_ID, CloseDirection, DEFAULT_EDITOR_ASSOCIATION, EditorCloseContext, EditorCloseMethod, EditorExtensions, EditorInputCapabilities, EditorResourceAccessor, EditorsOrder, SIDE_BY_SIDE_EDITOR_ID, SaveSourceRegistry, SideBySideEditor, TEXT_DIFF_EDITOR_ID, createEditorOpenError, createTooLargeFileError, findViewStateForEditor, isDiffEditorInput, isEditorIdentifier, isEditorInput, isEditorInputWithOptions, isEditorInputWithOptionsAndGroup, isEditorOpenError, isEditorPaneWithSelection, isResourceDiffEditorInput, isResourceEditorInput, isResourceMergeEditorInput, isResourceSideBySideEditorInput, isSideBySideEditorInput, isTextEditorViewState, isUntitledResourceEditorInput, pathsToEditors, preventEditorClose };
|