@codingame/monaco-vscode-notebook-service-override 22.1.7 → 22.1.9
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/index.js +2 -1
- package/package.json +24 -23
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/cellDiagnosticsActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellDiagnostics/diagnosticCellStatusBarContrib.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/contributedStatusBarItemController.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFind.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/navigation/arrow.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/cellChatActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/replEditorAccessibleView.js +49 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.d.ts +15 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js +405 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.d.ts +17 -0
- package/vscode/src/vs/workbench/contrib/replNotebook/browser/replEditorAccessibilityHelp.js +120 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopyManager.js +12 -12
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager.js +1 -1
package/index.js
CHANGED
|
@@ -34,9 +34,10 @@ import { OriginalNotebookCellModelFactory } from '@codingame/monaco-vscode-e4d0f
|
|
|
34
34
|
import { NotebookOriginalModelReferenceFactory } from '@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common/vscode/vs/workbench/contrib/notebook/browser/diff/inlineDiff/notebookOriginalModelRefFactory';
|
|
35
35
|
import { INotebookCellOutlineDataSourceFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.service';
|
|
36
36
|
import { NotebookCellOutlineDataSourceFactory } from './vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineDataSourceFactory.js';
|
|
37
|
-
import './vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js';
|
|
38
37
|
import { NotebookOutlineEntryFactory } from './vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js';
|
|
39
38
|
import { INotebookOutlineEntryFactory } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.service';
|
|
39
|
+
import './vscode/src/vs/workbench/contrib/replNotebook/browser/repl.contribution.js';
|
|
40
|
+
import './vscode/src/vs/workbench/contrib/notebook/browser/notebook.contribution.js';
|
|
40
41
|
|
|
41
42
|
function getServiceOverride() {
|
|
42
43
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-notebook-service-override",
|
|
3
|
-
"version": "22.1.
|
|
3
|
+
"version": "22.1.9",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - notebook service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,28 +15,29 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-0cd5242b-7b61-5f66-ac25-ffa40baf8e8f-common": "22.1.
|
|
19
|
-
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "22.1.
|
|
20
|
-
"@codingame/monaco-vscode-23aade48-f094-5c08-9555-97fc9cca96c9-common": "22.1.
|
|
21
|
-
"@codingame/monaco-vscode-3109a756-1f83-5d09-945b-9f0fcad928f0-common": "22.1.
|
|
22
|
-
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "22.1.
|
|
23
|
-
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "22.1.
|
|
24
|
-
"@codingame/monaco-vscode-622c0cca-d5fa-59b6-b730-0715afcf93ee-common": "22.1.
|
|
25
|
-
"@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common": "22.1.
|
|
26
|
-
"@codingame/monaco-vscode-6f9bc782-77e0-5716-93bd-b05210c768c5-common": "22.1.
|
|
27
|
-
"@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common": "22.1.
|
|
28
|
-
"@codingame/monaco-vscode-8ccb7637-50ea-5359-97bf-00015d7fe567-common": "22.1.
|
|
29
|
-
"@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common": "22.1.
|
|
30
|
-
"@codingame/monaco-vscode-9ee79c1a-3f03-568b-8eac-b02513a98b68-common": "22.1.
|
|
31
|
-
"@codingame/monaco-vscode-
|
|
32
|
-
"@codingame/monaco-vscode-
|
|
33
|
-
"@codingame/monaco-vscode-
|
|
34
|
-
"@codingame/monaco-vscode-
|
|
35
|
-
"@codingame/monaco-vscode-
|
|
36
|
-
"@codingame/monaco-vscode-
|
|
37
|
-
"@codingame/monaco-vscode-
|
|
38
|
-
"@codingame/monaco-vscode-
|
|
39
|
-
"@codingame/monaco-vscode-
|
|
18
|
+
"@codingame/monaco-vscode-0cd5242b-7b61-5f66-ac25-ffa40baf8e8f-common": "22.1.9",
|
|
19
|
+
"@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common": "22.1.9",
|
|
20
|
+
"@codingame/monaco-vscode-23aade48-f094-5c08-9555-97fc9cca96c9-common": "22.1.9",
|
|
21
|
+
"@codingame/monaco-vscode-3109a756-1f83-5d09-945b-9f0fcad928f0-common": "22.1.9",
|
|
22
|
+
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "22.1.9",
|
|
23
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "22.1.9",
|
|
24
|
+
"@codingame/monaco-vscode-622c0cca-d5fa-59b6-b730-0715afcf93ee-common": "22.1.9",
|
|
25
|
+
"@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common": "22.1.9",
|
|
26
|
+
"@codingame/monaco-vscode-6f9bc782-77e0-5716-93bd-b05210c768c5-common": "22.1.9",
|
|
27
|
+
"@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common": "22.1.9",
|
|
28
|
+
"@codingame/monaco-vscode-8ccb7637-50ea-5359-97bf-00015d7fe567-common": "22.1.9",
|
|
29
|
+
"@codingame/monaco-vscode-9ed6fe06-a052-57c2-a234-5d9b94d2e7e0-common": "22.1.9",
|
|
30
|
+
"@codingame/monaco-vscode-9ee79c1a-3f03-568b-8eac-b02513a98b68-common": "22.1.9",
|
|
31
|
+
"@codingame/monaco-vscode-api": "22.1.9",
|
|
32
|
+
"@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common": "22.1.9",
|
|
33
|
+
"@codingame/monaco-vscode-b99aef83-0d60-5e8c-a62e-9908b6256f35-common": "22.1.9",
|
|
34
|
+
"@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common": "22.1.9",
|
|
35
|
+
"@codingame/monaco-vscode-caeb744c-8e3f-5c11-80fb-0f057d24d544-common": "22.1.9",
|
|
36
|
+
"@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common": "22.1.9",
|
|
37
|
+
"@codingame/monaco-vscode-e4d0fd26-1b26-5583-b3f7-582e08d7b389-common": "22.1.9",
|
|
38
|
+
"@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common": "22.1.9",
|
|
39
|
+
"@codingame/monaco-vscode-ef4149eb-cc74-500f-a75b-c54539f01afa-common": "22.1.9",
|
|
40
|
+
"@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common": "22.1.9"
|
|
40
41
|
},
|
|
41
42
|
"main": "index.js",
|
|
42
43
|
"module": "index.js",
|
|
@@ -10,7 +10,7 @@ import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
10
10
|
import { NotebookCellAction, findTargetCellEditor } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
11
11
|
import { CodeCellViewModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel';
|
|
12
12
|
import { NOTEBOOK_CELL_FOCUSED, NOTEBOOK_CELL_HAS_ERROR_DIAGNOSTICS, NOTEBOOK_CELL_EDITOR_FOCUSED } from '@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
13
|
-
import { InlineChatController } from '@codingame/monaco-vscode-
|
|
13
|
+
import { InlineChatController } from '@codingame/monaco-vscode-ef4149eb-cc74-500f-a75b-c54539f01afa-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
14
14
|
import { showChatView } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
15
15
|
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
16
16
|
|
|
@@ -6,7 +6,7 @@ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
6
6
|
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
7
7
|
import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
|
|
8
8
|
import { OPEN_CELL_FAILURE_ACTIONS_COMMAND_ID } from './cellDiagnosticsActions.js';
|
|
9
|
-
import { NotebookStatusBarController } from '@codingame/monaco-vscode-
|
|
9
|
+
import { NotebookStatusBarController } from '@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common/vscode/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController';
|
|
10
10
|
import { registerNotebookContribution } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
11
11
|
import { CodeCellViewModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel';
|
|
12
12
|
import { CellStatusbarAlignment } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
@@ -3,7 +3,7 @@ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib
|
|
|
3
3
|
import { Throttler } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
4
|
import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
|
|
5
5
|
import { Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
-
import { NotebookVisibleCellObserver } from '@codingame/monaco-vscode-
|
|
6
|
+
import { NotebookVisibleCellObserver } from '@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common/vscode/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver';
|
|
7
7
|
import { registerNotebookContribution } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
8
8
|
import { INotebookCellStatusBarService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCellStatusBarService.service';
|
|
9
9
|
|
|
@@ -12,7 +12,7 @@ import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
|
12
12
|
import { registerAction2, Action2 } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
13
13
|
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
14
14
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
15
|
-
import { NotebookFindContrib } from '@codingame/monaco-vscode-
|
|
15
|
+
import { NotebookFindContrib } from '@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget';
|
|
16
16
|
import { NotebookMultiCellAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
17
17
|
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
18
18
|
import { registerNotebookContribution } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/multicursor/notebookMulticursor.js
CHANGED
|
@@ -37,7 +37,7 @@ import { NotebookAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1
|
|
|
37
37
|
import { getNotebookEditorFromEditorPane } from '@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
38
38
|
import { registerNotebookContribution } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookEditorExtensions';
|
|
39
39
|
import { CellEditorOptions } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions';
|
|
40
|
-
import { NotebookFindContrib } from '@codingame/monaco-vscode-
|
|
40
|
+
import { NotebookFindContrib } from '@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common/vscode/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget';
|
|
41
41
|
import { NotebookCellTextModel } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/common/model/notebookCellTextModel';
|
|
42
42
|
|
|
43
43
|
const NOTEBOOK_ADD_FIND_MATCH_TO_SELECTION_ID = 'notebook.addFindMatchToSelection';
|
|
@@ -11,7 +11,7 @@ import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/
|
|
|
11
11
|
import { InputFocusedContextKey, IsWindowsContext } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkeys';
|
|
12
12
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
13
13
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
14
|
-
import { InlineChatController } from '@codingame/monaco-vscode-
|
|
14
|
+
import { InlineChatController } from '@codingame/monaco-vscode-ef4149eb-cc74-500f-a75b-c54539f01afa-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
15
15
|
import { CTX_NOTEBOOK_CHAT_OUTER_FOCUS_POSITION } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatContext';
|
|
16
16
|
import { NotebookCellAction, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, findTargetCellEditor, NotebookAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
17
17
|
import { CellEditState } from '@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/notebook/browser/notebookBrowser';
|
|
@@ -21,7 +21,7 @@ import { NOTEBOOK_CELL_EDITOR_FOCUSED, NOTEBOOK_EDITOR_FOCUSED, IS_COMPOSITE_NOT
|
|
|
21
21
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
22
22
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
23
23
|
import { ChatContextKeys } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
24
|
-
import { InlineChatController } from '@codingame/monaco-vscode-
|
|
24
|
+
import { InlineChatController } from '@codingame/monaco-vscode-ef4149eb-cc74-500f-a75b-c54539f01afa-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
25
25
|
import { EditorAction2 } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions';
|
|
26
26
|
|
|
27
27
|
registerAction2(class extends NotebookAction {
|
|
@@ -21,7 +21,7 @@ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
21
21
|
import { KeybindingWeight } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
22
22
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
23
23
|
import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
24
|
-
import { InlineChatController } from '@codingame/monaco-vscode-
|
|
24
|
+
import { InlineChatController } from '@codingame/monaco-vscode-ef4149eb-cc74-500f-a75b-c54539f01afa-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
25
25
|
import { CTX_INLINE_CHAT_FOCUSED } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
26
26
|
import { runDeleteAction, changeCellToKind } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/cellOperations';
|
|
27
27
|
import { NotebookCellAction, CELL_TITLE_CELL_GROUP_ID, CellToolbarOrder, findTargetCellEditor, NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT, NotebookAction, CELL_TITLE_OUTPUT_GROUP_ID, executeNotebookCondition, NotebookMultiCellAction } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
@@ -69,7 +69,7 @@ import './contrib/outline/notebookOutline.js';
|
|
|
69
69
|
import './contrib/profile/notebookProfile.js';
|
|
70
70
|
import './contrib/cellStatusBar/statusBarProviders.js';
|
|
71
71
|
import './contrib/cellStatusBar/contributedStatusBarItemController.js';
|
|
72
|
-
import '@codingame/monaco-vscode-
|
|
72
|
+
import '@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common/vscode/vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController';
|
|
73
73
|
import './contrib/editorStatusBar/editorStatusBar.js';
|
|
74
74
|
import './contrib/undoRedo/notebookUndoRedo.js';
|
|
75
75
|
import './contrib/cellCommands/cellCommands.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/editor/browser/editorExtensions";
|
|
2
|
+
import { AccessibleViewType, AccessibleContentProvider } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
3
|
+
import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
4
|
+
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
5
|
+
/**
|
|
6
|
+
* The REPL input is already accessible, so we can show a view for the most recent execution output.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ReplEditorAccessibleView implements IAccessibleViewImplementation {
|
|
9
|
+
readonly priority = 100;
|
|
10
|
+
readonly name = "replEditorInput";
|
|
11
|
+
readonly type = AccessibleViewType.View;
|
|
12
|
+
readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
|
|
13
|
+
getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare function getAccessibleOutputProvider(editorService: IEditorService): AccessibleContentProvider | undefined;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
3
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
4
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
5
|
+
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
6
|
+
import { isReplEditorControl } from '@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common/vscode/vs/workbench/contrib/replNotebook/browser/replEditor';
|
|
7
|
+
import { IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_LIST_FOCUSED } from '@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
8
|
+
import { getAllOutputsText } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/viewModel/cellOutputTextHelper';
|
|
9
|
+
|
|
10
|
+
class ReplEditorAccessibleView {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.priority = 100;
|
|
13
|
+
this.name = 'replEditorInput';
|
|
14
|
+
this.type = AccessibleViewType.View;
|
|
15
|
+
this.when = ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, ( NOTEBOOK_CELL_LIST_FOCUSED.negate())));
|
|
16
|
+
}
|
|
17
|
+
getProvider(accessor) {
|
|
18
|
+
const editorService = accessor.get(IEditorService);
|
|
19
|
+
return getAccessibleOutputProvider(editorService);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function getAccessibleOutputProvider(editorService) {
|
|
23
|
+
const editorControl = editorService.activeEditorPane?.getControl();
|
|
24
|
+
if (editorControl && isReplEditorControl(editorControl) && editorControl.notebookEditor) {
|
|
25
|
+
const notebookEditor = editorControl.notebookEditor;
|
|
26
|
+
const viewModel = notebookEditor?.getViewModel();
|
|
27
|
+
if (notebookEditor && viewModel) {
|
|
28
|
+
const lastCellIndex = viewModel.length - 1;
|
|
29
|
+
if (lastCellIndex >= 0) {
|
|
30
|
+
const cell = viewModel.viewCells[lastCellIndex];
|
|
31
|
+
const outputContent = getAllOutputsText(viewModel.notebookDocument, cell);
|
|
32
|
+
if (outputContent) {
|
|
33
|
+
return ( new AccessibleContentProvider(
|
|
34
|
+
AccessibleViewProviderId.Notebook,
|
|
35
|
+
{ type: AccessibleViewType.View },
|
|
36
|
+
() => { return outputContent; },
|
|
37
|
+
() => {
|
|
38
|
+
editorControl.activeCodeEditor?.focus();
|
|
39
|
+
},
|
|
40
|
+
AccessibilityVerbositySettingId.ReplEditor
|
|
41
|
+
));
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { ReplEditorAccessibleView, getAccessibleOutputProvider };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
+
import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions";
|
|
5
|
+
import { IEditorResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service";
|
|
6
|
+
import { INotebookEditorModelResolverService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service";
|
|
7
|
+
import { INotebookService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service";
|
|
8
|
+
export declare class ReplDocumentContribution extends Disposable implements IWorkbenchContribution {
|
|
9
|
+
private readonly notebookEditorModelResolverService;
|
|
10
|
+
private readonly instantiationService;
|
|
11
|
+
private readonly configurationService;
|
|
12
|
+
static readonly ID = "workbench.contrib.replDocument";
|
|
13
|
+
private readonly editorInputCache;
|
|
14
|
+
constructor(notebookService: INotebookService, editorResolverService: IEditorResolverService, notebookEditorModelResolverService: INotebookEditorModelResolverService, instantiationService: IInstantiationService, configurationService: IConfigurationService);
|
|
15
|
+
}
|
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { KeyChord, KeyMod, KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
|
|
5
|
+
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
7
|
+
import { parse } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
8
|
+
import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
|
|
9
|
+
import { isFalsyOrWhitespace } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
10
|
+
import { assertType } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
11
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
12
|
+
import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/bulkEditService.service';
|
|
13
|
+
import { PLAINTEXT_LANGUAGE_ID } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages/modesRegistry';
|
|
14
|
+
import { localize2 } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
15
|
+
import { AccessibleViewRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
|
|
16
|
+
import { registerAction2, Action2, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
17
|
+
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
18
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
19
|
+
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
20
|
+
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
21
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
22
|
+
import { KeybindingWeight, KeybindingsRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybindingsRegistry';
|
|
23
|
+
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
24
|
+
import { EditorPaneDescriptor } from '@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common/vscode/vs/workbench/browser/editor';
|
|
25
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions';
|
|
26
|
+
import { EditorExtensions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
27
|
+
import { RegisteredEditorPriority } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService';
|
|
28
|
+
import { IEditorResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorResolverService.service';
|
|
29
|
+
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
30
|
+
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
31
|
+
import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
32
|
+
import { IWorkingCopyEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workingCopy/common/workingCopyEditorService.service';
|
|
33
|
+
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-670aae94-7f88-54d7-90ea-6fcbef423557-common/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
34
|
+
import { getReplView } from '@codingame/monaco-vscode-88aa9a78-75f5-5aaa-89e9-bbdd580b3b5c-common/vscode/vs/workbench/contrib/debug/browser/repl';
|
|
35
|
+
import { REPL_VIEW_ID } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/debug/common/debug';
|
|
36
|
+
import { InlineChatController } from '@codingame/monaco-vscode-ef4149eb-cc74-500f-a75b-c54539f01afa-common/vscode/vs/workbench/contrib/inlineChat/browser/inlineChatController';
|
|
37
|
+
import { IInteractiveHistoryService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/interactive/browser/interactiveHistoryService.service';
|
|
38
|
+
import { NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/controller/coreActions';
|
|
39
|
+
import { executeIcon } from '@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/notebook/browser/notebookIcons';
|
|
40
|
+
import { ReplEditorAccessibleView } from '../../notebook/browser/replEditorAccessibleView.js';
|
|
41
|
+
import { INotebookEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/browser/services/notebookEditorService.service';
|
|
42
|
+
import { REPL_EDITOR_ID, NotebookSetting, NotebookWorkingCopyTypeIdentifier, CellKind, CellEditType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
43
|
+
import { MOST_RECENT_REPL_EDITOR, IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_LIST_FOCUSED, NOTEBOOK_EDITOR_FOCUSED } from '@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
44
|
+
import { INotebookEditorModelResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookEditorModelResolverService.service';
|
|
45
|
+
import { INotebookService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookService.service';
|
|
46
|
+
import { ReplEditor, isReplEditorControl } from '@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common/vscode/vs/workbench/contrib/replNotebook/browser/replEditor';
|
|
47
|
+
import { ReplEditorInputAccessibilityHelp, ReplEditorHistoryAccessibilityHelp } from './replEditorAccessibilityHelp.js';
|
|
48
|
+
import { ReplEditorInput } from '@codingame/monaco-vscode-fc28fb90-97de-5e74-89a9-4cfe44128227-common/vscode/vs/workbench/contrib/replNotebook/browser/replEditorInput';
|
|
49
|
+
|
|
50
|
+
class ReplEditorSerializer {
|
|
51
|
+
canSerialize(input) {
|
|
52
|
+
return input.typeId === ReplEditorInput.ID;
|
|
53
|
+
}
|
|
54
|
+
serialize(input) {
|
|
55
|
+
assertType(input instanceof ReplEditorInput);
|
|
56
|
+
const data = {
|
|
57
|
+
resource: input.resource,
|
|
58
|
+
preferredResource: input.preferredResource,
|
|
59
|
+
viewType: input.viewType,
|
|
60
|
+
options: input.options,
|
|
61
|
+
label: input.getName()
|
|
62
|
+
};
|
|
63
|
+
return JSON.stringify(data);
|
|
64
|
+
}
|
|
65
|
+
deserialize(instantiationService, raw) {
|
|
66
|
+
const data = parse(raw);
|
|
67
|
+
if (!data) {
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
const { resource, viewType } = data;
|
|
71
|
+
if (!data || !URI.isUri(resource) || typeof viewType !== 'string') {
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
const input = instantiationService.createInstance(ReplEditorInput, resource, data.label);
|
|
75
|
+
return input;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(EditorPaneDescriptor.create(ReplEditor, REPL_EDITOR_ID, 'REPL Editor'), [
|
|
79
|
+
( new SyncDescriptor(ReplEditorInput))
|
|
80
|
+
]);
|
|
81
|
+
( Registry.as(EditorExtensions.EditorFactory)).registerEditorSerializer(ReplEditorInput.ID, ReplEditorSerializer);
|
|
82
|
+
let ReplDocumentContribution = class ReplDocumentContribution extends Disposable {
|
|
83
|
+
static { this.ID = 'workbench.contrib.replDocument'; }
|
|
84
|
+
constructor(notebookService, editorResolverService, notebookEditorModelResolverService, instantiationService, configurationService) {
|
|
85
|
+
super();
|
|
86
|
+
this.notebookEditorModelResolverService = notebookEditorModelResolverService;
|
|
87
|
+
this.instantiationService = instantiationService;
|
|
88
|
+
this.configurationService = configurationService;
|
|
89
|
+
this.editorInputCache = ( new ResourceMap());
|
|
90
|
+
editorResolverService.registerEditor(
|
|
91
|
+
` `, {
|
|
92
|
+
id: 'repl',
|
|
93
|
+
label: 'repl Editor',
|
|
94
|
+
priority: RegisteredEditorPriority.option
|
|
95
|
+
}, {
|
|
96
|
+
canSupportResource: uri => notebookService.getNotebookTextModel(uri) !== undefined,
|
|
97
|
+
singlePerResource: true
|
|
98
|
+
}, {
|
|
99
|
+
createUntitledEditorInput: async ({ resource, options }) => {
|
|
100
|
+
if (resource) {
|
|
101
|
+
const editor = this.editorInputCache.get(resource);
|
|
102
|
+
if (editor && !editor.isDisposed()) {
|
|
103
|
+
return { editor, options };
|
|
104
|
+
}
|
|
105
|
+
else if (editor) {
|
|
106
|
+
this.editorInputCache.delete(resource);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const scratchpad = this.configurationService.getValue(NotebookSetting.InteractiveWindowPromptToSave) !== true;
|
|
110
|
+
const ref = await this.notebookEditorModelResolverService.resolve({ untitledResource: resource }, 'jupyter-notebook', { scratchpad, viewType: 'repl' });
|
|
111
|
+
const notebookUri = ref.object.notebook.uri;
|
|
112
|
+
Event.once(ref.object.notebook.onWillDispose)(() => {
|
|
113
|
+
ref.dispose();
|
|
114
|
+
});
|
|
115
|
+
const label = options?.label ?? undefined;
|
|
116
|
+
const editor = this.instantiationService.createInstance(ReplEditorInput, notebookUri, label);
|
|
117
|
+
this.editorInputCache.set(notebookUri, editor);
|
|
118
|
+
Event.once(editor.onWillDispose)(() => this.editorInputCache.delete(notebookUri));
|
|
119
|
+
return { editor, options };
|
|
120
|
+
},
|
|
121
|
+
createEditorInput: async ({ resource, options }) => {
|
|
122
|
+
if (( this.editorInputCache.has(resource))) {
|
|
123
|
+
return { editor: this.editorInputCache.get(resource), options };
|
|
124
|
+
}
|
|
125
|
+
const label = options?.label ?? undefined;
|
|
126
|
+
const editor = this.instantiationService.createInstance(ReplEditorInput, resource, label);
|
|
127
|
+
this.editorInputCache.set(resource, editor);
|
|
128
|
+
Event.once(editor.onWillDispose)(() => this.editorInputCache.delete(resource));
|
|
129
|
+
return { editor, options };
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
ReplDocumentContribution = ( __decorate([
|
|
135
|
+
( __param(0, INotebookService)),
|
|
136
|
+
( __param(1, IEditorResolverService)),
|
|
137
|
+
( __param(2, INotebookEditorModelResolverService)),
|
|
138
|
+
( __param(3, IInstantiationService)),
|
|
139
|
+
( __param(4, IConfigurationService))
|
|
140
|
+
], ReplDocumentContribution));
|
|
141
|
+
let ReplWindowWorkingCopyEditorHandler = class ReplWindowWorkingCopyEditorHandler extends Disposable {
|
|
142
|
+
static { this.ID = 'workbench.contrib.replWorkingCopyEditorHandler'; }
|
|
143
|
+
constructor(instantiationService, workingCopyEditorService, extensionService, notebookService) {
|
|
144
|
+
super();
|
|
145
|
+
this.instantiationService = instantiationService;
|
|
146
|
+
this.workingCopyEditorService = workingCopyEditorService;
|
|
147
|
+
this.extensionService = extensionService;
|
|
148
|
+
this.notebookService = notebookService;
|
|
149
|
+
this._installHandler();
|
|
150
|
+
}
|
|
151
|
+
async handles(workingCopy) {
|
|
152
|
+
const notebookType = this._getNotebookType(workingCopy);
|
|
153
|
+
if (!notebookType) {
|
|
154
|
+
return false;
|
|
155
|
+
}
|
|
156
|
+
return !!notebookType && notebookType.viewType === 'repl' && (await this.notebookService.canResolve(notebookType.notebookType));
|
|
157
|
+
}
|
|
158
|
+
isOpen(workingCopy, editor) {
|
|
159
|
+
if (!this.handles(workingCopy)) {
|
|
160
|
+
return false;
|
|
161
|
+
}
|
|
162
|
+
return editor instanceof ReplEditorInput && isEqual(workingCopy.resource, editor.resource);
|
|
163
|
+
}
|
|
164
|
+
createEditor(workingCopy) {
|
|
165
|
+
return this.instantiationService.createInstance(ReplEditorInput, workingCopy.resource, undefined);
|
|
166
|
+
}
|
|
167
|
+
async _installHandler() {
|
|
168
|
+
await this.extensionService.whenInstalledExtensionsRegistered();
|
|
169
|
+
this._register(this.workingCopyEditorService.registerHandler(this));
|
|
170
|
+
}
|
|
171
|
+
_getNotebookType(workingCopy) {
|
|
172
|
+
return NotebookWorkingCopyTypeIdentifier.parse(workingCopy.typeId);
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
ReplWindowWorkingCopyEditorHandler = ( __decorate([
|
|
176
|
+
( __param(0, IInstantiationService)),
|
|
177
|
+
( __param(1, IWorkingCopyEditorService)),
|
|
178
|
+
( __param(2, IExtensionService)),
|
|
179
|
+
( __param(3, INotebookService))
|
|
180
|
+
], ReplWindowWorkingCopyEditorHandler));
|
|
181
|
+
registerWorkbenchContribution2(ReplWindowWorkingCopyEditorHandler.ID, ReplWindowWorkingCopyEditorHandler, WorkbenchPhase.BlockRestore);
|
|
182
|
+
registerWorkbenchContribution2(ReplDocumentContribution.ID, ReplDocumentContribution, WorkbenchPhase.BlockRestore);
|
|
183
|
+
AccessibleViewRegistry.register(( new ReplEditorInputAccessibilityHelp()));
|
|
184
|
+
AccessibleViewRegistry.register(( new ReplEditorHistoryAccessibilityHelp()));
|
|
185
|
+
registerAction2(class extends Action2 {
|
|
186
|
+
constructor() {
|
|
187
|
+
super({
|
|
188
|
+
id: 'repl.focusLastItemExecuted',
|
|
189
|
+
title: ( localize2(9979, 'Focus Most Recent REPL Execution')),
|
|
190
|
+
category: 'REPL',
|
|
191
|
+
menu: {
|
|
192
|
+
id: MenuId.CommandPalette,
|
|
193
|
+
when: MOST_RECENT_REPL_EDITOR,
|
|
194
|
+
},
|
|
195
|
+
keybinding: [{
|
|
196
|
+
primary: KeyChord(KeyMod.Alt | KeyCode.End, KeyMod.Alt | KeyCode.End),
|
|
197
|
+
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
198
|
+
when: ( ContextKeyExpr.or(IS_COMPOSITE_NOTEBOOK, ( NOTEBOOK_CELL_LIST_FOCUSED.negate())))
|
|
199
|
+
}],
|
|
200
|
+
precondition: MOST_RECENT_REPL_EDITOR
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
async run(accessor, context) {
|
|
204
|
+
const editorService = accessor.get(IEditorService);
|
|
205
|
+
const editorControl = editorService.activeEditorPane?.getControl();
|
|
206
|
+
const contextKeyService = accessor.get(IContextKeyService);
|
|
207
|
+
let notebookEditor;
|
|
208
|
+
if (editorControl && isReplEditorControl(editorControl)) {
|
|
209
|
+
notebookEditor = editorControl.notebookEditor;
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
const uriString = MOST_RECENT_REPL_EDITOR.getValue(contextKeyService);
|
|
213
|
+
const uri = uriString ? ( URI.parse(uriString)) : undefined;
|
|
214
|
+
if (!uri) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const replEditor = editorService.findEditors(uri)[0];
|
|
218
|
+
if (replEditor) {
|
|
219
|
+
const editor = await editorService.openEditor(replEditor.editor, replEditor.groupId);
|
|
220
|
+
const editorControl = editor?.getControl();
|
|
221
|
+
if (editorControl && isReplEditorControl(editorControl)) {
|
|
222
|
+
notebookEditor = editorControl.notebookEditor;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
const viewModel = notebookEditor?.getViewModel();
|
|
227
|
+
if (notebookEditor && viewModel) {
|
|
228
|
+
const lastCellIndex = viewModel.length - 1;
|
|
229
|
+
if (lastCellIndex >= 0) {
|
|
230
|
+
const cell = viewModel.viewCells[lastCellIndex];
|
|
231
|
+
notebookEditor.focusNotebookCell(cell, 'container');
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
registerAction2(class extends Action2 {
|
|
237
|
+
constructor() {
|
|
238
|
+
super({
|
|
239
|
+
id: 'repl.input.focus',
|
|
240
|
+
title: ( localize2(9980, 'Focus Input Editor')),
|
|
241
|
+
category: 'REPL',
|
|
242
|
+
menu: {
|
|
243
|
+
id: MenuId.CommandPalette,
|
|
244
|
+
when: MOST_RECENT_REPL_EDITOR,
|
|
245
|
+
},
|
|
246
|
+
keybinding: [{
|
|
247
|
+
when: ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, NOTEBOOK_EDITOR_FOCUSED)),
|
|
248
|
+
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT,
|
|
249
|
+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow
|
|
250
|
+
}, {
|
|
251
|
+
when: ( ContextKeyExpr.and(MOST_RECENT_REPL_EDITOR)),
|
|
252
|
+
weight: KeybindingWeight.WorkbenchContrib + 5,
|
|
253
|
+
primary: KeyChord(KeyMod.Alt | KeyCode.Home, KeyMod.Alt | KeyCode.Home),
|
|
254
|
+
}]
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
async run(accessor) {
|
|
258
|
+
const editorService = accessor.get(IEditorService);
|
|
259
|
+
const editorControl = editorService.activeEditorPane?.getControl();
|
|
260
|
+
const contextKeyService = accessor.get(IContextKeyService);
|
|
261
|
+
if (editorControl && isReplEditorControl(editorControl) && editorControl.notebookEditor) {
|
|
262
|
+
editorService.activeEditorPane?.focus();
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
const uriString = MOST_RECENT_REPL_EDITOR.getValue(contextKeyService);
|
|
266
|
+
const uri = uriString ? ( URI.parse(uriString)) : undefined;
|
|
267
|
+
if (!uri) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
const replEditor = editorService.findEditors(uri)[0];
|
|
271
|
+
if (replEditor) {
|
|
272
|
+
await editorService.openEditor({ resource: uri, options: { preserveFocus: false } }, replEditor.groupId);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
registerAction2(class extends Action2 {
|
|
278
|
+
constructor() {
|
|
279
|
+
super({
|
|
280
|
+
id: 'repl.execute',
|
|
281
|
+
title: ( localize2(9981, 'Execute REPL input')),
|
|
282
|
+
category: 'REPL',
|
|
283
|
+
keybinding: [{
|
|
284
|
+
when: ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, ( ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl')), ( NOTEBOOK_CELL_LIST_FOCUSED.negate()))),
|
|
285
|
+
primary: KeyMod.CtrlCmd | KeyCode.Enter,
|
|
286
|
+
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
287
|
+
}, {
|
|
288
|
+
when: ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, ( ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl')), ( ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', true)), ( NOTEBOOK_CELL_LIST_FOCUSED.negate()))),
|
|
289
|
+
primary: KeyMod.Shift | KeyCode.Enter,
|
|
290
|
+
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
291
|
+
}, {
|
|
292
|
+
when: ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, ( ContextKeyExpr.equals('activeEditor', 'workbench.editor.repl')), ( ContextKeyExpr.equals('config.interactiveWindow.executeWithShiftEnter', false)), ( NOTEBOOK_CELL_LIST_FOCUSED.negate()))),
|
|
293
|
+
primary: KeyCode.Enter,
|
|
294
|
+
weight: NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT
|
|
295
|
+
}],
|
|
296
|
+
menu: [
|
|
297
|
+
{
|
|
298
|
+
id: MenuId.ReplInputExecute
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
icon: executeIcon,
|
|
302
|
+
f1: false,
|
|
303
|
+
metadata: {
|
|
304
|
+
description: 'Execute the Contents of the Input Box',
|
|
305
|
+
args: [
|
|
306
|
+
{
|
|
307
|
+
name: 'resource',
|
|
308
|
+
description: 'Interactive resource Uri',
|
|
309
|
+
isOptional: true
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
async run(accessor, context) {
|
|
316
|
+
const editorService = accessor.get(IEditorService);
|
|
317
|
+
const bulkEditService = accessor.get(IBulkEditService);
|
|
318
|
+
const historyService = accessor.get(IInteractiveHistoryService);
|
|
319
|
+
const notebookEditorService = accessor.get(INotebookEditorService);
|
|
320
|
+
let editorControl;
|
|
321
|
+
if (context) {
|
|
322
|
+
const resourceUri = URI.revive(context);
|
|
323
|
+
const editors = editorService.findEditors(resourceUri);
|
|
324
|
+
for (const found of editors) {
|
|
325
|
+
if (found.editor.typeId === ReplEditorInput.ID) {
|
|
326
|
+
const editor = await editorService.openEditor(found.editor, found.groupId);
|
|
327
|
+
editorControl = editor?.getControl();
|
|
328
|
+
break;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
editorControl = editorService.activeEditorPane?.getControl();
|
|
334
|
+
}
|
|
335
|
+
if (isReplEditorControl(editorControl)) {
|
|
336
|
+
executeReplInput(bulkEditService, historyService, notebookEditorService, editorControl);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
async function executeReplInput(bulkEditService, historyService, notebookEditorService, editorControl) {
|
|
341
|
+
if (editorControl && editorControl.notebookEditor && editorControl.activeCodeEditor) {
|
|
342
|
+
const notebookDocument = editorControl.notebookEditor.textModel;
|
|
343
|
+
const textModel = editorControl.activeCodeEditor.getModel();
|
|
344
|
+
const activeKernel = editorControl.notebookEditor.activeKernel;
|
|
345
|
+
const language = activeKernel?.supportedLanguages[0] ?? PLAINTEXT_LANGUAGE_ID;
|
|
346
|
+
if (notebookDocument && textModel) {
|
|
347
|
+
const index = notebookDocument.length - 1;
|
|
348
|
+
const value = textModel.getValue();
|
|
349
|
+
if (isFalsyOrWhitespace(value)) {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
const ctrl = InlineChatController.get(editorControl.activeCodeEditor);
|
|
353
|
+
if (ctrl) {
|
|
354
|
+
ctrl.acceptSession();
|
|
355
|
+
}
|
|
356
|
+
historyService.replaceLast(notebookDocument.uri, value);
|
|
357
|
+
historyService.addToHistory(notebookDocument.uri, '');
|
|
358
|
+
textModel.setValue('');
|
|
359
|
+
notebookDocument.cells[index].resetTextBuffer(textModel.getTextBuffer());
|
|
360
|
+
const collapseState = editorControl.notebookEditor.notebookOptions.getDisplayOptions().interactiveWindowCollapseCodeCells === 'fromEditor' ?
|
|
361
|
+
{
|
|
362
|
+
inputCollapsed: false,
|
|
363
|
+
outputCollapsed: false
|
|
364
|
+
} :
|
|
365
|
+
undefined;
|
|
366
|
+
await bulkEditService.apply([
|
|
367
|
+
( new ResourceNotebookCellEdit(notebookDocument.uri, {
|
|
368
|
+
editType: CellEditType.Replace,
|
|
369
|
+
index: index,
|
|
370
|
+
count: 0,
|
|
371
|
+
cells: [{
|
|
372
|
+
cellKind: CellKind.Code,
|
|
373
|
+
mime: undefined,
|
|
374
|
+
language,
|
|
375
|
+
source: value,
|
|
376
|
+
outputs: [],
|
|
377
|
+
metadata: {},
|
|
378
|
+
collapseState
|
|
379
|
+
}]
|
|
380
|
+
}))
|
|
381
|
+
]);
|
|
382
|
+
const range = { start: index, end: index + 1 };
|
|
383
|
+
editorControl.notebookEditor.revealCellRangeInView(range);
|
|
384
|
+
await editorControl.notebookEditor.executeNotebookCells(editorControl.notebookEditor.getCellsInRange({ start: index, end: index + 1 }));
|
|
385
|
+
const editor = notebookEditorService.getNotebookEditor(editorControl.notebookEditor.getId());
|
|
386
|
+
if (editor) {
|
|
387
|
+
editor.setSelections([range]);
|
|
388
|
+
editor.setFocus(range);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
AccessibleViewRegistry.register(( new ReplEditorAccessibleView()));
|
|
394
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
395
|
+
id: 'list.find.replInputFocus',
|
|
396
|
+
weight: KeybindingWeight.WorkbenchContrib + 1,
|
|
397
|
+
when: ( ContextKeyExpr.equals('view', REPL_VIEW_ID)),
|
|
398
|
+
primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KeyF,
|
|
399
|
+
secondary: [KeyCode.F3],
|
|
400
|
+
handler: (accessor) => {
|
|
401
|
+
getReplView(accessor.get(IViewsService))?.openFind();
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
export { ReplDocumentContribution };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
2
|
+
import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
3
|
+
import { AccessibleViewType, AccessibleContentProvider } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
4
|
+
export declare class ReplEditorInputAccessibilityHelp implements IAccessibleViewImplementation {
|
|
5
|
+
readonly priority = 105;
|
|
6
|
+
readonly name = "REPL Editor Input";
|
|
7
|
+
readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
|
|
8
|
+
readonly type: AccessibleViewType;
|
|
9
|
+
getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
|
|
10
|
+
}
|
|
11
|
+
export declare class ReplEditorHistoryAccessibilityHelp implements IAccessibleViewImplementation {
|
|
12
|
+
readonly priority = 105;
|
|
13
|
+
readonly name = "REPL Editor History";
|
|
14
|
+
readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").ContextKeyExpression | undefined;
|
|
15
|
+
readonly type: AccessibleViewType;
|
|
16
|
+
getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
|
|
17
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
|
|
2
|
+
import { ContextKeyExpr } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
3
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
|
+
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
5
|
+
import { AccessibilityVerbositySettingId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
|
6
|
+
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
7
|
+
import { IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_LIST_FOCUSED } from '@codingame/monaco-vscode-eda30bac-0984-5b42-9362-c68996b85232-common/vscode/vs/workbench/contrib/notebook/common/notebookContextKeys';
|
|
8
|
+
|
|
9
|
+
class ReplEditorInputAccessibilityHelp {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.priority = 105;
|
|
12
|
+
this.name = 'REPL Editor Input';
|
|
13
|
+
this.when = ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, ( NOTEBOOK_CELL_LIST_FOCUSED.negate())));
|
|
14
|
+
this.type = AccessibleViewType.Help;
|
|
15
|
+
}
|
|
16
|
+
getProvider(accessor) {
|
|
17
|
+
return getAccessibilityHelpProvider(accessor.get(ICodeEditorService), getAccessibilityInputHelpText());
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function getAccessibilityInputHelpText() {
|
|
21
|
+
return [
|
|
22
|
+
( localize(
|
|
23
|
+
9983,
|
|
24
|
+
'You are in a REPL Editor Input box which will accept code to be executed in the REPL.'
|
|
25
|
+
)),
|
|
26
|
+
( localize(
|
|
27
|
+
9984,
|
|
28
|
+
'The Execute command{0} will evaluate the expression in the input box.',
|
|
29
|
+
'<keybinding:repl.execute>'
|
|
30
|
+
)),
|
|
31
|
+
( localize(
|
|
32
|
+
9985,
|
|
33
|
+
'The setting `accessibility.replEditor.readLastExecutionOutput` controls if output will be automatically read when execution completes.'
|
|
34
|
+
)),
|
|
35
|
+
( localize(
|
|
36
|
+
9986,
|
|
37
|
+
'The setting `accessibility.replEditor.autoFocusReplExecution` controls if focus will automatically move to the REPL after executing code.'
|
|
38
|
+
)),
|
|
39
|
+
( localize(
|
|
40
|
+
9987,
|
|
41
|
+
'The Focus Last executed command{0} will move focus to the last executed item in the REPL history.',
|
|
42
|
+
'<keybinding:repl.focusLastItemExecuted>'
|
|
43
|
+
)),
|
|
44
|
+
( localize(
|
|
45
|
+
9988,
|
|
46
|
+
'When you run the Open Accessbility View command{0} from this input box, the output from the last execution will be shown in the accessibility view.',
|
|
47
|
+
'<keybinding:editor.action.accessibleView>'
|
|
48
|
+
)),
|
|
49
|
+
( localize(
|
|
50
|
+
9989,
|
|
51
|
+
'The Focus Input Editor command{0} will bring the focus back to this editor.',
|
|
52
|
+
'<keybinding:repl.input.focus>'
|
|
53
|
+
)),
|
|
54
|
+
].join('\n');
|
|
55
|
+
}
|
|
56
|
+
class ReplEditorHistoryAccessibilityHelp {
|
|
57
|
+
constructor() {
|
|
58
|
+
this.priority = 105;
|
|
59
|
+
this.name = 'REPL Editor History';
|
|
60
|
+
this.when = ( ContextKeyExpr.and(IS_COMPOSITE_NOTEBOOK, NOTEBOOK_CELL_LIST_FOCUSED));
|
|
61
|
+
this.type = AccessibleViewType.Help;
|
|
62
|
+
}
|
|
63
|
+
getProvider(accessor) {
|
|
64
|
+
return getAccessibilityHelpProvider(accessor.get(ICodeEditorService), getAccessibilityHistoryHelpText());
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function getAccessibilityHistoryHelpText() {
|
|
68
|
+
return [
|
|
69
|
+
( localize(
|
|
70
|
+
9990,
|
|
71
|
+
'You are in a REPL History which is a list of cells that have been executed in the REPL. Each cell has an input, an output, and the cell container.'
|
|
72
|
+
)),
|
|
73
|
+
( localize(
|
|
74
|
+
9991,
|
|
75
|
+
'The Edit Cell command{0} will move focus to the read-only editor for the input of the cell.',
|
|
76
|
+
'<keybinding:notebook.cell.edit>'
|
|
77
|
+
)),
|
|
78
|
+
( localize(
|
|
79
|
+
9992,
|
|
80
|
+
'The Quit Edit command{0} will move focus to the cell container, where the up and down arrows will also move focus between cells in the history.',
|
|
81
|
+
'<keybinding:notebook.cell.quitEdit>'
|
|
82
|
+
)),
|
|
83
|
+
( localize(
|
|
84
|
+
9993,
|
|
85
|
+
'Run the Open Accessbility View command{0} while navigating the history for an accessible view of the item\'s output.',
|
|
86
|
+
'<keybinding:editor.action.accessibleView>'
|
|
87
|
+
)),
|
|
88
|
+
( localize(
|
|
89
|
+
9994,
|
|
90
|
+
'The Focus Output command{0} will set focus on the output when focused on a previously executed item.',
|
|
91
|
+
'<keybinding:notebook.cell.focusInOutput>'
|
|
92
|
+
)),
|
|
93
|
+
( localize(
|
|
94
|
+
9995,
|
|
95
|
+
'The Focus Input Editor command{0} will move focus to the REPL input box.',
|
|
96
|
+
'<keybinding:repl.input.focus>'
|
|
97
|
+
)),
|
|
98
|
+
( localize(
|
|
99
|
+
9987,
|
|
100
|
+
'The Focus Last executed command{0} will move focus to the last executed item in the REPL history.',
|
|
101
|
+
'<keybinding:repl.focusLastItemExecuted>'
|
|
102
|
+
)),
|
|
103
|
+
].join('\n');
|
|
104
|
+
}
|
|
105
|
+
function getAccessibilityHelpProvider(editorService, helpText) {
|
|
106
|
+
const activeEditor = editorService.getActiveCodeEditor()
|
|
107
|
+
|| editorService.getFocusedCodeEditor();
|
|
108
|
+
if (!activeEditor) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
return ( new AccessibleContentProvider(
|
|
112
|
+
AccessibleViewProviderId.ReplEditor,
|
|
113
|
+
{ type: AccessibleViewType.Help },
|
|
114
|
+
() => helpText,
|
|
115
|
+
() => activeEditor.focus(),
|
|
116
|
+
AccessibilityVerbositySettingId.ReplEditor
|
|
117
|
+
));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export { ReplEditorHistoryAccessibilityHelp, ReplEditorInputAccessibilityHelp };
|
|
@@ -48,8 +48,8 @@ import { IProgressService } from '@codingame/monaco-vscode-api/vscode/vs/platfor
|
|
|
48
48
|
var FileWorkingCopyManager_1;
|
|
49
49
|
let FileWorkingCopyManager = class FileWorkingCopyManager extends Disposable {
|
|
50
50
|
static { FileWorkingCopyManager_1 = this; }
|
|
51
|
-
static { this.FILE_WORKING_COPY_SAVE_CREATE_SOURCE = SaveSourceRegistry.registerSource('fileWorkingCopyCreate.source', ( localize(
|
|
52
|
-
static { this.FILE_WORKING_COPY_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('fileWorkingCopyReplace.source', ( localize(
|
|
51
|
+
static { this.FILE_WORKING_COPY_SAVE_CREATE_SOURCE = SaveSourceRegistry.registerSource('fileWorkingCopyCreate.source', ( localize(14103, "File Created"))); }
|
|
52
|
+
static { this.FILE_WORKING_COPY_SAVE_REPLACE_SOURCE = SaveSourceRegistry.registerSource('fileWorkingCopyReplace.source', ( localize(14104, "File Replaced"))); }
|
|
53
53
|
constructor(workingCopyTypeId, storedWorkingCopyModelFactory, untitledWorkingCopyModelFactory, fileService, lifecycleService, labelService, logService, workingCopyFileService, workingCopyBackupService, uriIdentityService, fileDialogService, filesConfigurationService, workingCopyService, notificationService, workingCopyEditorService, editorService, elevatedFileService, pathService, environmentService, dialogService, decorationsService, progressService) {
|
|
54
54
|
super();
|
|
55
55
|
this.workingCopyTypeId = workingCopyTypeId;
|
|
@@ -104,7 +104,7 @@ let FileWorkingCopyManager = class FileWorkingCopyManager extends Disposable {
|
|
|
104
104
|
constructor(stored) {
|
|
105
105
|
super();
|
|
106
106
|
this.stored = stored;
|
|
107
|
-
this.label = ( localize(
|
|
107
|
+
this.label = ( localize(14105, "File Working Copy Decorations"));
|
|
108
108
|
this._onDidChange = this._register(( new Emitter()));
|
|
109
109
|
this.onDidChange = this._onDidChange.event;
|
|
110
110
|
this.registerListeners();
|
|
@@ -131,20 +131,20 @@ let FileWorkingCopyManager = class FileWorkingCopyManager extends Disposable {
|
|
|
131
131
|
color: listErrorForeground,
|
|
132
132
|
letter: Codicon.lockSmall,
|
|
133
133
|
strikethrough: true,
|
|
134
|
-
tooltip: ( localize(
|
|
134
|
+
tooltip: ( localize(14106, "Deleted, Read-only")),
|
|
135
135
|
};
|
|
136
136
|
}
|
|
137
137
|
else if (isReadonly) {
|
|
138
138
|
return {
|
|
139
139
|
letter: Codicon.lockSmall,
|
|
140
|
-
tooltip: ( localize(
|
|
140
|
+
tooltip: ( localize(14107, "Read-only")),
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
else if (isOrphaned) {
|
|
144
144
|
return {
|
|
145
145
|
color: listErrorForeground,
|
|
146
146
|
strikethrough: true,
|
|
147
|
-
tooltip: ( localize(
|
|
147
|
+
tooltip: ( localize(14108, "Deleted")),
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
150
|
return undefined;
|
|
@@ -279,17 +279,17 @@ let FileWorkingCopyManager = class FileWorkingCopyManager extends Disposable {
|
|
|
279
279
|
const { confirmed } = await this.dialogService.confirm({
|
|
280
280
|
type: 'warning',
|
|
281
281
|
message: ( localize(
|
|
282
|
-
|
|
282
|
+
14109,
|
|
283
283
|
"'{0}' already exists. Do you want to replace it?",
|
|
284
284
|
basename(resource)
|
|
285
285
|
)),
|
|
286
286
|
detail: ( localize(
|
|
287
|
-
|
|
287
|
+
14110,
|
|
288
288
|
"A file or folder with the name '{0}' already exists in the folder '{1}'. Replacing it will overwrite its current contents.",
|
|
289
289
|
basename(resource),
|
|
290
290
|
basename(dirname(resource))
|
|
291
291
|
)),
|
|
292
|
-
primaryButton: ( localize(
|
|
292
|
+
primaryButton: ( localize(14111, "&&Replace"))
|
|
293
293
|
});
|
|
294
294
|
return confirmed;
|
|
295
295
|
}
|
|
@@ -297,12 +297,12 @@ let FileWorkingCopyManager = class FileWorkingCopyManager extends Disposable {
|
|
|
297
297
|
const { confirmed } = await this.dialogService.confirm({
|
|
298
298
|
type: 'warning',
|
|
299
299
|
message: ( localize(
|
|
300
|
-
|
|
300
|
+
14112,
|
|
301
301
|
"'{0}' is marked as read-only. Do you want to save anyway?",
|
|
302
302
|
basename(resource)
|
|
303
303
|
)),
|
|
304
|
-
detail: ( localize(
|
|
305
|
-
primaryButton: ( localize(
|
|
304
|
+
detail: ( localize(14113, "Paths can be configured as read-only via settings.")),
|
|
305
|
+
primaryButton: ( localize(14114, "&&Save Anyway"))
|
|
306
306
|
});
|
|
307
307
|
return confirmed;
|
|
308
308
|
}
|
|
@@ -78,7 +78,7 @@ let StoredFileWorkingCopyManager = class StoredFileWorkingCopyManager extends Ba
|
|
|
78
78
|
this._register(this.lifecycleService.onBeforeShutdown(event => event.veto(this.onBeforeShutdownWeb(), 'veto.fileWorkingCopyManager')));
|
|
79
79
|
}
|
|
80
80
|
else {
|
|
81
|
-
this._register(this.lifecycleService.onWillShutdown(event => event.join(this.onWillShutdownDesktop(), { id: 'join.fileWorkingCopyManager', label: ( localize(
|
|
81
|
+
this._register(this.lifecycleService.onWillShutdown(event => event.join(this.onWillShutdownDesktop(), { id: 'join.fileWorkingCopyManager', label: ( localize(14132, "Saving working copies")) })));
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
onBeforeShutdownWeb() {
|