@codingame/monaco-vscode-scm-service-override 21.6.0 → 22.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 +15 -14
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +7 -7
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +3 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +13 -13
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +116 -84
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +23 -23
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +104 -88
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +3 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +2 -2
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +30 -32
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPaneContainer.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +1 -1
|
@@ -55,75 +55,75 @@ let SCMAccessibilityHelpContentProvider = class SCMAccessibilityHelpContentProvi
|
|
|
55
55
|
const content = [];
|
|
56
56
|
if (this._scmViewService.visibleRepositories.length > 1) {
|
|
57
57
|
const repositoryList = ( this._scmViewService.visibleRepositories.map(r => r.provider.name)).join(', ');
|
|
58
|
-
content.push(( localize(
|
|
58
|
+
content.push(( localize(10085, "Visible repositories: {0}", repositoryList)));
|
|
59
59
|
}
|
|
60
60
|
const focusedRepository = this._scmViewService.focusedRepository;
|
|
61
61
|
if (focusedRepository) {
|
|
62
|
-
content.push(( localize(
|
|
62
|
+
content.push(( localize(10086, "Repository: {0}", focusedRepository.provider.name)));
|
|
63
63
|
const currentHistoryItemRef = focusedRepository.provider.historyProvider.get()?.historyItemRef.get();
|
|
64
64
|
if (currentHistoryItemRef) {
|
|
65
|
-
content.push(( localize(
|
|
65
|
+
content.push(( localize(10087, "History item reference: {0}", currentHistoryItemRef.name)));
|
|
66
66
|
}
|
|
67
67
|
if (focusedRepository.input.visible && focusedRepository.input.enabled && focusedRepository.input.value !== '') {
|
|
68
|
-
content.push(( localize(
|
|
68
|
+
content.push(( localize(10088, "Commit message: {0}", focusedRepository.input.value)));
|
|
69
69
|
}
|
|
70
70
|
const actionButton = focusedRepository.provider.actionButton.get();
|
|
71
71
|
if (actionButton) {
|
|
72
72
|
const label = actionButton.command.tooltip ?? actionButton.command.title;
|
|
73
|
-
const enablementLabel = actionButton.enabled ? ( localize(
|
|
74
|
-
content.push(( localize(
|
|
73
|
+
const enablementLabel = actionButton.enabled ? ( localize(10089, "enabled")) : ( localize(10090, "disabled"));
|
|
74
|
+
content.push(( localize(10091, "Action button: {0}, {1}", label, enablementLabel)));
|
|
75
75
|
}
|
|
76
76
|
const resourceGroups = [];
|
|
77
77
|
for (const resourceGroup of focusedRepository.provider.groups) {
|
|
78
78
|
resourceGroups.push(`${resourceGroup.label} (${resourceGroup.resources.length} resource(s))`);
|
|
79
79
|
}
|
|
80
80
|
( focusedRepository.provider.groups.map(g => g.label)).join(', ');
|
|
81
|
-
content.push(( localize(
|
|
81
|
+
content.push(( localize(10092, "Resource groups: {0}", resourceGroups.join(', '))));
|
|
82
82
|
}
|
|
83
83
|
content.push(( localize(
|
|
84
|
-
|
|
84
|
+
10093,
|
|
85
85
|
"Use the \"Source Control: Focus on Source Control Repositories View\" command to open the Source Control Repositories view."
|
|
86
86
|
)));
|
|
87
87
|
content.push(( localize(
|
|
88
|
-
|
|
88
|
+
10094,
|
|
89
89
|
"The Source Control Repositories view lists all repositories from the workspace and is only shown when the workspace contains more than one repository."
|
|
90
90
|
)));
|
|
91
|
-
content.push(( localize(
|
|
91
|
+
content.push(( localize(10095, "Once the Source Control Repositories view is opened you can:")));
|
|
92
92
|
content.push(( localize(
|
|
93
|
-
|
|
93
|
+
10096,
|
|
94
94
|
" - Use the up/down arrow keys to navigate the list of repositories."
|
|
95
95
|
)));
|
|
96
|
-
content.push(( localize(
|
|
97
|
-
content.push(( localize(
|
|
96
|
+
content.push(( localize(10097, " - Use the Enter or Space keys to select a repository.")));
|
|
97
|
+
content.push(( localize(10098, " - Use Shift + up/down keys to select multiple repositories.")));
|
|
98
98
|
content.push(( localize(
|
|
99
|
-
|
|
99
|
+
10099,
|
|
100
100
|
"Use the \"Source Control: Focus on Source Control View\" command to open the Source Control view."
|
|
101
101
|
)));
|
|
102
102
|
content.push(( localize(
|
|
103
|
-
|
|
103
|
+
10100,
|
|
104
104
|
"The Source Control view displays the resource groups and resources of the repository. If the workspace contains more than one repository it will list the resource groups and resources of the repositories selected in the Source Control Repositories view."
|
|
105
105
|
)));
|
|
106
|
-
content.push(( localize(
|
|
106
|
+
content.push(( localize(10101, "Once the Source Control view is opened you can:")));
|
|
107
107
|
content.push(( localize(
|
|
108
|
-
|
|
108
|
+
10102,
|
|
109
109
|
" - Use the up/down arrow keys to navigate the list of repositories, resource groups and resources."
|
|
110
110
|
)));
|
|
111
|
-
content.push(( localize(
|
|
111
|
+
content.push(( localize(10103, " - Use the Space key to expand or collapse a resource group.")));
|
|
112
112
|
content.push(( localize(
|
|
113
|
-
|
|
113
|
+
10104,
|
|
114
114
|
"Use the \"Source Control: Focus on Source Control Graph View\" command to open the Source Control Graph view."
|
|
115
115
|
)));
|
|
116
116
|
content.push(( localize(
|
|
117
|
-
|
|
117
|
+
10105,
|
|
118
118
|
"The Source Control Graph view displays a graph history items of the repository. If the workspace contains more than one repository it will list the history items of the active repository."
|
|
119
119
|
)));
|
|
120
|
-
content.push(( localize(
|
|
120
|
+
content.push(( localize(10106, "Once the Source Control Graph view is opened you can:")));
|
|
121
121
|
content.push(( localize(
|
|
122
|
-
|
|
122
|
+
10107,
|
|
123
123
|
" - Use the up/down arrow keys to navigate the list of history items."
|
|
124
124
|
)));
|
|
125
125
|
content.push(( localize(
|
|
126
|
-
|
|
126
|
+
10108,
|
|
127
127
|
" - Use the Space key to open the history item details in the multi-file diff editor."
|
|
128
128
|
)));
|
|
129
129
|
return content.join('\n');
|
|
@@ -6,7 +6,7 @@ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
6
6
|
import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
|
|
7
7
|
import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
|
|
8
8
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
9
|
-
import { IViewPaneOptions, ViewPane } from "@codingame/monaco-vscode-
|
|
9
|
+
import { IViewPaneOptions, ViewPane } from "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
10
10
|
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|
|
11
11
|
import { ISCMProvider, ViewMode } from "@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm";
|
|
12
12
|
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
@@ -31,11 +31,11 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/misc
|
|
|
31
31
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
32
32
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
|
|
33
33
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
34
|
-
import { ViewAction, ViewPane, ViewPaneShowActions } from '@codingame/monaco-vscode-
|
|
34
|
+
import { ViewAction, ViewPane, ViewPaneShowActions } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
35
35
|
import { ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
36
36
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
37
|
-
import { renderSCMHistoryItemGraph, historyItemHoverDefaultLabelBackground, historyItemHoverLabelForeground, SWIMLANE_WIDTH, renderSCMHistoryGraphPlaceholder, getHistoryItemIndex, toISCMHistoryItemViewModelArray } from '@codingame/monaco-vscode-
|
|
38
|
-
import { getHistoryItemEditorTitle, isSCMHistoryItemViewModelTreeElement, isSCMHistoryItemChangeViewModelTreeElement, isSCMHistoryItemChangeNode, isSCMHistoryItemLoadMoreTreeElement, getHistoryItemHoverContent, isSCMRepository, getProviderKey } from '@codingame/monaco-vscode-
|
|
37
|
+
import { renderSCMHistoryItemGraph, historyItemHoverDefaultLabelBackground, historyItemHoverLabelForeground, SWIMLANE_WIDTH, renderSCMHistoryGraphPlaceholder, getHistoryItemIndex, toISCMHistoryItemViewModelArray } from '@codingame/monaco-vscode-5084de40-f866-5cb5-9d9b-33a10f6f235d-common/vscode/vs/workbench/contrib/scm/browser/scmHistory';
|
|
38
|
+
import { getHistoryItemEditorTitle, isSCMHistoryItemViewModelTreeElement, isSCMHistoryItemChangeViewModelTreeElement, isSCMHistoryItemChangeNode, isSCMHistoryItemLoadMoreTreeElement, getHistoryItemHoverContent, isSCMRepository, getProviderKey } from '@codingame/monaco-vscode-5084de40-f866-5cb5-9d9b-33a10f6f235d-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
39
39
|
import { HISTORY_VIEW_PANE_ID, ViewMode } from '@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm';
|
|
40
40
|
import { ISCMService, ISCMViewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
41
41
|
import { stripIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iconLabels';
|
|
@@ -65,14 +65,14 @@ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform
|
|
|
65
65
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
66
66
|
import { groupBy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/collections';
|
|
67
67
|
import { getActionBarActions, getFlatContextMenuActions } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/menuEntryActionViewItem';
|
|
68
|
-
import { ResourceLabels } from '@codingame/monaco-vscode-
|
|
68
|
+
import { ResourceLabels } from '@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/workbench/browser/labels';
|
|
69
69
|
import { FileKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
|
|
70
70
|
import { WorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
71
71
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
72
72
|
import { basename } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
73
73
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
74
|
-
import { ScmHistoryItemResolver } from '@codingame/monaco-vscode-
|
|
75
|
-
import { ResourceTree } from '@codingame/monaco-vscode-
|
|
74
|
+
import { ScmHistoryItemResolver } from '@codingame/monaco-vscode-7969284a-1a12-5148-9750-fcf9656a693f-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver';
|
|
75
|
+
import { ResourceTree } from '@codingame/monaco-vscode-5084de40-f866-5cb5-9d9b-33a10f6f235d-common/vscode/vs/base/common/resourceTree';
|
|
76
76
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
77
77
|
import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
|
|
78
78
|
import { CodeDataTransfers } from '@codingame/monaco-vscode-api/vscode/vs/platform/dnd/browser/dnd';
|
|
@@ -125,23 +125,23 @@ class SCMHistoryItemRefsActionViewItem extends ActionViewItem {
|
|
|
125
125
|
icon.classList.add(...ThemeIcon.asClassNameArray(Codicon.gitBranch));
|
|
126
126
|
const name = $('.name');
|
|
127
127
|
if (this._historyItemsFilter === 'all') {
|
|
128
|
-
name.textContent = ( localize(
|
|
128
|
+
name.textContent = ( localize(10127, "All"));
|
|
129
129
|
}
|
|
130
130
|
else if (this._historyItemsFilter === 'auto') {
|
|
131
|
-
name.textContent = ( localize(
|
|
131
|
+
name.textContent = ( localize(10128, "Auto"));
|
|
132
132
|
}
|
|
133
133
|
else if (this._historyItemsFilter.length === 1) {
|
|
134
134
|
name.textContent = this._historyItemsFilter[0].name;
|
|
135
135
|
}
|
|
136
136
|
else {
|
|
137
|
-
name.textContent = ( localize(
|
|
137
|
+
name.textContent = ( localize(10129, "{0} Items", this._historyItemsFilter.length));
|
|
138
138
|
}
|
|
139
139
|
reset(this.label, icon, name);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
getTooltip() {
|
|
143
143
|
if (this._historyItemsFilter === 'all') {
|
|
144
|
-
return localize(
|
|
144
|
+
return localize(10130, "All history item references");
|
|
145
145
|
}
|
|
146
146
|
else if (this._historyItemsFilter === 'auto') {
|
|
147
147
|
const historyProvider = this._repository.provider.historyProvider.get();
|
|
@@ -163,7 +163,7 @@ registerAction2(class extends ViewAction {
|
|
|
163
163
|
constructor() {
|
|
164
164
|
super({
|
|
165
165
|
id: PICK_REPOSITORY_ACTION_ID,
|
|
166
|
-
title: ( localize(
|
|
166
|
+
title: ( localize(10131, "Repository Picker")),
|
|
167
167
|
viewId: HISTORY_VIEW_PANE_ID,
|
|
168
168
|
f1: false,
|
|
169
169
|
menu: {
|
|
@@ -182,7 +182,7 @@ registerAction2(class extends ViewAction {
|
|
|
182
182
|
constructor() {
|
|
183
183
|
super({
|
|
184
184
|
id: PICK_HISTORY_ITEM_REFS_ACTION_ID,
|
|
185
|
-
title: ( localize(
|
|
185
|
+
title: ( localize(10132, "History Item Reference Picker")),
|
|
186
186
|
icon: Codicon.gitBranch,
|
|
187
187
|
viewId: HISTORY_VIEW_PANE_ID,
|
|
188
188
|
precondition: ( ContextKeys.SCMHistoryItemCount.notEqualsTo(0)),
|
|
@@ -202,7 +202,7 @@ registerAction2(class extends ViewAction {
|
|
|
202
202
|
constructor() {
|
|
203
203
|
super({
|
|
204
204
|
id: 'workbench.scm.action.graph.revealCurrentHistoryItem',
|
|
205
|
-
title: ( localize(
|
|
205
|
+
title: ( localize(10133, "Go to Current History Item")),
|
|
206
206
|
icon: Codicon.target,
|
|
207
207
|
viewId: HISTORY_VIEW_PANE_ID,
|
|
208
208
|
precondition: ( ContextKeyExpr.and(( ContextKeys.SCMHistoryItemCount.notEqualsTo(0)), ( ContextKeys.SCMCurrentHistoryItemRefInFilter.isEqualTo(true)))),
|
|
@@ -222,7 +222,7 @@ registerAction2(class extends ViewAction {
|
|
|
222
222
|
constructor() {
|
|
223
223
|
super({
|
|
224
224
|
id: 'workbench.scm.action.graph.refresh',
|
|
225
|
-
title: ( localize(
|
|
225
|
+
title: ( localize(10134, "Refresh")),
|
|
226
226
|
viewId: HISTORY_VIEW_PANE_ID,
|
|
227
227
|
f1: false,
|
|
228
228
|
icon: Codicon.refresh,
|
|
@@ -241,7 +241,7 @@ registerAction2(class extends ViewAction {
|
|
|
241
241
|
constructor() {
|
|
242
242
|
super({
|
|
243
243
|
id: 'workbench.scm.action.graph.setListViewMode',
|
|
244
|
-
title: ( localize(
|
|
244
|
+
title: ( localize(10135, "View as List")),
|
|
245
245
|
viewId: HISTORY_VIEW_PANE_ID,
|
|
246
246
|
toggled: ( ContextKeys.SCMHistoryViewMode.isEqualTo(ViewMode.List)),
|
|
247
247
|
menu: { id: MenuId.SCMHistoryTitle, group: '9_viewmode', order: 1 },
|
|
@@ -256,7 +256,7 @@ registerAction2(class extends ViewAction {
|
|
|
256
256
|
constructor() {
|
|
257
257
|
super({
|
|
258
258
|
id: 'workbench.scm.action.graph.setTreeViewMode',
|
|
259
|
-
title: ( localize(
|
|
259
|
+
title: ( localize(10136, "View as Tree")),
|
|
260
260
|
viewId: HISTORY_VIEW_PANE_ID,
|
|
261
261
|
toggled: ( ContextKeys.SCMHistoryViewMode.isEqualTo(ViewMode.Tree)),
|
|
262
262
|
menu: { id: MenuId.SCMHistoryTitle, group: '9_viewmode', order: 2 },
|
|
@@ -271,7 +271,7 @@ registerAction2(class extends Action2 {
|
|
|
271
271
|
constructor() {
|
|
272
272
|
super({
|
|
273
273
|
id: 'workbench.scm.action.graph.viewChanges',
|
|
274
|
-
title: ( localize(
|
|
274
|
+
title: ( localize(10137, "Open Changes")),
|
|
275
275
|
icon: Codicon.diffMultiple,
|
|
276
276
|
f1: false,
|
|
277
277
|
menu: [
|
|
@@ -307,7 +307,7 @@ registerAction2(class extends Action2 {
|
|
|
307
307
|
const title = historyItems.length === 1 ?
|
|
308
308
|
getHistoryItemEditorTitle(historyItem) :
|
|
309
309
|
( localize(
|
|
310
|
-
|
|
310
|
+
10138,
|
|
311
311
|
"All Changes ({0} ↔ {1})",
|
|
312
312
|
historyItemLast.displayId ?? historyItemLast.id,
|
|
313
313
|
historyItem.displayId ?? historyItem.id
|
|
@@ -320,7 +320,7 @@ registerAction2(class extends Action2 {
|
|
|
320
320
|
constructor() {
|
|
321
321
|
super({
|
|
322
322
|
id: 'workbench.scm.action.graph.openFile',
|
|
323
|
-
title: ( localize(
|
|
323
|
+
title: ( localize(10139, "Open File")),
|
|
324
324
|
icon: Codicon.goToFile,
|
|
325
325
|
f1: false,
|
|
326
326
|
menu: [
|
|
@@ -329,6 +329,11 @@ registerAction2(class extends Action2 {
|
|
|
329
329
|
group: 'inline',
|
|
330
330
|
order: 1
|
|
331
331
|
},
|
|
332
|
+
{
|
|
333
|
+
id: MenuId.SCMHistoryItemChangeContext,
|
|
334
|
+
group: '0_view',
|
|
335
|
+
order: 1
|
|
336
|
+
}
|
|
332
337
|
]
|
|
333
338
|
});
|
|
334
339
|
}
|
|
@@ -654,7 +659,7 @@ let HistoryItemLoadMoreRenderer = class HistoryItemLoadMoreRenderer {
|
|
|
654
659
|
templateData.elementDisposables.add(autorun(reader => {
|
|
655
660
|
const isLoadingMore = this._isLoadingMore.read(reader);
|
|
656
661
|
const icon = `$(${isLoadingMore ? 'loading~spin' : 'fold-down'})`;
|
|
657
|
-
templateData.historyItemPlaceholderLabel.setLabel(( localize(
|
|
662
|
+
templateData.historyItemPlaceholderLabel.setLabel(( localize(10140, "{0} Load More...", icon)));
|
|
658
663
|
}));
|
|
659
664
|
}
|
|
660
665
|
}
|
|
@@ -714,7 +719,7 @@ SCMHistoryViewPaneActionRunner = ( __decorate([
|
|
|
714
719
|
], SCMHistoryViewPaneActionRunner));
|
|
715
720
|
class SCMHistoryTreeAccessibilityProvider {
|
|
716
721
|
getWidgetAriaLabel() {
|
|
717
|
-
return localize(
|
|
722
|
+
return localize(10141, "Source Control History");
|
|
718
723
|
}
|
|
719
724
|
getAriaLabel(element) {
|
|
720
725
|
if (isSCMRepository(element)) {
|
|
@@ -897,7 +902,7 @@ class SCMHistoryTreeDragAndDrop {
|
|
|
897
902
|
_getTreeElementLabel(element) {
|
|
898
903
|
if (isSCMHistoryItemViewModelTreeElement(element)) {
|
|
899
904
|
const historyItem = element.historyItemViewModel.historyItem;
|
|
900
|
-
return
|
|
905
|
+
return historyItem.displayId ?? historyItem.id;
|
|
901
906
|
}
|
|
902
907
|
return undefined;
|
|
903
908
|
}
|
|
@@ -949,7 +954,7 @@ let SCMHistoryViewModel = class SCMHistoryViewModel extends Disposable {
|
|
|
949
954
|
if (!repository) {
|
|
950
955
|
return;
|
|
951
956
|
}
|
|
952
|
-
if (this.repository.
|
|
957
|
+
if (this.repository.read(undefined) === repository) {
|
|
953
958
|
this._selectedRepository.set(Iterable.first(this._scmService.repositories) ?? 'auto', undefined);
|
|
954
959
|
}
|
|
955
960
|
this._repositoryState.delete(repository);
|
|
@@ -1157,8 +1162,8 @@ let RepositoryPicker = class RepositoryPicker {
|
|
|
1157
1162
|
this._quickInputService = _quickInputService;
|
|
1158
1163
|
this._scmViewService = _scmViewService;
|
|
1159
1164
|
this._autoQuickPickItem = {
|
|
1160
|
-
label: ( localize(
|
|
1161
|
-
description: ( localize(
|
|
1165
|
+
label: ( localize(10128, "Auto")),
|
|
1166
|
+
description: ( localize(10142, "Show the source control graph for the active repository")),
|
|
1162
1167
|
repository: 'auto'
|
|
1163
1168
|
};
|
|
1164
1169
|
}
|
|
@@ -1176,7 +1181,7 @@ let RepositoryPicker = class RepositoryPicker {
|
|
|
1176
1181
|
repository: r
|
|
1177
1182
|
}))));
|
|
1178
1183
|
return this._quickInputService.pick(picks, {
|
|
1179
|
-
placeHolder: ( localize(
|
|
1184
|
+
placeHolder: ( localize(10143, "Select the repository to view, type to filter all repositories"))
|
|
1180
1185
|
});
|
|
1181
1186
|
}
|
|
1182
1187
|
};
|
|
@@ -1192,21 +1197,21 @@ let HistoryItemRefPicker = class HistoryItemRefPicker extends Disposable {
|
|
|
1192
1197
|
this._quickInputService = _quickInputService;
|
|
1193
1198
|
this._allQuickPickItem = {
|
|
1194
1199
|
id: 'all',
|
|
1195
|
-
label: ( localize(
|
|
1196
|
-
description: ( localize(
|
|
1200
|
+
label: ( localize(10127, "All")),
|
|
1201
|
+
description: ( localize(10130, "All history item references")),
|
|
1197
1202
|
historyItemRef: 'all'
|
|
1198
1203
|
};
|
|
1199
1204
|
this._autoQuickPickItem = {
|
|
1200
1205
|
id: 'auto',
|
|
1201
|
-
label: ( localize(
|
|
1202
|
-
description: ( localize(
|
|
1206
|
+
label: ( localize(10128, "Auto")),
|
|
1207
|
+
description: ( localize(10144, "Current history item reference(s)")),
|
|
1203
1208
|
historyItemRef: 'auto'
|
|
1204
1209
|
};
|
|
1205
1210
|
}
|
|
1206
1211
|
async pickHistoryItemRef() {
|
|
1207
1212
|
const quickPick = this._quickInputService.createQuickPick({ useSeparators: true });
|
|
1208
1213
|
this._store.add(quickPick);
|
|
1209
|
-
quickPick.placeholder = ( localize(
|
|
1214
|
+
quickPick.placeholder = ( localize(10145, "Select one/more history item references to view, type to filter"));
|
|
1210
1215
|
quickPick.canSelectMany = true;
|
|
1211
1216
|
quickPick.hideCheckAll = true;
|
|
1212
1217
|
quickPick.busy = true;
|
|
@@ -1336,7 +1341,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
|
|
|
1336
1341
|
container.appendChild(element.root);
|
|
1337
1342
|
this._register(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), element.root, {
|
|
1338
1343
|
markdown: {
|
|
1339
|
-
value: ( localize(
|
|
1344
|
+
value: ( localize(10146, "Please refresh the graph using the refresh action ($(refresh)).")),
|
|
1340
1345
|
supportThemeIcons: true
|
|
1341
1346
|
},
|
|
1342
1347
|
markdownNotSupportedFallback: undefined
|
|
@@ -1402,7 +1407,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
|
|
|
1402
1407
|
}));
|
|
1403
1408
|
store.add(runOnChange(this._treeViewModel.onDidChangeHistoryItemsFilter, async () => {
|
|
1404
1409
|
await this.refresh();
|
|
1405
|
-
this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefId.
|
|
1410
|
+
this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefId.read(undefined)));
|
|
1406
1411
|
}));
|
|
1407
1412
|
store.add(autorun(reader => {
|
|
1408
1413
|
this._scmCurrentHistoryItemRefHasRemote.set(!!historyProvider.historyItemRemoteRef.read(reader));
|
|
@@ -1411,7 +1416,7 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
|
|
|
1411
1416
|
await this._updateChildren();
|
|
1412
1417
|
}));
|
|
1413
1418
|
this._scmProviderCtx.set(repository.provider.providerId);
|
|
1414
|
-
this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefId.
|
|
1419
|
+
this._scmCurrentHistoryItemRefInFilter.set(this._isCurrentHistoryItemInFilter(historyItemRefId.read(undefined)));
|
|
1415
1420
|
if (!isFirstRun) {
|
|
1416
1421
|
this.refresh();
|
|
1417
1422
|
}
|
|
@@ -1601,66 +1606,77 @@ let SCMHistoryViewPane = class SCMHistoryViewPane extends ViewPane {
|
|
|
1601
1606
|
}
|
|
1602
1607
|
_onContextMenu(e) {
|
|
1603
1608
|
const element = e.element;
|
|
1604
|
-
if (
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
historyItemRefActions.
|
|
1609
|
+
if (isSCMHistoryItemViewModelTreeElement(element)) {
|
|
1610
|
+
this._contextMenuDisposables.value = ( new DisposableStore());
|
|
1611
|
+
const historyItemRefMenuItems = MenuRegistry.getMenuItems(MenuId.SCMHistoryItemRefContext).filter(item => isIMenuItem(item));
|
|
1612
|
+
if (historyItemRefMenuItems.length > 0 && element.historyItemViewModel.historyItem.references?.length) {
|
|
1613
|
+
const historyItemRefActions = ( new Map());
|
|
1614
|
+
for (const ref of element.historyItemViewModel.historyItem.references) {
|
|
1615
|
+
const contextKeyService = this.scopedContextKeyService.createOverlay([
|
|
1616
|
+
['scmHistoryItemRef', ref.id]
|
|
1617
|
+
]);
|
|
1618
|
+
const menuActions = this._menuService.getMenuActions(MenuId.SCMHistoryItemRefContext, contextKeyService);
|
|
1619
|
+
for (const action of menuActions.flatMap(a => a[1])) {
|
|
1620
|
+
if (!( historyItemRefActions.has(action.id))) {
|
|
1621
|
+
historyItemRefActions.set(action.id, []);
|
|
1622
|
+
}
|
|
1623
|
+
historyItemRefActions.get(action.id).push(ref);
|
|
1619
1624
|
}
|
|
1620
|
-
historyItemRefActions.get(action.id).push(ref);
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
for (const historyItemRefMenuItem of historyItemRefMenuItems) {
|
|
1624
|
-
const actionId = historyItemRefMenuItem.command.id;
|
|
1625
|
-
if (!( historyItemRefActions.has(actionId))) {
|
|
1626
|
-
continue;
|
|
1627
1625
|
}
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
id: `${actionId}.${historyItemRef.id}`,
|
|
1639
|
-
title: historyItemRef.name,
|
|
1640
|
-
menu: {
|
|
1641
|
-
id: MenuId.for(actionId),
|
|
1642
|
-
group: historyItemRef.category
|
|
1643
|
-
}
|
|
1644
|
-
});
|
|
1645
|
-
}
|
|
1646
|
-
run(accessor, ...args) {
|
|
1647
|
-
const commandService = accessor.get(ICommandService);
|
|
1648
|
-
commandService.executeCommand(actionId, ...args, historyItemRef.id);
|
|
1649
|
-
}
|
|
1626
|
+
for (const historyItemRefMenuItem of historyItemRefMenuItems) {
|
|
1627
|
+
const actionId = historyItemRefMenuItem.command.id;
|
|
1628
|
+
if (!( historyItemRefActions.has(actionId))) {
|
|
1629
|
+
continue;
|
|
1630
|
+
}
|
|
1631
|
+
this._contextMenuDisposables.value.add(MenuRegistry.appendMenuItem(MenuId.SCMHistoryItemContext, {
|
|
1632
|
+
title: historyItemRefMenuItem.command.title,
|
|
1633
|
+
submenu: MenuId.for(actionId),
|
|
1634
|
+
group: historyItemRefMenuItem?.group,
|
|
1635
|
+
order: historyItemRefMenuItem?.order
|
|
1650
1636
|
}));
|
|
1637
|
+
for (const historyItemRef of historyItemRefActions.get(actionId) ?? []) {
|
|
1638
|
+
this._contextMenuDisposables.value.add(registerAction2(class extends Action2 {
|
|
1639
|
+
constructor() {
|
|
1640
|
+
super({
|
|
1641
|
+
id: `${actionId}.${historyItemRef.id}`,
|
|
1642
|
+
title: historyItemRef.name,
|
|
1643
|
+
menu: {
|
|
1644
|
+
id: MenuId.for(actionId),
|
|
1645
|
+
group: historyItemRef.category
|
|
1646
|
+
}
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1649
|
+
run(accessor, ...args) {
|
|
1650
|
+
const commandService = accessor.get(ICommandService);
|
|
1651
|
+
commandService.executeCommand(actionId, ...args, historyItemRef.id);
|
|
1652
|
+
}
|
|
1653
|
+
}));
|
|
1654
|
+
}
|
|
1651
1655
|
}
|
|
1652
1656
|
}
|
|
1657
|
+
const menuActions = this._menuService.getMenuActions(MenuId.SCMHistoryItemContext, this.scopedContextKeyService, {
|
|
1658
|
+
arg: element.repository.provider,
|
|
1659
|
+
shouldForwardArgs: true
|
|
1660
|
+
}).filter(group => group[0] !== 'inline');
|
|
1661
|
+
this.contextMenuService.showContextMenu({
|
|
1662
|
+
contextKeyService: this.scopedContextKeyService,
|
|
1663
|
+
getAnchor: () => e.anchor,
|
|
1664
|
+
getActions: () => getFlatContextMenuActions(menuActions),
|
|
1665
|
+
getActionsContext: () => element.historyItemViewModel.historyItem
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
else if (isSCMHistoryItemChangeViewModelTreeElement(element)) {
|
|
1669
|
+
const menuActions = this._menuService.getMenuActions(MenuId.SCMHistoryItemChangeContext, this.scopedContextKeyService, {
|
|
1670
|
+
arg: element.historyItemViewModel.historyItem,
|
|
1671
|
+
shouldForwardArgs: true
|
|
1672
|
+
}).filter(group => group[0] !== 'inline');
|
|
1673
|
+
this.contextMenuService.showContextMenu({
|
|
1674
|
+
contextKeyService: this.scopedContextKeyService,
|
|
1675
|
+
getAnchor: () => e.anchor,
|
|
1676
|
+
getActions: () => getFlatContextMenuActions(menuActions),
|
|
1677
|
+
getActionsContext: () => element.historyItemChange
|
|
1678
|
+
});
|
|
1653
1679
|
}
|
|
1654
|
-
const historyItemMenuActions = this._menuService.getMenuActions(MenuId.SCMHistoryItemContext, this.scopedContextKeyService, {
|
|
1655
|
-
arg: element.repository.provider,
|
|
1656
|
-
shouldForwardArgs: true
|
|
1657
|
-
}).filter(group => group[0] !== 'inline');
|
|
1658
|
-
this.contextMenuService.showContextMenu({
|
|
1659
|
-
contextKeyService: this.scopedContextKeyService,
|
|
1660
|
-
getAnchor: () => e.anchor,
|
|
1661
|
-
getActions: () => getFlatContextMenuActions(historyItemMenuActions),
|
|
1662
|
-
getActionsContext: () => element.historyItemViewModel.historyItem
|
|
1663
|
-
});
|
|
1664
1680
|
}
|
|
1665
1681
|
async _loadMore(cursor) {
|
|
1666
1682
|
return this._treeLoadMoreSequencer.queue(async () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-
|
|
1
|
+
import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
2
2
|
import { ISCMViewService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
3
3
|
import { ISCMService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
4
4
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
@@ -3,7 +3,7 @@ import { registerCss } from '@codingame/monaco-vscode-api/css';
|
|
|
3
3
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
4
4
|
import * as scm from './media/scm.css';
|
|
5
5
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
6
|
-
import { ViewPane } from '@codingame/monaco-vscode-
|
|
6
|
+
import { ViewPane } from '@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
7
7
|
import { append, $ } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
8
8
|
import { WorkbenchCompressibleAsyncDataTree } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
9
9
|
import { ISCMViewService, ISCMService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
@@ -17,7 +17,7 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
17
17
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
18
18
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
19
19
|
import { RepositoryRenderer, RepositoryActionRunner } from './scmRepositoryRenderer.js';
|
|
20
|
-
import { isSCMRepository, getActionViewItemProvider, collectContextMenuActions } from '@codingame/monaco-vscode-
|
|
20
|
+
import { isSCMRepository, getActionViewItemProvider, collectContextMenuActions } from '@codingame/monaco-vscode-5084de40-f866-5cb5-9d9b-33a10f6f235d-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
21
21
|
import { Orientation } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/sash/sash';
|
|
22
22
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
23
23
|
import { MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
@@ -157,7 +157,7 @@ let SCMRepositoriesViewPane = class SCMRepositoriesViewPane extends ViewPane {
|
|
|
157
157
|
return r.provider.label;
|
|
158
158
|
},
|
|
159
159
|
getWidgetAriaLabel() {
|
|
160
|
-
return localize(
|
|
160
|
+
return localize(10147, "Source Control Repositories");
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
});
|
|
@@ -10,7 +10,7 @@ import { CountBadge } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/
|
|
|
10
10
|
import { IContextMenuService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
|
|
11
11
|
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
12
12
|
import { ActionRunner } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actions';
|
|
13
|
-
import { isSCMRepository, StatusBarAction, getRepositoryResourceCount, connectPrimaryMenu } from '@codingame/monaco-vscode-
|
|
13
|
+
import { isSCMRepository, StatusBarAction, getRepositoryResourceCount, connectPrimaryMenu } from '@codingame/monaco-vscode-5084de40-f866-5cb5-9d9b-33a10f6f235d-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
14
14
|
import { defaultCountBadgeStyles } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/browser/defaultStyles';
|
|
15
15
|
import { WorkbenchToolBar } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/browser/toolbar';
|
|
16
16
|
import { MenuItemAction, MenuId } from '@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
2
|
import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
-
import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-
|
|
3
|
+
import { ViewPane, IViewPaneOptions } from "@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common/vscode/vs/workbench/browser/parts/views/viewPane";
|
|
4
4
|
import { ISCMResourceGroup, ISCMResource, ISCMRepository, ISCMInput, ISCMActionButton, ISCMActionButtonDescriptor, ViewMode } from "@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm";
|
|
5
5
|
import { ISCMViewService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
6
6
|
import { ISCMService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
@@ -15,7 +15,7 @@ import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/ac
|
|
|
15
15
|
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
16
16
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
17
17
|
import { ITreeNode, ITreeSorter } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/tree";
|
|
18
|
-
import { IResourceNode } from "@codingame/monaco-vscode-
|
|
18
|
+
import { IResourceNode } from "@codingame/monaco-vscode-5084de40-f866-5cb5-9d9b-33a10f6f235d-common/vscode/vs/base/common/resourceTree";
|
|
19
19
|
import { ICompressibleTreeRenderer, ICompressibleKeyboardNavigationLabelProvider } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/tree/objectTree";
|
|
20
20
|
import { FuzzyScore } from "@codingame/monaco-vscode-api/vscode/vs/base/common/filters";
|
|
21
21
|
import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service";
|