Skip to content

Commit c0bf14d

Browse files
author
Feiyang Liu
committed
fix errors in code-editor-web-embedded
1 parent 0f7b5dc commit c0bf14d

4 files changed

Lines changed: 192 additions & 2 deletions

patches/web-embedded.series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ web-embedded/add-a-much-simpler-workbench.diff
3030
web-embedded/remove-terminal-in-code-oss.diff
3131
web-embedded/remove-ssh-remote-host-in-code-oss.diff
3232
web-embedded/remove-source-control.diff
33+
web-embedded/fix-scm-progress-location.diff
3334
web-embedded/only-have-debug-view-container.diff
3435
web-embedded/disable-user-tasks-and-fix-build-warnings.diff
3536
web-embedded/disable-file-actions-calls-accounts-merge-conflit.diff

patches/web-embedded/disable-file-actions-calls-accounts-merge-conflit.diff

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,3 +789,100 @@ Index: third-party-src/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.
789789
registerAction2(AcceptAllCombination);
790790

791791
registerAction2(ToggleBetweenInputs);
792+
Index: third-party-src/src/vs/workbench/browser/parts/editor/editor.contribution.ts
793+
===================================================================
794+
--- third-party-src.orig/src/vs/workbench/browser/parts/editor/editor.contribution.ts
795+
+++ third-party-src/src/vs/workbench/browser/parts/editor/editor.contribution.ts
796+
@@ -42,8 +42,7 @@ import {
797+
ReOpenInTextEditorAction, DuplicateGroupDownAction, DuplicateGroupLeftAction, DuplicateGroupRightAction, DuplicateGroupUpAction, ToggleEditorTypeAction, SplitEditorToAboveGroupAction, SplitEditorToBelowGroupAction,
798+
SplitEditorToFirstGroupAction, SplitEditorToLastGroupAction, SplitEditorToLeftGroupAction, SplitEditorToNextGroupAction, SplitEditorToPreviousGroupAction, SplitEditorToRightGroupAction, NavigateForwardInEditsAction,
799+
NavigateBackwardsInEditsAction, NavigateForwardInNavigationsAction, NavigateBackwardsInNavigationsAction, NavigatePreviousInNavigationsAction, NavigatePreviousInEditsAction, NavigateToLastNavigationLocationAction,
800+
- MaximizeGroupHideSidebarAction, MoveEditorToNewWindowAction, CopyEditorToNewindowAction, RestoreEditorsToMainWindowAction, ToggleMaximizeEditorGroupAction, MinimizeOtherGroupsHideSidebarAction, CopyEditorGroupToNewWindowAction,
801+
- MoveEditorGroupToNewWindowAction, NewEmptyEditorWindowAction,
802+
+ MaximizeGroupHideSidebarAction, RestoreEditorsToMainWindowAction, ToggleMaximizeEditorGroupAction, MinimizeOtherGroupsHideSidebarAction,
803+
ClearEditorHistoryWithoutConfirmAction
804+
} from './editorActions.js';
805+
import {
806+
@@ -51,8 +50,8 @@ import {
807+
CLOSE_PINNED_EDITOR_COMMAND_ID, CLOSE_SAVED_EDITORS_COMMAND_ID, KEEP_EDITOR_COMMAND_ID, PIN_EDITOR_COMMAND_ID, SHOW_EDITORS_IN_GROUP, SPLIT_EDITOR_DOWN, SPLIT_EDITOR_LEFT,
808+
SPLIT_EDITOR_RIGHT, SPLIT_EDITOR_UP, TOGGLE_KEEP_EDITORS_COMMAND_ID, UNPIN_EDITOR_COMMAND_ID, setup as registerEditorCommands, REOPEN_WITH_COMMAND_ID,
809+
TOGGLE_LOCK_GROUP_COMMAND_ID, UNLOCK_GROUP_COMMAND_ID, SPLIT_EDITOR_IN_GROUP, JOIN_EDITOR_IN_GROUP, FOCUS_FIRST_SIDE_EDITOR, FOCUS_SECOND_SIDE_EDITOR, TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT, LOCK_GROUP_COMMAND_ID,
810+
- SPLIT_EDITOR, TOGGLE_MAXIMIZE_EDITOR_GROUP, MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, MOVE_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, COPY_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID,
811+
- NEW_EMPTY_EDITOR_WINDOW_COMMAND_ID, MOVE_EDITOR_INTO_RIGHT_GROUP, MOVE_EDITOR_INTO_LEFT_GROUP, MOVE_EDITOR_INTO_ABOVE_GROUP, MOVE_EDITOR_INTO_BELOW_GROUP
812+
+ SPLIT_EDITOR, TOGGLE_MAXIMIZE_EDITOR_GROUP,
813+
+ MOVE_EDITOR_INTO_RIGHT_GROUP, MOVE_EDITOR_INTO_LEFT_GROUP, MOVE_EDITOR_INTO_ABOVE_GROUP, MOVE_EDITOR_INTO_BELOW_GROUP
814+
} from './editorCommands.js';
815+
import { GOTO_NEXT_CHANGE, GOTO_PREVIOUS_CHANGE, TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE, TOGGLE_DIFF_SIDE_BY_SIDE, DIFF_SWAP_SIDES } from './diffEditorCommands.js';
816+
import { inQuickPickContext, getQuickNavigateHandler } from '../../quickaccess.js';
817+
@@ -301,12 +300,7 @@ registerAction2(QuickAccessPreviousRecen
818+
registerAction2(QuickAccessLeastRecentlyUsedEditorInGroupAction);
819+
registerAction2(QuickAccessPreviousEditorFromHistoryAction);
820+
821+
-registerAction2(MoveEditorToNewWindowAction);
822+
-registerAction2(CopyEditorToNewindowAction);
823+
-registerAction2(MoveEditorGroupToNewWindowAction);
824+
-registerAction2(CopyEditorGroupToNewWindowAction);
825+
registerAction2(RestoreEditorsToMainWindowAction);
826+
-registerAction2(NewEmptyEditorWindowAction);
827+
828+
const quickAccessNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker';
829+
KeybindingsRegistry.registerCommandAndKeybindingRule({
830+
@@ -359,7 +353,7 @@ MenuRegistry.appendMenuItem(MenuId.Empty
831+
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_DOWN, title: localize('splitDown', "Split Down") }, group: '2_split', order: 20 });
832+
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_LEFT, title: localize('splitLeft', "Split Left") }, group: '2_split', order: 30 });
833+
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: SPLIT_EDITOR_RIGHT, title: localize('splitRight', "Split Right") }, group: '2_split', order: 40 });
834+
-MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: NEW_EMPTY_EDITOR_WINDOW_COMMAND_ID, title: localize('newWindow', "New Window") }, group: '3_window', order: 10 });
835+
+
836+
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: TOGGLE_LOCK_GROUP_COMMAND_ID, title: localize('toggleLockGroup', "Lock Group"), toggled: ActiveEditorGroupLockedContext }, group: '4_lock', order: 10, when: IsAuxiliaryWindowContext.toNegated() /* already a primary action for aux windows */ });
837+
MenuRegistry.appendMenuItem(MenuId.EmptyEditorGroupContext, { command: { id: CLOSE_EDITOR_GROUP_COMMAND_ID, title: localize('close', "Close") }, group: '5_close', order: 10, when: MultipleEditorGroupsContext });
838+
839+
@@ -369,8 +363,7 @@ MenuRegistry.appendMenuItem(MenuId.Edito
840+
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_LEFT, title: localize('splitLeft', "Split Left") }, group: '2_split', order: 30 });
841+
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: SPLIT_EDITOR_RIGHT, title: localize('splitRight', "Split Right") }, group: '2_split', order: 40 });
842+
843+
-MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: MOVE_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, title: localize('moveEditorGroupToNewWindow', "Move into New Window") }, group: '3_window', order: 10 });
844+
-MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { command: { id: COPY_EDITOR_GROUP_INTO_NEW_WINDOW_COMMAND_ID, title: localize('copyEditorGroupToNewWindow', "Copy into New Window") }, group: '3_window', order: 20 });
845+
+
846+
847+
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarContext, { submenu: MenuId.EditorTabsBarShowTabsSubmenu, title: localize('tabBar', "Tab Bar"), group: '4_config', order: 10, when: InEditorZenModeContext.negate() });
848+
MenuRegistry.appendMenuItem(MenuId.EditorTabsBarShowTabsSubmenu, { command: { id: ShowMultipleEditorTabsAction.ID, title: localize('multipleTabs', "Multiple Tabs"), toggled: ContextKeyExpr.equals('config.workbench.editor.showTabs', 'multiple') }, group: '1_config', order: 10 });
849+
@@ -402,8 +395,7 @@ MenuRegistry.appendMenuItem(MenuId.Edito
850+
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR, title: localize('splitRight', "Split Right") }, group: '5_split', order: 10, when: SplitEditorsVertically.negate() });
851+
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: SPLIT_EDITOR, title: localize('splitDown', "Split Down") }, group: '5_split', order: 10, when: SplitEditorsVertically });
852+
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { submenu: MenuId.EditorSplitMoveSubmenu, title: localize('splitAndMoveEditor', "Split & Move"), group: '5_split', order: 15 });
853+
-MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, title: localize('moveToNewWindow', "Move into New Window") }, group: '7_new_window', order: 10 });
854+
-MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { command: { id: COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID, title: localize('copyToNewWindow', "Copy into New Window") }, group: '7_new_window', order: 20 });
855+
+
856+
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, { submenu: MenuId.EditorTitleContextShare, title: localize('share', "Share"), group: '11_share', order: -1, when: MultipleEditorsSelectedInGroupContext.negate() });
857+
858+
// Editor Title Context Menu: Split & Move Editor Submenu
859+
@@ -768,29 +760,7 @@ MenuRegistry.appendMenuItem(MenuId.Menub
860+
order: 1
861+
});
862+
863+
-MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
864+
- group: '3_new_window',
865+
- command: {
866+
- id: MOVE_EDITOR_INTO_NEW_WINDOW_COMMAND_ID,
867+
- title: {
868+
- ...localize2('moveEditorToNewWindow', "Move Editor into New Window"),
869+
- mnemonicTitle: localize({ key: 'miMoveEditorToNewWindow', comment: ['&& denotes a mnemonic'] }, "&&Move Editor into New Window"),
870+
- }
871+
- },
872+
- order: 1
873+
-});
874+
875+
-MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
876+
- group: '3_new_window',
877+
- command: {
878+
- id: COPY_EDITOR_INTO_NEW_WINDOW_COMMAND_ID,
879+
- title: {
880+
- ...localize2('copyEditorToNewWindow', "Copy Editor into New Window"),
881+
- mnemonicTitle: localize({ key: 'miCopyEditorToNewWindow', comment: ['&& denotes a mnemonic'] }, "&&Copy Editor into New Window"),
882+
- }
883+
- },
884+
- order: 2
885+
-});
886+
887+
MenuRegistry.appendMenuItem(MenuId.MenubarLayoutMenu, {
888+
group: '4_layouts',
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Fix SCM progress location error
2+
3+
Since the SCM view container is removed by remove-source-control.diff,
4+
the ProgressLocation.Scm location no longer exists. This causes the error
5+
"Bad progress location: workbench.scm" when quickDiffModel tries to show
6+
progress. Change to ProgressLocation.Window which doesn't require a view.
7+
---
8+
.../workbench/contrib/scm/browser/quickDiffModel.ts | 2 +-
9+
1 file changed, 1 insertion(+), 1 deletion(-)
10+
11+
Index: third-party-src/src/vs/workbench/contrib/scm/browser/quickDiffModel.ts
12+
===================================================================
13+
--- third-party-src.orig/src/vs/workbench/contrib/scm/browser/quickDiffModel.ts
14+
+++ third-party-src/src/vs/workbench/contrib/scm/browser/quickDiffModel.ts
15+
@@ -241,7 +241,7 @@ export class QuickDiffModel extends Disp
16+
}
17+
18+
private diff(): Promise<{ allChanges: QuickDiffChange[]; changes: QuickDiffChange[]; mapChanges: Map<string, number[]> } | null> {
19+
- return this.progressService.withProgress({ location: ProgressLocation.Scm, delay: 250 }, async () => {
20+
+ return this.progressService.withProgress({ location: ProgressLocation.Window, delay: 250 }, async () => {
21+
const originalURIs = await this.getQuickDiffsPromise();
22+
if (this._disposed || this._model.isDisposed() || (originalURIs.length === 0)) {
23+
// Disposed

patches/web-embedded/remove-import-export-profiles-and-revert-file-menu-i.diff

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Index: third-party-src/src/vs/workbench/contrib/userDataProfile/browser/userData
9393
===================================================================
9494
--- third-party-src.orig/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.ts
9595
+++ third-party-src/src/vs/workbench/contrib/userDataProfile/browser/userDataProfile.ts
96-
@@ -130,8 +130,6 @@ export class UserDataProfilesWorkbenchCo
96+
@@ -152,8 +152,6 @@ export class UserDataProfilesWorkbenchCo
9797
this.registerProfilesActions();
9898
this._register(this.userDataProfilesService.onDidChangeProfiles(() => this.registerProfilesActions()));
9999

@@ -102,7 +102,7 @@ Index: third-party-src/src/vs/workbench/contrib/userDataProfile/browser/userData
102102
this.registerCreateFromCurrentProfileAction();
103103
this.registerNewProfileAction();
104104
this.registerDeleteProfileAction();
105-
@@ -364,34 +362,6 @@ export class UserDataProfilesWorkbenchCo
105+
@@ -386,34 +384,6 @@ export class UserDataProfilesWorkbenchCo
106106
return disposables;
107107
}
108108

@@ -137,3 +137,72 @@ Index: third-party-src/src/vs/workbench/contrib/userDataProfile/browser/userData
137137

138138
private registerCreateFromCurrentProfileAction(): void {
139139
const that = this;
140+
Index: third-party-src/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.ts
141+
===================================================================
142+
--- third-party-src.orig/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.ts
143+
+++ third-party-src/src/vs/workbench/contrib/userDataProfile/browser/userDataProfilesEditor.ts
144+
@@ -223,13 +223,7 @@ export class UserDataProfilesEditor exte
145+
const actions: IAction[] = [];
146+
if (this.templates.length) {
147+
actions.push(new SubmenuAction('from.template', localize('from template', "From Template"), this.getCreateFromTemplateActions()));
148+
- actions.push(new Separator());
149+
}
150+
- actions.push(toAction({
151+
- id: 'importProfile',
152+
- label: localize('importProfile', "Import Profile..."),
153+
- run: () => this.importProfile()
154+
- }));
155+
return actions;
156+
}
157+
},
158+
@@ -294,50 +288,9 @@ export class UserDataProfilesEditor exte
159+
if (templateActions.length) {
160+
actions.push(new SubmenuAction('from.template', localize('new from template', "New Profile From Template"), templateActions));
161+
}
162+
- actions.push(new Separator());
163+
- actions.push(toAction({
164+
- id: 'importProfile',
165+
- label: localize('importProfile', "Import Profile..."),
166+
- run: () => this.importProfile()
167+
- }));
168+
return actions;
169+
}
170+
171+
- private async importProfile(): Promise<void> {
172+
- const disposables = new DisposableStore();
173+
- const quickPick = disposables.add(this.quickInputService.createQuickPick());
174+
-
175+
- const updateQuickPickItems = (value?: string) => {
176+
- const quickPickItems: IQuickPickItem[] = [];
177+
- if (value) {
178+
- quickPickItems.push({ label: quickPick.value, description: localize('import from url', "Import from URL") });
179+
- }
180+
- quickPickItems.push({ label: localize('import from file', "Select File...") });
181+
- quickPick.items = quickPickItems;
182+
- };
183+
-
184+
- quickPick.title = localize('import profile quick pick title', "Import from Profile Template...");
185+
- quickPick.placeholder = localize('import profile placeholder', "Provide Profile Template URL");
186+
- quickPick.ignoreFocusOut = true;
187+
- disposables.add(quickPick.onDidChangeValue(updateQuickPickItems));
188+
- updateQuickPickItems();
189+
- quickPick.matchOnLabel = false;
190+
- quickPick.matchOnDescription = false;
191+
- disposables.add(quickPick.onDidAccept(async () => {
192+
- quickPick.hide();
193+
- const selectedItem = quickPick.selectedItems[0];
194+
- if (!selectedItem) {
195+
- return;
196+
- }
197+
- const url = selectedItem.label === quickPick.value ? URI.parse(quickPick.value) : await this.getProfileUriFromFileSystem();
198+
- if (url) {
199+
- this.createNewProfile(url);
200+
- }
201+
- }));
202+
- disposables.add(quickPick.onDidHide(() => disposables.dispose()));
203+
- quickPick.show();
204+
- }
205+
-
206+
async createNewProfile(copyFrom?: URI | IUserDataProfile): Promise<void> {
207+
await this.model?.createNewProfile(copyFrom);
208+
}

0 commit comments

Comments
 (0)