Skip to content

Commit

Permalink
Remove "New Window..." contribution point
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Kearl committed Jun 23, 2021
1 parent 1bbd8db commit a3fc50b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 54 deletions.
2 changes: 1 addition & 1 deletion src/vs/platform/extensions/common/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export interface IStartEntry {
readonly description: string;
readonly command: string;
readonly when?: string;
readonly category: 'window' | 'file' | 'folder' | 'notebook';
readonly category: 'file' | 'folder' | 'notebook';
}

export interface IExtensionContributions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,33 +213,6 @@ registerAction2(class extends Action2 {
}
});

registerAction2(class extends Action2 {
constructor() {
super({
id: 'welcome.showNewWindowEntries',
title: localize('welcome.newWindow', "New Window..."),
category,
f1: true,
keybinding: {
primary: KeyMod.Alt + KeyMod.CtrlCmd + KeyMod.WinCtrl + KeyCode.KEY_W,
weight: KeybindingWeight.WorkbenchContrib,
},
menu: {
id: MenuId.MenubarFileMenu,
group: '1_new',
order: 4
}
});
}

run(accessor: ServicesAccessor) {
const gettingStartedService = accessor.get(IGettingStartedService);
gettingStartedService.selectNewEntry([
IGettingStartedNewMenuEntryDescriptorCategory.window
]);
}
});

registerAction2(class extends Action2 {
constructor() {
super({
Expand Down Expand Up @@ -275,7 +248,7 @@ registerAction2(class extends Action2 {
});
}

run(accessor: ServicesAccessor, args?: ('window' | 'file' | 'folder' | 'notebook')[]) {
run(accessor: ServicesAccessor, args?: ('file' | 'folder' | 'notebook')[]) {
const gettingStartedService = accessor.get(IGettingStartedService);
const filters: IGettingStartedNewMenuEntryDescriptorCategory[] = [];
(args ?? []).forEach(arg => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ export const startEntriesExtensionPoint = ExtensionsRegistry.registerExtensionPo
category: {
type: 'string',
description: localize('startEntries.category', "Category of the new entry."),
enum: ['window', 'file', 'folder', 'notebook', 'terminal', 'configuration'],
enum: ['file', 'folder', 'notebook'],
},
description: {
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export interface IGettingStartedWalkthroughDescriptor {
export enum IGettingStartedNewMenuEntryDescriptorCategory {
'file',
'notebook',
'window',
'folder',
}

Expand Down Expand Up @@ -236,18 +235,6 @@ export class GettingStartedService extends Disposable implements IGettingStarted
category: IGettingStartedNewMenuEntryDescriptorCategory.file,
from: CoreNewEntryDisplayName,
},
{
title: localize('newWindowTitle', "Local Window"),
action: { runCommand: 'workbench.action.newWindow' },
category: IGettingStartedNewMenuEntryDescriptorCategory.window,
from: CoreNewEntryDisplayName,
},
{
title: localize('newDuplicateWindowTitle', "Duplicate Current Window"),
action: { runCommand: 'workbench.action.duplicateWorkspaceInNewWindow' },
category: IGettingStartedNewMenuEntryDescriptorCategory.window,
from: CoreNewEntryDisplayName,
},
{
title: localize('newGit', "Folder from Git Repo"),
action: { runCommand: 'git.clone' },
Expand Down Expand Up @@ -940,7 +927,6 @@ registerAction2(class extends Action2 {
const displayCategory: Record<IGettingStartedNewMenuEntryDescriptorCategory, string> = {
[IGettingStartedNewMenuEntryDescriptorCategory.file]: localize('file', "File"),
[IGettingStartedNewMenuEntryDescriptorCategory.folder]: localize('folder', "Folder"),
[IGettingStartedNewMenuEntryDescriptorCategory.window]: localize('window', "Window"),
[IGettingStartedNewMenuEntryDescriptorCategory.notebook]: localize('notebook', "Notebook"),
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,6 @@ export const startEntries: GettingStartedStartEntryContent = [
command: 'welcome.showNewFileEntries',
}
},
{
id: 'welcome.showNewWindowEntries',
title: localize('gettingStarted.newWindow.title', "New Window..."),
description: localize('gettingStarted.newWindow.description', "Open a new window, either locally or over a remote connection"),
icon: Codicon.emptyWindow,
content: {
type: 'startEntry',
command: 'welcome.showNewWindowEntries',
}
},
{
id: 'welcome.showNewFolderEntries',
title: localize('gettingStarted.newFolder.title', "New Folder..."),
Expand Down

0 comments on commit a3fc50b

Please sign in to comment.