@codingame/monaco-vscode-multi-diff-editor-service-override 5.3.0 → 6.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-multi-diff-editor-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"vscode": "npm:@codingame/monaco-vscode-api@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@6.0.0"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -3,9 +3,11 @@ import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextK
|
|
|
3
3
|
import { localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
4
4
|
import { Action2, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
5
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
6
|
+
import { resolveCommandsContext, getCommandsContext } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorCommands';
|
|
6
7
|
import { TextFileEditor } from 'vscode/vscode/vs/workbench/contrib/files/browser/editors/textFileEditor';
|
|
7
8
|
import { MultiDiffEditor } from './multiDiffEditor.js';
|
|
8
9
|
import { MultiDiffEditorInput } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
10
|
+
import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
9
11
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
10
12
|
|
|
11
13
|
const _moduleId = "vs/workbench/contrib/multiDiffEditor/browser/actions";
|
|
@@ -67,11 +69,10 @@ class CollapseAllAction extends Action2 {
|
|
|
67
69
|
f1: true,
|
|
68
70
|
});
|
|
69
71
|
}
|
|
70
|
-
async run(accessor,
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
const viewModel = await activeEditor.getViewModel();
|
|
72
|
+
async run(accessor, resourceOrContext, context) {
|
|
73
|
+
const { editor } = resolveCommandsContext(accessor.get(IEditorGroupsService), getCommandsContext(accessor, resourceOrContext, context));
|
|
74
|
+
if (editor instanceof MultiDiffEditorInput) {
|
|
75
|
+
const viewModel = await editor.getViewModel();
|
|
75
76
|
viewModel.collapseAll();
|
|
76
77
|
}
|
|
77
78
|
}
|
|
@@ -98,11 +99,10 @@ class ExpandAllAction extends Action2 {
|
|
|
98
99
|
f1: true,
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
|
-
async run(accessor,
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
const viewModel = await activeEditor.getViewModel();
|
|
102
|
+
async run(accessor, resourceOrContext, context) {
|
|
103
|
+
const { editor } = resolveCommandsContext(accessor.get(IEditorGroupsService), getCommandsContext(accessor, resourceOrContext, context));
|
|
104
|
+
if (editor instanceof MultiDiffEditorInput) {
|
|
105
|
+
const viewModel = await editor.getViewModel();
|
|
106
106
|
viewModel.expandAll();
|
|
107
107
|
}
|
|
108
108
|
}
|
package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditor.contribution.js
CHANGED
|
@@ -4,13 +4,14 @@ import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/confi
|
|
|
4
4
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
5
5
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
6
6
|
import { EditorPaneDescriptor } from 'vscode/vscode/vs/workbench/browser/editor';
|
|
7
|
-
import { registerWorkbenchContribution2 } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
7
|
+
import { registerWorkbenchContribution2, WorkbenchPhase } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
8
8
|
import { EditorExtensions } from 'vscode/vscode/vs/workbench/common/editor';
|
|
9
9
|
import { MultiDiffEditor } from './multiDiffEditor.js';
|
|
10
10
|
import { MultiDiffEditorResolverContribution, MultiDiffEditorInput, MultiDiffEditorSerializer } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
11
11
|
import { GoToFileAction, CollapseAllAction, ExpandAllAction } from './actions.js';
|
|
12
12
|
import 'vscode/vscode/vs/base/common/lifecycle';
|
|
13
13
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
14
|
+
import 'vscode/vscode/vs/platform/instantiation/common/extensions';
|
|
14
15
|
import { OpenScmGroupAction, ScmMultiDiffSourceResolverContribution } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver';
|
|
15
16
|
|
|
16
17
|
const _moduleId = "vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditor.contribution";
|
|
@@ -27,10 +28,10 @@ registerAction2(ExpandAllAction);
|
|
|
27
28
|
},
|
|
28
29
|
}
|
|
29
30
|
});
|
|
30
|
-
registerWorkbenchContribution2(MultiDiffEditorResolverContribution.ID, MultiDiffEditorResolverContribution,
|
|
31
|
+
registerWorkbenchContribution2(MultiDiffEditorResolverContribution.ID, MultiDiffEditorResolverContribution, WorkbenchPhase.BlockStartup );
|
|
31
32
|
( (Registry.as(EditorExtensions.EditorPane)))
|
|
32
33
|
.registerEditorPane(EditorPaneDescriptor.create(MultiDiffEditor, MultiDiffEditor.ID, ( localizeWithPath(_moduleId, 0, "Multi Diff Editor"))), [( (new SyncDescriptor(MultiDiffEditorInput)))]);
|
|
33
34
|
( (Registry.as(EditorExtensions.EditorFactory)))
|
|
34
35
|
.registerEditorSerializer(MultiDiffEditorInput.ID, MultiDiffEditorSerializer);
|
|
35
36
|
registerAction2(OpenScmGroupAction);
|
|
36
|
-
registerWorkbenchContribution2(ScmMultiDiffSourceResolverContribution.ID, ScmMultiDiffSourceResolverContribution,
|
|
37
|
+
registerWorkbenchContribution2(ScmMultiDiffSourceResolverContribution.ID, ScmMultiDiffSourceResolverContribution, WorkbenchPhase.BlockStartup );
|