@codingame/monaco-vscode-extensions-service-override 11.1.1 → 12.0.0
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/webWorkerExtensionHostIframe.html +2 -2
- package/index.d.ts +40 -2
- package/index.js +266 -1
- package/package.json +81 -11
- package/vscode/src/vs/base/common/console.d.ts +22 -0
- package/vscode/src/vs/base/common/console.js +3 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.d.ts +24 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +54 -53
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.d.ts +14 -0
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +4 -2
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.d.ts +1 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +1 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.d.ts +30 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +73 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +67 -39
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +12 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +65 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +33 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +169 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +50 -58
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +13 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.d.ts +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +82 -75
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.d.ts +14 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +58 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +40 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +23 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +8 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.d.ts +65 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +15 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +37 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +53 -52
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +60 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +97 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.d.ts +34 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.d.ts +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +42 -45
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.d.ts +32 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +64 -60
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +108 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +31 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +18 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +23 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +6 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +46 -47
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.d.ts +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +39 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +13 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +19 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +52 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +11 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +9 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.d.ts +13 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.d.ts +21 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.d.ts +15 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +6 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.d.ts +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +174 -195
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.d.ts +20 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +27 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +7 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.d.ts +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +6 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.d.ts +16 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +45 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +41 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.d.ts +44 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +29 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +21 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.d.ts +17 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.d.ts +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +9 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.d.ts +26 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +19 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +10 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +71 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +34 -35
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.d.ts +12 -0
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +1 -0
- package/vscode/src/vs/workbench/common/comments.d.ts +10 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +39 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +14 -12
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.d.ts +16 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +6 -4
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.d.ts +25 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +62 -60
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +74 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +63 -45
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +57 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +16 -12
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.d.ts +20 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +3 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +203 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +217 -180
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +32 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.d.ts +8 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +68 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +37 -39
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +40 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +38 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +15 -14
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.d.ts +2 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +4 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.d.ts +14 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +18 -19
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.d.ts +3 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +8 -7
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +54 -0
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +4 -3
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.d.ts +4 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +68 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +12 -9
- package/_virtual/semver.js +0 -5
- package/extensions.js +0 -257
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -11
- package/tools/url.js +0 -10
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { toErrorMessage } from 'vscode/vscode/vs/base/common/errorMessage';
|
|
3
4
|
import { dispose, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
@@ -6,6 +7,7 @@ import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
|
6
7
|
import { shouldSynchronizeModel } from 'vscode/vscode/vs/editor/common/model';
|
|
7
8
|
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
8
9
|
import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
|
|
10
|
+
import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
|
|
9
11
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
10
12
|
import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
11
13
|
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
@@ -113,8 +115,8 @@ let MainThreadDocuments = class MainThreadDocuments extends Disposable {
|
|
|
113
115
|
}
|
|
114
116
|
}));
|
|
115
117
|
this._store.add(workingCopyFileService.onDidRunWorkingCopyFileOperation(e => {
|
|
116
|
-
const isMove = e.operation ===
|
|
117
|
-
if (isMove || e.operation ===
|
|
118
|
+
const isMove = e.operation === FileOperation.MOVE;
|
|
119
|
+
if (isMove || e.operation === FileOperation.DELETE) {
|
|
118
120
|
for (const pair of e.files) {
|
|
119
121
|
const removed = isMove ? pair.source : pair.target;
|
|
120
122
|
if (removed) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ICodeEditor } from "vscode/vscode/vs/editor/browser/editorBrowser";
|
|
2
|
+
import { ICodeEditorService } from "vscode/vscode/vs/editor/browser/services/codeEditorService";
|
|
3
|
+
import { IModelService } from "vscode/vscode/vs/editor/common/services/model";
|
|
4
|
+
import { ITextModelService } from "vscode/vscode/vs/editor/common/services/resolverService";
|
|
5
|
+
import { IFileService } from "vscode/vscode/vs/platform/files/common/files.service";
|
|
6
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
7
|
+
import { MainThreadTextEditor } from "./mainThreadEditor.js";
|
|
8
|
+
import { IEditorPane } from "vscode/vscode/vs/workbench/common/editor";
|
|
9
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
10
|
+
import { IEditorGroupsService } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
11
|
+
import { ITextFileService } from "vscode/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
12
|
+
import { IWorkbenchEnvironmentService } from "vscode/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
13
|
+
import { IWorkingCopyFileService } from "vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service";
|
|
14
|
+
import { IUriIdentityService } from "vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
15
|
+
import { IClipboardService } from "vscode/vscode/vs/platform/clipboard/common/clipboardService.service";
|
|
16
|
+
import { IPathService } from "vscode/vscode/vs/workbench/services/path/common/pathService.service";
|
|
17
|
+
import { IPaneCompositePartService } from "vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service";
|
|
18
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
19
|
+
import { IDirtyDiffModelService } from "vscode/vscode/vs/workbench/contrib/scm/browser/diff.service";
|
|
20
|
+
export declare class MainThreadDocumentsAndEditors {
|
|
21
|
+
private readonly _modelService;
|
|
22
|
+
private readonly _textFileService;
|
|
23
|
+
private readonly _editorService;
|
|
24
|
+
private readonly _editorGroupService;
|
|
25
|
+
private readonly _clipboardService;
|
|
26
|
+
private readonly _toDispose;
|
|
27
|
+
private readonly _proxy;
|
|
28
|
+
private readonly _mainThreadDocuments;
|
|
29
|
+
private readonly _mainThreadEditors;
|
|
30
|
+
private readonly _textEditors;
|
|
31
|
+
constructor(extHostContext: IExtHostContext, _modelService: IModelService, _textFileService: ITextFileService, _editorService: IEditorService, codeEditorService: ICodeEditorService, fileService: IFileService, textModelResolverService: ITextModelService, _editorGroupService: IEditorGroupsService, paneCompositeService: IPaneCompositePartService, environmentService: IWorkbenchEnvironmentService, workingCopyFileService: IWorkingCopyFileService, uriIdentityService: IUriIdentityService, _clipboardService: IClipboardService, pathService: IPathService, configurationService: IConfigurationService, dirtyDiffModelService: IDirtyDiffModelService);
|
|
32
|
+
dispose(): void;
|
|
33
|
+
private _onDelta;
|
|
34
|
+
private _toModelAddData;
|
|
35
|
+
private _toTextEditorAddData;
|
|
36
|
+
private _findEditorPosition;
|
|
37
|
+
findTextEditorIdFor(editorPane: IEditorPane): string | undefined;
|
|
38
|
+
getIdOfCodeEditor(codeEditor: ICodeEditor): string | undefined;
|
|
39
|
+
getEditor(id: string): MainThreadTextEditor | undefined;
|
|
40
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
4
|
import { DisposableStore, DisposableMap, combinedDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
5
|
import { isCodeEditor, isDiffEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
@@ -12,8 +13,7 @@ import { MainThreadDocuments } from './mainThreadDocuments.js';
|
|
|
12
13
|
import { MainThreadTextEditor } from './mainThreadEditor.js';
|
|
13
14
|
import { MainThreadTextEditors } from './mainThreadEditors.js';
|
|
14
15
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
15
|
-
import {
|
|
16
|
-
import { editorGroupToColumn } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupColumn';
|
|
16
|
+
import { editorGroupToColumn } from '@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/services/editor/common/editorGroupColumn';
|
|
17
17
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
18
18
|
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
19
19
|
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
@@ -24,7 +24,9 @@ import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/cl
|
|
|
24
24
|
import { IPathService } from 'vscode/vscode/vs/workbench/services/path/common/pathService.service';
|
|
25
25
|
import { diffSets, diffMaps } from 'vscode/vscode/vs/base/common/collections';
|
|
26
26
|
import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
|
|
27
|
+
import { ViewContainerLocation } from 'vscode/vscode/vs/workbench/common/views';
|
|
27
28
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
29
|
+
import { IDirtyDiffModelService } from 'vscode/vscode/vs/workbench/contrib/scm/browser/diff.service';
|
|
28
30
|
|
|
29
31
|
class TextEditorSnapshot {
|
|
30
32
|
constructor(editor) {
|
|
@@ -80,6 +82,11 @@ class DocumentAndEditorState {
|
|
|
80
82
|
this.activeEditor = activeEditor;
|
|
81
83
|
}
|
|
82
84
|
}
|
|
85
|
+
var ActiveEditorOrder;
|
|
86
|
+
(function (ActiveEditorOrder) {
|
|
87
|
+
ActiveEditorOrder[ActiveEditorOrder["Editor"] = 0] = "Editor";
|
|
88
|
+
ActiveEditorOrder[ActiveEditorOrder["Panel"] = 1] = "Panel";
|
|
89
|
+
})(ActiveEditorOrder || (ActiveEditorOrder = {}));
|
|
83
90
|
let MainThreadDocumentAndEditorStateComputer = class MainThreadDocumentAndEditorStateComputer {
|
|
84
91
|
constructor(_onDidChangeState, _modelService, _codeEditorService, _editorService, _paneCompositeService) {
|
|
85
92
|
this._onDidChangeState = _onDidChangeState;
|
|
@@ -89,16 +96,16 @@ let MainThreadDocumentAndEditorStateComputer = class MainThreadDocumentAndEditor
|
|
|
89
96
|
this._paneCompositeService = _paneCompositeService;
|
|
90
97
|
this._toDispose = ( new DisposableStore());
|
|
91
98
|
this._toDisposeOnEditorRemove = ( new DisposableMap());
|
|
92
|
-
this._activeEditorOrder =
|
|
99
|
+
this._activeEditorOrder = ActiveEditorOrder.Editor;
|
|
93
100
|
this._modelService.onModelAdded(this._updateStateOnModelAdd, this, this._toDispose);
|
|
94
101
|
this._modelService.onModelRemoved(_ => this._updateState(), this, this._toDispose);
|
|
95
102
|
this._editorService.onDidActiveEditorChange(_ => this._updateState(), this, this._toDispose);
|
|
96
103
|
this._codeEditorService.onCodeEditorAdd(this._onDidAddEditor, this, this._toDispose);
|
|
97
104
|
this._codeEditorService.onCodeEditorRemove(this._onDidRemoveEditor, this, this._toDispose);
|
|
98
105
|
this._codeEditorService.listCodeEditors().forEach(this._onDidAddEditor, this);
|
|
99
|
-
Event.filter(this._paneCompositeService.onDidPaneCompositeOpen, event => event.viewContainerLocation ===
|
|
100
|
-
Event.filter(this._paneCompositeService.onDidPaneCompositeClose, event => event.viewContainerLocation ===
|
|
101
|
-
this._editorService.onDidVisibleEditorsChange(_ => this._activeEditorOrder =
|
|
106
|
+
Event.filter(this._paneCompositeService.onDidPaneCompositeOpen, event => event.viewContainerLocation === ViewContainerLocation.Panel)(_ => this._activeEditorOrder = ActiveEditorOrder.Panel, undefined, this._toDispose);
|
|
107
|
+
Event.filter(this._paneCompositeService.onDidPaneCompositeClose, event => event.viewContainerLocation === ViewContainerLocation.Panel)(_ => this._activeEditorOrder = ActiveEditorOrder.Editor, undefined, this._toDispose);
|
|
108
|
+
this._editorService.onDidVisibleEditorsChange(_ => this._activeEditorOrder = ActiveEditorOrder.Editor, undefined, this._toDispose);
|
|
102
109
|
this._updateState();
|
|
103
110
|
}
|
|
104
111
|
dispose() {
|
|
@@ -158,7 +165,7 @@ let MainThreadDocumentAndEditorStateComputer = class MainThreadDocumentAndEditor
|
|
|
158
165
|
}
|
|
159
166
|
if (!activeEditor) {
|
|
160
167
|
let candidate;
|
|
161
|
-
if (this._activeEditorOrder ===
|
|
168
|
+
if (this._activeEditorOrder === ActiveEditorOrder.Editor) {
|
|
162
169
|
candidate = this._getActiveEditorFromEditorPart() || this._getActiveEditorFromPanel();
|
|
163
170
|
}
|
|
164
171
|
else {
|
|
@@ -180,8 +187,8 @@ let MainThreadDocumentAndEditorStateComputer = class MainThreadDocumentAndEditor
|
|
|
180
187
|
}
|
|
181
188
|
}
|
|
182
189
|
_getActiveEditorFromPanel() {
|
|
183
|
-
const panel = this._paneCompositeService.getActivePaneComposite(
|
|
184
|
-
if (panel
|
|
190
|
+
const panel = this._paneCompositeService.getActivePaneComposite(ViewContainerLocation.Panel);
|
|
191
|
+
if (panel !== undefined) {
|
|
185
192
|
const control = panel.getControl();
|
|
186
193
|
if (isCodeEditor(control)) {
|
|
187
194
|
return control;
|
|
@@ -204,7 +211,7 @@ MainThreadDocumentAndEditorStateComputer = ( __decorate([
|
|
|
204
211
|
( __param(4, IPaneCompositePartService))
|
|
205
212
|
], MainThreadDocumentAndEditorStateComputer));
|
|
206
213
|
let MainThreadDocumentsAndEditors = class MainThreadDocumentsAndEditors {
|
|
207
|
-
constructor(extHostContext, _modelService, _textFileService, _editorService, codeEditorService, fileService, textModelResolverService, _editorGroupService, paneCompositeService, environmentService, workingCopyFileService, uriIdentityService, _clipboardService, pathService, configurationService) {
|
|
214
|
+
constructor(extHostContext, _modelService, _textFileService, _editorService, codeEditorService, fileService, textModelResolverService, _editorGroupService, paneCompositeService, environmentService, workingCopyFileService, uriIdentityService, _clipboardService, pathService, configurationService, dirtyDiffModelService) {
|
|
208
215
|
this._modelService = _modelService;
|
|
209
216
|
this._textFileService = _textFileService;
|
|
210
217
|
this._editorService = _editorService;
|
|
@@ -231,7 +238,9 @@ let MainThreadDocumentsAndEditors = class MainThreadDocumentsAndEditors {
|
|
|
231
238
|
codeEditorService,
|
|
232
239
|
this._editorService,
|
|
233
240
|
this._editorGroupService,
|
|
234
|
-
configurationService
|
|
241
|
+
configurationService,
|
|
242
|
+
dirtyDiffModelService,
|
|
243
|
+
uriIdentityService
|
|
235
244
|
)));
|
|
236
245
|
extHostContext.set(MainContext.MainThreadTextEditors, this._mainThreadEditors);
|
|
237
246
|
this._toDispose.add(( new MainThreadDocumentAndEditorStateComputer(
|
|
@@ -364,7 +373,8 @@ MainThreadDocumentsAndEditors = __decorate([
|
|
|
364
373
|
( __param(11, IUriIdentityService)),
|
|
365
374
|
( __param(12, IClipboardService)),
|
|
366
375
|
( __param(13, IPathService)),
|
|
367
|
-
( __param(14, IConfigurationService))
|
|
376
|
+
( __param(14, IConfigurationService)),
|
|
377
|
+
( __param(15, IDirtyDiffModelService))
|
|
368
378
|
], MainThreadDocumentsAndEditors);
|
|
369
379
|
|
|
370
380
|
export { MainThreadDocumentsAndEditors };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { MainThreadDownloadServiceShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
3
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
4
|
+
import { IDownloadService } from "vscode/vscode/vs/platform/download/common/download.service";
|
|
5
|
+
import { UriComponents } from "vscode/vscode/vs/base/common/uri";
|
|
6
|
+
export declare class MainThreadDownloadService extends Disposable implements MainThreadDownloadServiceShape {
|
|
7
|
+
private readonly downloadService;
|
|
8
|
+
constructor(extHostContext: IExtHostContext, downloadService: IDownloadService);
|
|
9
|
+
$download(uri: UriComponents, to: UriComponents): Promise<void>;
|
|
10
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IInstantiationService } from "vscode/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
3
|
+
import { IEditSessionIdentityService } from "vscode/vscode/vs/platform/workspace/common/editSessions.service";
|
|
4
|
+
export declare class EditSessionIdentityCreateParticipant {
|
|
5
|
+
private readonly _editSessionIdentityService;
|
|
6
|
+
private _saveParticipantDisposable;
|
|
7
|
+
constructor(extHostContext: IExtHostContext, instantiationService: IInstantiationService, _editSessionIdentityService: IEditSessionIdentityService);
|
|
8
|
+
dispose(): void;
|
|
9
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
|
|
2
3
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
3
4
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
5
|
import { extHostCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -9,13 +10,13 @@ import { ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.pr
|
|
|
9
10
|
class ExtHostEditSessionIdentityCreateParticipant {
|
|
10
11
|
constructor(extHostContext) {
|
|
11
12
|
this.timeout = 10000;
|
|
12
|
-
this._proxy = (
|
|
13
|
+
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostWorkspace));
|
|
13
14
|
}
|
|
14
15
|
async participate(workspaceFolder, token) {
|
|
15
|
-
const p = (
|
|
16
|
-
setTimeout(() => reject((
|
|
16
|
+
const p = ( new Promise((resolve, reject) => {
|
|
17
|
+
setTimeout(() => reject(( new Error(( localize(2258, "Aborted onWillCreateEditSessionIdentity-event after 10000ms"))))), this.timeout);
|
|
17
18
|
this._proxy.$onWillCreateEditSessionIdentity(workspaceFolder.uri, token, this.timeout).then(resolve, reject);
|
|
18
|
-
}))
|
|
19
|
+
}));
|
|
19
20
|
return raceCancellationError(p, token);
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -30,8 +31,8 @@ let EditSessionIdentityCreateParticipant = class EditSessionIdentityCreatePartic
|
|
|
30
31
|
};
|
|
31
32
|
EditSessionIdentityCreateParticipant = __decorate([
|
|
32
33
|
extHostCustomer,
|
|
33
|
-
(
|
|
34
|
-
(
|
|
34
|
+
( __param(1, IInstantiationService)),
|
|
35
|
+
( __param(2, IEditSessionIdentityService))
|
|
35
36
|
], EditSessionIdentityCreateParticipant);
|
|
36
37
|
|
|
37
38
|
export { EditSessionIdentityCreateParticipant };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Event } from "vscode/vscode/vs/base/common/event";
|
|
2
|
+
import { ICodeEditor } from "vscode/vscode/vs/editor/browser/editorBrowser";
|
|
3
|
+
import { IRange, Range } from "vscode/vscode/vs/editor/common/core/range";
|
|
4
|
+
import { ISelection, Selection } from "vscode/vscode/vs/editor/common/core/selection";
|
|
5
|
+
import { IDecorationOptions } from "vscode/vscode/vs/editor/common/editorCommon";
|
|
6
|
+
import { ITextModel } from "vscode/vscode/vs/editor/common/model";
|
|
7
|
+
import { ISingleEditOperation } from "vscode/vscode/vs/editor/common/core/editOperation";
|
|
8
|
+
import { IModelService } from "vscode/vscode/vs/editor/common/services/model";
|
|
9
|
+
import { IApplyEditsOptions, IEditorPropertiesChangeData, IResolvedTextEditorConfiguration, ITextEditorConfigurationUpdate, IUndoStopOptions, TextEditorRevealType } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
10
|
+
import { IEditorPane } from "vscode/vscode/vs/workbench/common/editor";
|
|
11
|
+
import { IClipboardService } from "vscode/vscode/vs/platform/clipboard/common/clipboardService.service";
|
|
12
|
+
import { MainThreadDocuments } from "./mainThreadDocuments.js";
|
|
13
|
+
export interface IFocusTracker {
|
|
14
|
+
onGainedFocus(): void;
|
|
15
|
+
onLostFocus(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class MainThreadTextEditorProperties {
|
|
18
|
+
readonly selections: Selection[];
|
|
19
|
+
readonly options: IResolvedTextEditorConfiguration;
|
|
20
|
+
readonly visibleRanges: Range[];
|
|
21
|
+
static readFromEditor(previousProperties: MainThreadTextEditorProperties | null, model: ITextModel, codeEditor: ICodeEditor | null): MainThreadTextEditorProperties;
|
|
22
|
+
private static _readSelectionsFromCodeEditor;
|
|
23
|
+
private static _readOptionsFromCodeEditor;
|
|
24
|
+
private static _readVisibleRangesFromCodeEditor;
|
|
25
|
+
constructor(selections: Selection[], options: IResolvedTextEditorConfiguration, visibleRanges: Range[]);
|
|
26
|
+
generateDelta(oldProps: MainThreadTextEditorProperties | null, selectionChangeSource: string | null): IEditorPropertiesChangeData | null;
|
|
27
|
+
private static _selectionsEqual;
|
|
28
|
+
private static _rangesEqual;
|
|
29
|
+
private static _optionsEqual;
|
|
30
|
+
}
|
|
31
|
+
export declare class MainThreadTextEditor {
|
|
32
|
+
private readonly _id;
|
|
33
|
+
private readonly _model;
|
|
34
|
+
private readonly _mainThreadDocuments;
|
|
35
|
+
private readonly _modelService;
|
|
36
|
+
private readonly _clipboardService;
|
|
37
|
+
private readonly _modelListeners;
|
|
38
|
+
private _codeEditor;
|
|
39
|
+
private readonly _focusTracker;
|
|
40
|
+
private readonly _codeEditorListeners;
|
|
41
|
+
private _properties;
|
|
42
|
+
private readonly _onPropertiesChanged;
|
|
43
|
+
constructor(id: string, model: ITextModel, codeEditor: ICodeEditor, focusTracker: IFocusTracker, mainThreadDocuments: MainThreadDocuments, modelService: IModelService, clipboardService: IClipboardService);
|
|
44
|
+
dispose(): void;
|
|
45
|
+
private _updatePropertiesNow;
|
|
46
|
+
private _setProperties;
|
|
47
|
+
getId(): string;
|
|
48
|
+
getModel(): ITextModel;
|
|
49
|
+
getCodeEditor(): ICodeEditor | null;
|
|
50
|
+
hasCodeEditor(codeEditor: ICodeEditor | null): boolean;
|
|
51
|
+
setCodeEditor(codeEditor: ICodeEditor | null): void;
|
|
52
|
+
isVisible(): boolean;
|
|
53
|
+
getProperties(): MainThreadTextEditorProperties;
|
|
54
|
+
get onPropertiesChanged(): Event<IEditorPropertiesChangeData>;
|
|
55
|
+
setSelections(selections: ISelection[]): void;
|
|
56
|
+
private _setIndentConfiguration;
|
|
57
|
+
setConfiguration(newConfiguration: ITextEditorConfigurationUpdate): void;
|
|
58
|
+
setDecorations(key: string, ranges: IDecorationOptions[]): void;
|
|
59
|
+
setDecorationsFast(key: string, _ranges: number[]): void;
|
|
60
|
+
revealRange(range: IRange, revealType: TextEditorRevealType): void;
|
|
61
|
+
isFocused(): boolean;
|
|
62
|
+
matches(editor: IEditorPane): boolean;
|
|
63
|
+
applyEdits(versionIdCheck: number, edits: ISingleEditOperation[], opts: IApplyEditsOptions): boolean;
|
|
64
|
+
insertSnippet(modelVersionId: number, template: string, ranges: readonly IRange[], opts: IUndoStopOptions): Promise<boolean>;
|
|
65
|
+
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
|
|
1
2
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
2
3
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { TextEditorCursorStyle, cursorStyleToString } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
4
|
+
import { EditorOption, TextEditorCursorStyle, RenderLineNumbersType, cursorStyleToString } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
4
5
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
5
6
|
import { Selection } from 'vscode/vscode/vs/editor/common/core/selection';
|
|
7
|
+
import { ScrollType } from 'vscode/vscode/vs/editor/common/editorCommon';
|
|
6
8
|
import { SnippetController2 } from 'vscode/vscode/vs/editor/contrib/snippet/browser/snippetController2';
|
|
7
9
|
import { TextEditorRevealType } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
8
10
|
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
9
|
-
import { EditorState } from 'vscode/vscode/vs/editor/contrib/editorState/browser/editorState';
|
|
11
|
+
import { EditorState, CodeEditorStateFlag } from 'vscode/vscode/vs/editor/contrib/editorState/browser/editorState';
|
|
10
12
|
import { SnippetParser } from 'vscode/vscode/vs/editor/contrib/snippet/browser/snippetParser';
|
|
11
13
|
|
|
12
14
|
class MainThreadTextEditorProperties {
|
|
@@ -42,8 +44,8 @@ class MainThreadTextEditorProperties {
|
|
|
42
44
|
let lineNumbers;
|
|
43
45
|
if (codeEditor) {
|
|
44
46
|
const options = codeEditor.getOptions();
|
|
45
|
-
const lineNumbersOpts = options.get(
|
|
46
|
-
cursorStyle = options.get(
|
|
47
|
+
const lineNumbersOpts = options.get(EditorOption.lineNumbers);
|
|
48
|
+
cursorStyle = options.get(EditorOption.cursorStyle);
|
|
47
49
|
lineNumbers = lineNumbersOpts.renderType;
|
|
48
50
|
}
|
|
49
51
|
else if (previousProperties) {
|
|
@@ -52,7 +54,7 @@ class MainThreadTextEditorProperties {
|
|
|
52
54
|
}
|
|
53
55
|
else {
|
|
54
56
|
cursorStyle = TextEditorCursorStyle.Line;
|
|
55
|
-
lineNumbers =
|
|
57
|
+
lineNumbers = RenderLineNumbersType.On;
|
|
56
58
|
}
|
|
57
59
|
const modelOptions = model.getOptions();
|
|
58
60
|
return {
|
|
@@ -284,13 +286,13 @@ class MainThreadTextEditor {
|
|
|
284
286
|
if (typeof newConfiguration.lineNumbers !== 'undefined') {
|
|
285
287
|
let lineNumbers;
|
|
286
288
|
switch (newConfiguration.lineNumbers) {
|
|
287
|
-
case
|
|
289
|
+
case RenderLineNumbersType.On:
|
|
288
290
|
lineNumbers = 'on';
|
|
289
291
|
break;
|
|
290
|
-
case
|
|
292
|
+
case RenderLineNumbersType.Relative:
|
|
291
293
|
lineNumbers = 'relative';
|
|
292
294
|
break;
|
|
293
|
-
case
|
|
295
|
+
case RenderLineNumbersType.Interval:
|
|
294
296
|
lineNumbers = 'interval';
|
|
295
297
|
break;
|
|
296
298
|
default:
|
|
@@ -323,16 +325,16 @@ class MainThreadTextEditor {
|
|
|
323
325
|
}
|
|
324
326
|
switch (revealType) {
|
|
325
327
|
case TextEditorRevealType.Default:
|
|
326
|
-
this._codeEditor.revealRange(range,
|
|
328
|
+
this._codeEditor.revealRange(range, ScrollType.Smooth);
|
|
327
329
|
break;
|
|
328
330
|
case TextEditorRevealType.InCenter:
|
|
329
|
-
this._codeEditor.revealRangeInCenter(range,
|
|
331
|
+
this._codeEditor.revealRangeInCenter(range, ScrollType.Smooth);
|
|
330
332
|
break;
|
|
331
333
|
case TextEditorRevealType.InCenterIfOutsideViewport:
|
|
332
|
-
this._codeEditor.revealRangeInCenterIfOutsideViewport(range,
|
|
334
|
+
this._codeEditor.revealRangeInCenterIfOutsideViewport(range, ScrollType.Smooth);
|
|
333
335
|
break;
|
|
334
336
|
case TextEditorRevealType.AtTop:
|
|
335
|
-
this._codeEditor.revealRangeAtTop(range,
|
|
337
|
+
this._codeEditor.revealRangeAtTop(range, ScrollType.Smooth);
|
|
336
338
|
break;
|
|
337
339
|
default:
|
|
338
340
|
console.warn(`Unknown revealType: ${revealType}`);
|
|
@@ -384,10 +386,7 @@ class MainThreadTextEditor {
|
|
|
384
386
|
let clipboardText;
|
|
385
387
|
const needsTemplate = SnippetParser.guessNeedsClipboard(template);
|
|
386
388
|
if (needsTemplate) {
|
|
387
|
-
const state = ( new EditorState(
|
|
388
|
-
this._codeEditor,
|
|
389
|
-
1 | 4
|
|
390
|
-
));
|
|
389
|
+
const state = ( new EditorState(this._codeEditor, CodeEditorStateFlag.Value | CodeEditorStateFlag.Position));
|
|
391
390
|
clipboardText = await this._clipboardService.readText();
|
|
392
391
|
if (!state.validate(this._codeEditor)) {
|
|
393
392
|
return false;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { IConfigurationService } from "vscode/vscode/vs/platform/configuration/common/configuration.service";
|
|
2
|
+
import { ILogService } from "vscode/vscode/vs/platform/log/common/log.service";
|
|
3
|
+
import { MainThreadEditorTabsShape } from "vscode/vscode/vs/workbench/api/common/extHost.protocol";
|
|
4
|
+
import { EditorGroupColumn } from "@codingame/monaco-vscode-f48982c4-9e82-55e2-b800-20e6d1e6096f-common/vscode/vs/workbench/services/editor/common/editorGroupColumn";
|
|
5
|
+
import { IEditorGroupsService } from "vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
6
|
+
import { IEditorService } from "vscode/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
7
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
8
|
+
export declare class MainThreadEditorTabs implements MainThreadEditorTabsShape {
|
|
9
|
+
private readonly _editorGroupsService;
|
|
10
|
+
private readonly _configurationService;
|
|
11
|
+
private readonly _logService;
|
|
12
|
+
private readonly _dispoables;
|
|
13
|
+
private readonly _proxy;
|
|
14
|
+
private _tabGroupModel;
|
|
15
|
+
private readonly _groupLookup;
|
|
16
|
+
private readonly _tabInfoLookup;
|
|
17
|
+
private readonly _multiDiffEditorInputListeners;
|
|
18
|
+
constructor(extHostContext: IExtHostContext, _editorGroupsService: IEditorGroupsService, _configurationService: IConfigurationService, _logService: ILogService, editorService: IEditorService);
|
|
19
|
+
dispose(): void;
|
|
20
|
+
private _buildTabObject;
|
|
21
|
+
private _editorInputToDto;
|
|
22
|
+
private _generateTabId;
|
|
23
|
+
private _onDidGroupActivate;
|
|
24
|
+
private _onDidTabLabelChange;
|
|
25
|
+
private _onDidTabOpen;
|
|
26
|
+
private _onDidTabClose;
|
|
27
|
+
private _onDidTabActiveChange;
|
|
28
|
+
private _onDidTabDirty;
|
|
29
|
+
private _onDidTabPinChange;
|
|
30
|
+
private _onDidTabPreviewChange;
|
|
31
|
+
private _onDidTabMove;
|
|
32
|
+
private _createTabsModel;
|
|
33
|
+
private _updateTabsModel;
|
|
34
|
+
$moveTab(tabId: string, index: number, viewColumn: EditorGroupColumn, preserveFocus?: boolean): void;
|
|
35
|
+
$closeTab(tabIds: string[], preserveFocus?: boolean): Promise<boolean>;
|
|
36
|
+
$closeGroup(groupIds: number[], preserveFocus?: boolean): Promise<boolean>;
|
|
37
|
+
}
|