@codingame/monaco-vscode-scm-service-override 19.1.4 → 20.0.1
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 +13 -15
- package/vscode/src/vs/workbench/contrib/scm/browser/activity.js +12 -8
- package/vscode/src/vs/workbench/contrib/scm/browser/media/scm.css +7 -10
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.d.ts +7 -4
- package/vscode/src/vs/workbench/contrib/scm/browser/menus.js +57 -12
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffDecorator.js +4 -4
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/quickDiffWidget.js +14 -14
- package/vscode/src/vs/workbench/contrib/scm/browser/scm.contribution.js +85 -90
- package/vscode/src/vs/workbench/contrib/scm/browser/scmAccessibilityHelp.js +23 -23
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryViewPane.js +101 -32
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.d.ts +9 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoriesViewPane.js +117 -55
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.d.ts +3 -8
- package/vscode/src/vs/workbench/contrib/scm/browser/scmRepositoryRenderer.js +34 -28
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewPane.js +34 -31
- package/vscode/src/vs/workbench/contrib/scm/browser/scmViewService.js +5 -3
- package/vscode/src/vs/workbench/contrib/scm/browser/workingSet.js +1 -1
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.d.ts +0 -9
- package/vscode/src/vs/workbench/contrib/scm/browser/scmHistoryChatContext.js +0 -185
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-scm-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - scm service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,20 +15,18 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common": "
|
|
19
|
-
"@codingame/monaco-vscode-
|
|
20
|
-
"@codingame/monaco-vscode-
|
|
21
|
-
"@codingame/monaco-vscode-
|
|
22
|
-
"@codingame/monaco-vscode-
|
|
23
|
-
"@codingame/monaco-vscode-
|
|
24
|
-
"@codingame/monaco-vscode-
|
|
25
|
-
"@codingame/monaco-vscode-
|
|
26
|
-
"@codingame/monaco-vscode-
|
|
27
|
-
"@codingame/monaco-vscode-
|
|
28
|
-
"@codingame/monaco-vscode-dbfe5f85-b426-55ed-a79b-5f811b395762-common": "
|
|
29
|
-
"@codingame/monaco-vscode-
|
|
30
|
-
"@codingame/monaco-vscode-f99b74f5-fcb7-512f-8c6c-35f5a107577d-common": "19.1.4",
|
|
31
|
-
"@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common": "19.1.4"
|
|
18
|
+
"@codingame/monaco-vscode-262ed59d-4f76-57cd-9e9f-1877f26ae049-common": "20.0.1",
|
|
19
|
+
"@codingame/monaco-vscode-27663a0b-1249-58ba-9085-e52d706b50bc-common": "20.0.1",
|
|
20
|
+
"@codingame/monaco-vscode-501b06ab-3f58-516b-8a1a-c29d375d3da4-common": "20.0.1",
|
|
21
|
+
"@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "20.0.1",
|
|
22
|
+
"@codingame/monaco-vscode-a8d3bd74-e63e-5327-96e8-4f931661e329-common": "20.0.1",
|
|
23
|
+
"@codingame/monaco-vscode-api": "20.0.1",
|
|
24
|
+
"@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common": "20.0.1",
|
|
25
|
+
"@codingame/monaco-vscode-c2deffc4-ad68-5e63-8f95-9b89e0fc6898-common": "20.0.1",
|
|
26
|
+
"@codingame/monaco-vscode-d0569cfb-4706-5ad6-b0b0-5115ad8685db-common": "20.0.1",
|
|
27
|
+
"@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common": "20.0.1",
|
|
28
|
+
"@codingame/monaco-vscode-dbfe5f85-b426-55ed-a79b-5f811b395762-common": "20.0.1",
|
|
29
|
+
"@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common": "20.0.1"
|
|
32
30
|
},
|
|
33
31
|
"main": "index.js",
|
|
34
32
|
"module": "index.js",
|
|
@@ -6,7 +6,7 @@ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
6
6
|
import { Event, Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
7
7
|
import { VIEW_PANE_ID } from '@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm';
|
|
8
8
|
import { ISCMService, ISCMViewService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
9
|
-
import { NumberBadge } from '@codingame/monaco-vscode-
|
|
9
|
+
import { NumberBadge } from '@codingame/monaco-vscode-d941ac7b-412f-57e3-b1bf-f6b0eb253b21-common/vscode/vs/workbench/services/activity/common/activity';
|
|
10
10
|
import { IActivityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/activity/common/activity.service';
|
|
11
11
|
import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
|
|
12
12
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
@@ -18,9 +18,10 @@ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
18
18
|
import { Iterable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iterator';
|
|
19
19
|
import { ITitleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/title/browser/titleService.service';
|
|
20
20
|
import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
|
|
21
|
-
import { getRepositoryResourceCount } from '@codingame/monaco-vscode-
|
|
21
|
+
import { getRepositoryResourceCount } from '@codingame/monaco-vscode-d0569cfb-4706-5ad6-b0b0-5115ad8685db-common/vscode/vs/workbench/contrib/scm/browser/util';
|
|
22
22
|
import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
|
|
23
23
|
import { observableConfigValue } from '@codingame/monaco-vscode-api/vscode/vs/platform/observable/common/platformObservableUtils';
|
|
24
|
+
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
24
25
|
import { observableFromEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableFromEvent';
|
|
25
26
|
import { derived } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/derived';
|
|
26
27
|
import { autorunWithStore, autorun } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/reactions/autorun';
|
|
@@ -104,7 +105,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
104
105
|
if (count === 0) {
|
|
105
106
|
return;
|
|
106
107
|
}
|
|
107
|
-
const badge = ( new NumberBadge(count, num => ( localize(
|
|
108
|
+
const badge = ( new NumberBadge(count, num => ( localize(9720, '{0} pending changes', num))));
|
|
108
109
|
store.add(this.activityService.showViewActivity(VIEW_PANE_ID, { badge }));
|
|
109
110
|
}
|
|
110
111
|
_updateStatusBar(repository, commands, store) {
|
|
@@ -130,7 +131,7 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
130
131
|
repoAgnosticActionName = '';
|
|
131
132
|
}
|
|
132
133
|
const statusbarEntry = {
|
|
133
|
-
name: ( localize(
|
|
134
|
+
name: ( localize(9721, "Source Control")) + (repoAgnosticActionName ? ` ${repoAgnosticActionName}` : ''),
|
|
134
135
|
text: command.title,
|
|
135
136
|
ariaLabel: tooltip,
|
|
136
137
|
tooltip,
|
|
@@ -141,9 +142,12 @@ let SCMActiveRepositoryController = class SCMActiveRepositoryController extends
|
|
|
141
142
|
this.statusbarService.addEntry(statusbarEntry, `status.scm.${index}`, StatusbarAlignment.LEFT, { location: { id: `status.scm.${index - 1}`, priority: 10000 }, alignment: StatusbarAlignment.RIGHT, compact: true }));
|
|
142
143
|
}
|
|
143
144
|
if (this.scmService.repositoryCount > 1) {
|
|
145
|
+
const icon = ThemeIcon.isThemeIcon(repository.provider.iconPath)
|
|
146
|
+
? `$(${repository.provider.iconPath.id})`
|
|
147
|
+
: '$(repo)';
|
|
144
148
|
const repositoryStatusbarEntry = {
|
|
145
|
-
name: ( localize(
|
|
146
|
-
text: `$
|
|
149
|
+
name: ( localize(9722, "Source Control Provider")),
|
|
150
|
+
text: `${icon} ${repository.provider.name}`,
|
|
147
151
|
ariaLabel: label,
|
|
148
152
|
tooltip: label,
|
|
149
153
|
command: 'scm.setActiveProvider'
|
|
@@ -171,8 +175,8 @@ let SCMActiveResourceContextKeyController = class SCMActiveResourceContextKeyCon
|
|
|
171
175
|
this.scmService = scmService;
|
|
172
176
|
this.uriIdentityService = uriIdentityService;
|
|
173
177
|
this._onDidRepositoryChange = ( new Emitter());
|
|
174
|
-
const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(
|
|
175
|
-
const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(
|
|
178
|
+
const activeResourceHasChangesContextKey = ( new RawContextKey('scmActiveResourceHasChanges', false, ( localize(9723, "Whether the active resource has changes"))));
|
|
179
|
+
const activeResourceRepositoryContextKey = ( new RawContextKey('scmActiveResourceRepository', undefined, ( localize(9724, "The active resource's repository"))));
|
|
176
180
|
this._repositories = observableFromEvent(this, Event.any(this.scmService.onDidAddRepository, this.scmService.onDidRemoveRepository), () => this.scmService.repositories);
|
|
177
181
|
this._store.add(autorunWithStore((reader, store) => {
|
|
178
182
|
for (const repository of this._repositories.read(reader)) {
|
|
@@ -33,19 +33,16 @@
|
|
|
33
33
|
.scm-view.auto-provider-counts .scm-provider > .count[data-count="0"] {
|
|
34
34
|
display: none;
|
|
35
35
|
}
|
|
36
|
-
.scm-view .scm-provider > .label {
|
|
36
|
+
.scm-view .scm-provider > .monaco-icon-label {
|
|
37
37
|
flex: 1;
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
text-overflow: ellipsis;
|
|
40
|
-
min-width: 50px;
|
|
41
38
|
}
|
|
42
|
-
.scm-view .scm-provider
|
|
39
|
+
.scm-view .scm-provider .monaco-highlighted-label {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
43
42
|
font-weight: bold;
|
|
44
43
|
}
|
|
45
|
-
.scm-view .scm-provider
|
|
46
|
-
|
|
47
|
-
margin-left: 0.5em;
|
|
48
|
-
font-size: 0.9em;
|
|
44
|
+
.scm-view .scm-provider .monaco-highlighted-label .codicon {
|
|
45
|
+
font-size: 14px;
|
|
49
46
|
}
|
|
50
47
|
.scm-view .scm-provider > .actions {
|
|
51
48
|
overflow: hidden;
|
|
@@ -395,7 +392,7 @@
|
|
|
395
392
|
.scm-view .scm-editor-container .placeholder-text.mtk1 {
|
|
396
393
|
color: var(--vscode-input-placeholderForeground);
|
|
397
394
|
}
|
|
398
|
-
.scm-repositories-view .
|
|
395
|
+
.scm-view.scm-repositories-view .monaco-highlighted-label {
|
|
399
396
|
font-weight: normal;
|
|
400
397
|
}
|
|
401
398
|
.monaco-hover.history-item-hover p:first-child {
|
|
@@ -5,7 +5,7 @@ import { IMenu } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/c
|
|
|
5
5
|
import { IMenuService } from "@codingame/monaco-vscode-api/vscode/vs/platform/actions/common/actions.service";
|
|
6
6
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
7
7
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
8
|
-
import { ISCMMenus, ISCMProvider, ISCMRepositoryMenus, ISCMResource, ISCMResourceGroup } from "@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm";
|
|
8
|
+
import { ISCMMenus, ISCMProvider, ISCMRepository, ISCMRepositoryMenus, ISCMResource, ISCMResourceGroup } from "@codingame/monaco-vscode-ff9fa663-eae3-5274-8573-c2b918871e4b-common/vscode/vs/workbench/contrib/scm/common/scm";
|
|
9
9
|
import { ISCMService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
10
10
|
export declare class SCMTitleMenu implements IDisposable {
|
|
11
11
|
private _actions;
|
|
@@ -25,12 +25,15 @@ export declare class SCMRepositoryMenus implements ISCMRepositoryMenus, IDisposa
|
|
|
25
25
|
private readonly menuService;
|
|
26
26
|
private contextKeyService;
|
|
27
27
|
readonly titleMenu: SCMTitleMenu;
|
|
28
|
-
|
|
28
|
+
private genericRepositoryMenu;
|
|
29
|
+
private contextualRepositoryMenus;
|
|
30
|
+
private genericRepositoryContextMenu;
|
|
31
|
+
private contextualRepositoryContextMenus;
|
|
29
32
|
private readonly resourceGroupMenusItems;
|
|
30
|
-
private _repositoryContextMenu;
|
|
31
|
-
get repositoryContextMenu(): IMenu;
|
|
32
33
|
private readonly disposables;
|
|
33
34
|
constructor(provider: ISCMProvider, contextKeyService: IContextKeyService, instantiationService: IInstantiationService, menuService: IMenuService);
|
|
35
|
+
getRepositoryMenu(repository: ISCMRepository): IMenu;
|
|
36
|
+
getRepositoryContextMenu(repository: ISCMRepository): IMenu;
|
|
34
37
|
getResourceGroupMenu(group: ISCMResourceGroup): IMenu;
|
|
35
38
|
getResourceMenu(resource: ISCMResource): IMenu;
|
|
36
39
|
getResourceFolderMenu(group: ISCMResourceGroup): IMenu;
|
|
@@ -123,20 +123,13 @@ class SCMMenusItem {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
let SCMRepositoryMenus = class SCMRepositoryMenus {
|
|
126
|
-
get repositoryContextMenu() {
|
|
127
|
-
if (!this._repositoryContextMenu) {
|
|
128
|
-
this._repositoryContextMenu = this.menuService.createMenu(MenuId.SCMSourceControl, this.contextKeyService);
|
|
129
|
-
this.disposables.add(this._repositoryContextMenu);
|
|
130
|
-
}
|
|
131
|
-
return this._repositoryContextMenu;
|
|
132
|
-
}
|
|
133
126
|
constructor(provider, contextKeyService, instantiationService, menuService) {
|
|
134
127
|
this.provider = provider;
|
|
135
128
|
this.menuService = menuService;
|
|
136
129
|
this.resourceGroupMenusItems = ( new Map());
|
|
137
130
|
this.disposables = ( new DisposableStore());
|
|
138
131
|
this.contextKeyService = contextKeyService.createOverlay([
|
|
139
|
-
['scmProvider', provider.
|
|
132
|
+
['scmProvider', provider.providerId],
|
|
140
133
|
['scmProviderRootUri', provider.rootUri?.toString()],
|
|
141
134
|
['scmProviderHasRootUri', !!provider.rootUri],
|
|
142
135
|
]);
|
|
@@ -144,11 +137,57 @@ let SCMRepositoryMenus = class SCMRepositoryMenus {
|
|
|
144
137
|
instantiationService = instantiationService.createChild(serviceCollection, this.disposables);
|
|
145
138
|
this.titleMenu = instantiationService.createInstance(SCMTitleMenu);
|
|
146
139
|
this.disposables.add(this.titleMenu);
|
|
147
|
-
this.repositoryMenu = menuService.createMenu(MenuId.SCMSourceControlInline, this.contextKeyService);
|
|
148
|
-
this.disposables.add(this.repositoryMenu);
|
|
149
140
|
provider.onDidChangeResourceGroups(this.onDidChangeResourceGroups, this, this.disposables);
|
|
150
141
|
this.onDidChangeResourceGroups();
|
|
151
142
|
}
|
|
143
|
+
getRepositoryMenu(repository) {
|
|
144
|
+
const contextValue = repository.provider.contextValue.get();
|
|
145
|
+
if (typeof contextValue === 'undefined') {
|
|
146
|
+
if (!this.genericRepositoryMenu) {
|
|
147
|
+
this.genericRepositoryMenu = this.menuService.createMenu(MenuId.SCMSourceControlInline, this.contextKeyService);
|
|
148
|
+
}
|
|
149
|
+
return this.genericRepositoryMenu;
|
|
150
|
+
}
|
|
151
|
+
if (!this.contextualRepositoryMenus) {
|
|
152
|
+
this.contextualRepositoryMenus = ( new Map());
|
|
153
|
+
}
|
|
154
|
+
let item = this.contextualRepositoryMenus.get(contextValue);
|
|
155
|
+
if (!item) {
|
|
156
|
+
const contextKeyService = this.contextKeyService.createOverlay([['scmProviderContext', contextValue]]);
|
|
157
|
+
const menu = this.menuService.createMenu(MenuId.SCMSourceControlInline, contextKeyService);
|
|
158
|
+
item = {
|
|
159
|
+
menu, dispose() {
|
|
160
|
+
menu.dispose();
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
this.contextualRepositoryMenus.set(contextValue, item);
|
|
164
|
+
}
|
|
165
|
+
return item.menu;
|
|
166
|
+
}
|
|
167
|
+
getRepositoryContextMenu(repository) {
|
|
168
|
+
const contextValue = repository.provider.contextValue.get();
|
|
169
|
+
if (typeof contextValue === 'undefined') {
|
|
170
|
+
if (!this.genericRepositoryContextMenu) {
|
|
171
|
+
this.genericRepositoryContextMenu = this.menuService.createMenu(MenuId.SCMSourceControl, this.contextKeyService);
|
|
172
|
+
}
|
|
173
|
+
return this.genericRepositoryContextMenu;
|
|
174
|
+
}
|
|
175
|
+
if (!this.contextualRepositoryContextMenus) {
|
|
176
|
+
this.contextualRepositoryContextMenus = ( new Map());
|
|
177
|
+
}
|
|
178
|
+
let item = this.contextualRepositoryContextMenus.get(contextValue);
|
|
179
|
+
if (!item) {
|
|
180
|
+
const contextKeyService = this.contextKeyService.createOverlay([['scmProviderContext', contextValue]]);
|
|
181
|
+
const menu = this.menuService.createMenu(MenuId.SCMSourceControl, contextKeyService);
|
|
182
|
+
item = {
|
|
183
|
+
menu, dispose() {
|
|
184
|
+
menu.dispose();
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
this.contextualRepositoryContextMenus.set(contextValue, item);
|
|
188
|
+
}
|
|
189
|
+
return item.menu;
|
|
190
|
+
}
|
|
152
191
|
getResourceGroupMenu(group) {
|
|
153
192
|
return this.getOrCreateResourceGroupMenusItem(group).getResourceGroupMenu(group);
|
|
154
193
|
}
|
|
@@ -179,8 +218,14 @@ let SCMRepositoryMenus = class SCMRepositoryMenus {
|
|
|
179
218
|
}
|
|
180
219
|
}
|
|
181
220
|
dispose() {
|
|
182
|
-
this.
|
|
221
|
+
this.genericRepositoryMenu?.dispose();
|
|
222
|
+
if (this.contextualRepositoryMenus) {
|
|
223
|
+
dispose(( this.contextualRepositoryMenus.values()));
|
|
224
|
+
this.contextualRepositoryMenus.clear();
|
|
225
|
+
this.contextualRepositoryMenus = undefined;
|
|
226
|
+
}
|
|
183
227
|
this.resourceGroupMenusItems.forEach(item => item.dispose());
|
|
228
|
+
this.disposables.dispose();
|
|
184
229
|
}
|
|
185
230
|
};
|
|
186
231
|
SCMRepositoryMenus = ( __decorate([
|
|
@@ -233,7 +278,7 @@ SCMMenus = ( __decorate([
|
|
|
233
278
|
( __param(1, IInstantiationService))
|
|
234
279
|
], SCMMenus));
|
|
235
280
|
MenuRegistry.appendMenuItem(MenuId.SCMResourceContext, {
|
|
236
|
-
title: ( localize(
|
|
281
|
+
title: ( localize(9725, "Share")),
|
|
237
282
|
submenu: MenuId.SCMResourceContextShare,
|
|
238
283
|
group: '45_share',
|
|
239
284
|
order: 3,
|
|
@@ -12,7 +12,7 @@ import { isCodeEditor } from '@codingame/monaco-vscode-api/vscode/vs/editor/brow
|
|
|
12
12
|
import { OverviewRulerLane, MinimapPosition } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
|
|
13
13
|
import { createStyleSheet } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/domStylesheets';
|
|
14
14
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
15
|
-
import { minimapGutterAddedBackground, overviewRulerAddedForeground, minimapGutterModifiedBackground, overviewRulerModifiedForeground, minimapGutterDeletedBackground, overviewRulerDeletedForeground, getChangeType, ChangeType } from '@codingame/monaco-vscode-
|
|
15
|
+
import { minimapGutterAddedBackground, overviewRulerAddedForeground, minimapGutterModifiedBackground, overviewRulerModifiedForeground, minimapGutterDeletedBackground, overviewRulerDeletedForeground, getChangeType, ChangeType } from '@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
16
16
|
import { IQuickDiffService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service';
|
|
17
17
|
import { IQuickDiffModelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/browser/quickDiffModel.service';
|
|
18
18
|
import { ResourceMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/map';
|
|
@@ -61,7 +61,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
|
|
|
61
61
|
const gutter = decorations === 'all' || decorations === 'gutter';
|
|
62
62
|
const overview = decorations === 'all' || decorations === 'overview';
|
|
63
63
|
const minimap = decorations === 'all' || decorations === 'minimap';
|
|
64
|
-
const diffAdded = ( localize(
|
|
64
|
+
const diffAdded = ( localize(9726, 'Added lines'));
|
|
65
65
|
const diffAddedOptions = {
|
|
66
66
|
gutter,
|
|
67
67
|
overview: { active: overview, color: overviewRulerAddedForeground },
|
|
@@ -72,7 +72,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
|
|
|
72
72
|
this.addedPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-added primary pattern', diffAdded, diffAddedOptions);
|
|
73
73
|
this.addedSecondaryOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-added secondary', diffAdded, diffAddedOptions);
|
|
74
74
|
this.addedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-added secondary pattern', diffAdded, diffAddedOptions);
|
|
75
|
-
const diffModified = ( localize(
|
|
75
|
+
const diffModified = ( localize(9727, 'Changed lines'));
|
|
76
76
|
const diffModifiedOptions = {
|
|
77
77
|
gutter,
|
|
78
78
|
overview: { active: overview, color: overviewRulerModifiedForeground },
|
|
@@ -83,7 +83,7 @@ let QuickDiffDecorator = QuickDiffDecorator_1 = class QuickDiffDecorator extends
|
|
|
83
83
|
this.modifiedPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-modified primary pattern', diffModified, diffModifiedOptions);
|
|
84
84
|
this.modifiedSecondaryOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-modified secondary', diffModified, diffModifiedOptions);
|
|
85
85
|
this.modifiedSecondaryPatternOptions = QuickDiffDecorator_1.createDecoration('dirty-diff-modified secondary pattern', diffModified, diffModifiedOptions);
|
|
86
|
-
const diffDeleted = ( localize(
|
|
86
|
+
const diffDeleted = ( localize(9728, 'Removed lines'));
|
|
87
87
|
const diffDeletedOptions = {
|
|
88
88
|
gutter,
|
|
89
89
|
overview: { active: overview, color: overviewRulerDeletedForeground },
|
|
@@ -8,7 +8,7 @@ import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/plat
|
|
|
8
8
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
9
9
|
import { ITextModelService } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service";
|
|
10
10
|
import { ITextModel } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/model";
|
|
11
|
-
import { QuickDiff, QuickDiffChange, QuickDiffResult } from "@codingame/monaco-vscode-
|
|
11
|
+
import { QuickDiff, QuickDiffChange, QuickDiffResult } from "@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common/vscode/vs/workbench/contrib/scm/common/quickDiff";
|
|
12
12
|
import { IQuickDiffService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service";
|
|
13
13
|
import { ISCMService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service";
|
|
14
14
|
import { ISplice } from "@codingame/monaco-vscode-api/vscode/vs/base/common/sequence";
|
|
@@ -9,7 +9,7 @@ import { IEditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/edi
|
|
|
9
9
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
10
10
|
import { ITextModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/resolverService.service';
|
|
11
11
|
import { shouldSynchronizeModel } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/model';
|
|
12
|
-
import { compareChanges, getModifiedEndLineNumber } from '@codingame/monaco-vscode-
|
|
12
|
+
import { compareChanges, getModifiedEndLineNumber } from '@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
13
13
|
import { IQuickDiffService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service';
|
|
14
14
|
import { ThrottledDelayer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
15
15
|
import { ISCMService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/scm.service';
|
|
@@ -12,7 +12,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
|
|
|
12
12
|
import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
|
|
13
13
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
14
14
|
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
15
|
-
import { QuickDiff } from "@codingame/monaco-vscode-
|
|
15
|
+
import { QuickDiff } from "@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common/vscode/vs/workbench/contrib/scm/common/quickDiff";
|
|
16
16
|
export declare const isQuickDiffVisible: RawContextKey<boolean>;
|
|
17
17
|
export interface IQuickDiffSelectItem extends ISelectOptionItem {
|
|
18
18
|
providerId: string;
|
|
@@ -35,7 +35,7 @@ import { RawContextKey, ContextKeyExpr } from '@codingame/monaco-vscode-api/vsco
|
|
|
35
35
|
import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
36
36
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
37
37
|
import { rot } from '@codingame/monaco-vscode-api/vscode/vs/base/common/numbers';
|
|
38
|
-
import { getModifiedEndLineNumber, getChangeHeight, getChangeType, getChangeTypeColor, lineIntersectsChange, ChangeType } from '@codingame/monaco-vscode-
|
|
38
|
+
import { getModifiedEndLineNumber, getChangeHeight, getChangeType, getChangeTypeColor, lineIntersectsChange, ChangeType } from '@codingame/monaco-vscode-bb83fe45-f4c7-5673-b9f1-5c409a63f19c-common/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
39
39
|
import { IQuickDiffService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/scm/common/quickDiff.service';
|
|
40
40
|
import { ICodeEditorService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/codeEditorService.service';
|
|
41
41
|
import { TextCompareEditorActiveContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
@@ -68,7 +68,7 @@ let QuickDiffPickerViewItem = class QuickDiffPickerViewItem extends SelectAction
|
|
|
68
68
|
const peekTitleColor = theme.getColor(peekViewTitleBackground);
|
|
69
69
|
const opaqueTitleColor = peekTitleColor?.makeOpaque(editorBackgroundColor) ?? editorBackgroundColor;
|
|
70
70
|
styles.selectBackground = ( ( opaqueTitleColor.lighten(.6)).toString());
|
|
71
|
-
super(null, action, [], 0, contextViewService, styles, { ariaLabel: ( localize(
|
|
71
|
+
super(null, action, [], 0, contextViewService, styles, { ariaLabel: ( localize(9729, 'Switch quick diff base')), useCustomDrawn: !hasNativeContextMenu(configurationService) });
|
|
72
72
|
this.optionsItems = [];
|
|
73
73
|
}
|
|
74
74
|
setSelection(quickDiffs, providerId) {
|
|
@@ -91,7 +91,7 @@ QuickDiffPickerViewItem = ( __decorate([
|
|
|
91
91
|
], QuickDiffPickerViewItem));
|
|
92
92
|
class QuickDiffPickerBaseAction extends Action {
|
|
93
93
|
static { this.ID = 'quickDiff.base.switch'; }
|
|
94
|
-
static { this.LABEL = ( localize(
|
|
94
|
+
static { this.LABEL = ( localize(9730, "Switch Quick Diff Base")); }
|
|
95
95
|
constructor(callback) {
|
|
96
96
|
super(QuickDiffPickerBaseAction.ID, QuickDiffPickerBaseAction.LABEL, undefined, undefined);
|
|
97
97
|
this.callback = callback;
|
|
@@ -218,14 +218,14 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
218
218
|
.find(quickDiff => quickDiff.id === this._providerId)?.label ?? '';
|
|
219
219
|
detail = this.model.changes.length > 1
|
|
220
220
|
? ( localize(
|
|
221
|
-
|
|
221
|
+
9731,
|
|
222
222
|
"{0} - {1} of {2} changes",
|
|
223
223
|
label,
|
|
224
224
|
providerIndex + 1,
|
|
225
225
|
providerChanges.length
|
|
226
226
|
))
|
|
227
227
|
: ( localize(
|
|
228
|
-
|
|
228
|
+
9732,
|
|
229
229
|
"{0} - {1} of {2} change",
|
|
230
230
|
label,
|
|
231
231
|
providerIndex + 1,
|
|
@@ -235,8 +235,8 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
235
235
|
}
|
|
236
236
|
else {
|
|
237
237
|
detail = this.model.changes.length > 1
|
|
238
|
-
? ( localize(
|
|
239
|
-
: ( localize(
|
|
238
|
+
? ( localize(9733, "{0} of {1} changes", providerIndex + 1, providerChanges.length))
|
|
239
|
+
: ( localize(9734, "{0} of {1} change", providerIndex + 1, providerChanges.length));
|
|
240
240
|
this.dropdownContainer.style.display = 'inherit';
|
|
241
241
|
}
|
|
242
242
|
this.setTitle(this.title, detail);
|
|
@@ -285,7 +285,7 @@ let QuickDiffWidget = class QuickDiffWidget extends PeekViewWidget {
|
|
|
285
285
|
this._actionbarWidget.clear();
|
|
286
286
|
this._actionbarWidget.push(actions.reverse(), { label: false, icon: true });
|
|
287
287
|
this._actionbarWidget.push([next, previous], { label: false, icon: true });
|
|
288
|
-
this._actionbarWidget.push(this._disposables.add(( new Action('peekview.close', ( localize(
|
|
288
|
+
this._actionbarWidget.push(this._disposables.add(( new Action('peekview.close', ( localize(9735, "Close")), ThemeIcon.asClassName(Codicon.close), true, () => this.dispose()))), { label: false, icon: true });
|
|
289
289
|
}
|
|
290
290
|
updateDropdown() {
|
|
291
291
|
const quickDiffs = this.getQuickDiffsContainingChange();
|
|
@@ -636,7 +636,7 @@ class ShowPreviousChangeAction extends EditorAction {
|
|
|
636
636
|
constructor(outerEditor) {
|
|
637
637
|
super({
|
|
638
638
|
id: 'editor.action.dirtydiff.previous',
|
|
639
|
-
label: ( localize2(
|
|
639
|
+
label: ( localize2(9736, "Show Previous Change")),
|
|
640
640
|
precondition: ( TextCompareEditorActiveContext.toNegated()),
|
|
641
641
|
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F3, weight: KeybindingWeight.EditorContrib }
|
|
642
642
|
});
|
|
@@ -662,7 +662,7 @@ class ShowNextChangeAction extends EditorAction {
|
|
|
662
662
|
constructor(outerEditor) {
|
|
663
663
|
super({
|
|
664
664
|
id: 'editor.action.dirtydiff.next',
|
|
665
|
-
label: ( localize2(
|
|
665
|
+
label: ( localize2(9737, "Show Next Change")),
|
|
666
666
|
precondition: ( TextCompareEditorActiveContext.toNegated()),
|
|
667
667
|
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F3, weight: KeybindingWeight.EditorContrib }
|
|
668
668
|
});
|
|
@@ -688,7 +688,7 @@ class GotoPreviousChangeAction extends EditorAction {
|
|
|
688
688
|
constructor() {
|
|
689
689
|
super({
|
|
690
690
|
id: 'workbench.action.editor.previousChange',
|
|
691
|
-
label: ( localize2(
|
|
691
|
+
label: ( localize2(9738, "Go to Previous Change")),
|
|
692
692
|
precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
|
|
693
693
|
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Shift | KeyMod.Alt | KeyCode.F5, weight: KeybindingWeight.EditorContrib }
|
|
694
694
|
});
|
|
@@ -723,7 +723,7 @@ class GotoNextChangeAction extends EditorAction {
|
|
|
723
723
|
constructor() {
|
|
724
724
|
super({
|
|
725
725
|
id: 'workbench.action.editor.nextChange',
|
|
726
|
-
label: ( localize2(
|
|
726
|
+
label: ( localize2(9739, "Go to Next Change")),
|
|
727
727
|
precondition: ( ContextKeyExpr.and(( TextCompareEditorActiveContext.toNegated()), ( quickDiffDecorationCount.notEqualsTo(0)))),
|
|
728
728
|
kbOpts: { kbExpr: EditorContextKeys.editorTextFocus, primary: KeyMod.Alt | KeyCode.F5, weight: KeybindingWeight.EditorContrib }
|
|
729
729
|
});
|
|
@@ -758,7 +758,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
|
758
758
|
group: '7_change_nav',
|
|
759
759
|
command: {
|
|
760
760
|
id: 'editor.action.dirtydiff.next',
|
|
761
|
-
title: ( localize(
|
|
761
|
+
title: ( localize(9740, "Next &&Change"))
|
|
762
762
|
},
|
|
763
763
|
order: 1
|
|
764
764
|
});
|
|
@@ -766,7 +766,7 @@ MenuRegistry.appendMenuItem(MenuId.MenubarGoMenu, {
|
|
|
766
766
|
group: '7_change_nav',
|
|
767
767
|
command: {
|
|
768
768
|
id: 'editor.action.dirtydiff.previous',
|
|
769
|
-
title: ( localize(
|
|
769
|
+
title: ( localize(9741, "Previous &&Change"))
|
|
770
770
|
},
|
|
771
771
|
order: 2
|
|
772
772
|
});
|