Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aux window - drop "detached" #198889

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/vs/workbench/browser/parts/editor/editor.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
ReOpenInTextEditorAction, DuplicateGroupDownAction, DuplicateGroupLeftAction, DuplicateGroupRightAction, DuplicateGroupUpAction, ToggleEditorTypeAction, SplitEditorToAboveGroupAction, SplitEditorToBelowGroupAction,
SplitEditorToFirstGroupAction, SplitEditorToLastGroupAction, SplitEditorToLeftGroupAction, SplitEditorToNextGroupAction, SplitEditorToPreviousGroupAction, SplitEditorToRightGroupAction, NavigateForwardInEditsAction,
NavigateBackwardsInEditsAction, NavigateForwardInNavigationsAction, NavigateBackwardsInNavigationsAction, NavigatePreviousInNavigationsAction, NavigatePreviousInEditsAction, NavigateToLastNavigationLocationAction,
MaximizeGroupHideSidebarAction, MoveEditorToNewDetachedWindowAction, CopyEditorToNewDetachedWindowAction, RestoreEditorsToMainWindowAction, ToggleMaximizeEditorGroupAction, MinimizeOtherGroupsHideSidebarAction, CopyEditorGroupToNewDetachedWindowAction, MoveEditorGroupToNewDetachedWindowAction
MaximizeGroupHideSidebarAction, MoveEditorToNewWindowAction, CopyEditorToNewindowAction, RestoreEditorsToMainWindowAction, ToggleMaximizeEditorGroupAction, MinimizeOtherGroupsHideSidebarAction, CopyEditorGroupToNewWindowAction, MoveEditorGroupToNewWindowAction
} from 'vs/workbench/browser/parts/editor/editorActions';
import {
CLOSE_EDITORS_AND_GROUP_COMMAND_ID, CLOSE_EDITORS_IN_GROUP_COMMAND_ID, CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID, CLOSE_EDITOR_COMMAND_ID, CLOSE_EDITOR_GROUP_COMMAND_ID, CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,
Expand Down Expand Up @@ -293,10 +293,10 @@ registerAction2(QuickAccessPreviousRecentlyUsedEditorInGroupAction);
registerAction2(QuickAccessLeastRecentlyUsedEditorInGroupAction);
registerAction2(QuickAccessPreviousEditorFromHistoryAction);

registerAction2(MoveEditorToNewDetachedWindowAction);
registerAction2(CopyEditorToNewDetachedWindowAction);
registerAction2(MoveEditorGroupToNewDetachedWindowAction);
registerAction2(CopyEditorGroupToNewDetachedWindowAction);
registerAction2(MoveEditorToNewWindowAction);
registerAction2(CopyEditorToNewindowAction);
registerAction2(MoveEditorGroupToNewWindowAction);
registerAction2(CopyEditorGroupToNewWindowAction);
registerAction2(RestoreEditorsToMainWindowAction);

const quickAccessNavigateNextInEditorPickerId = 'workbench.action.quickOpenNavigateNextInEditorPicker';
Expand Down
52 changes: 26 additions & 26 deletions src/vs/workbench/browser/parts/editor/editorActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2487,7 +2487,7 @@ export class ReOpenInTextEditorAction extends Action2 {
}


abstract class BaseMoveCopyEditorToNewDetachedWindowAction extends Action2 {
abstract class BaseMoveCopyEditorToNewWindowAction extends Action2 {

constructor(
id: string,
Expand Down Expand Up @@ -2524,37 +2524,37 @@ abstract class BaseMoveCopyEditorToNewDetachedWindowAction extends Action2 {
}
}

export class MoveEditorToNewDetachedWindowAction extends BaseMoveCopyEditorToNewDetachedWindowAction {
export class MoveEditorToNewWindowAction extends BaseMoveCopyEditorToNewWindowAction {

constructor() {
super(
'workbench.action.moveEditorToNewDetachedWindow',
'workbench.action.moveEditorToNewWindow',
{
value: localize('moveEditorToNewDetachedWindow', "Move Editor into New Detached Window"),
mnemonicTitle: localize({ key: 'miMoveEditorToNewDetachedWindow', comment: ['&& denotes a mnemonic'] }, "&&Move Editor into New Detached Window"),
original: 'Move Editor into New Detached Window'
value: localize('moveEditorToNewWindow', "Move Editor into New Window"),
mnemonicTitle: localize({ key: 'miMoveEditorToNewWindow', comment: ['&& denotes a mnemonic'] }, "&&Move Editor into New Window"),
original: 'Move Editor into New Window'
},
true
);
}
}

export class CopyEditorToNewDetachedWindowAction extends BaseMoveCopyEditorToNewDetachedWindowAction {
export class CopyEditorToNewindowAction extends BaseMoveCopyEditorToNewWindowAction {

constructor() {
super(
'workbench.action.copyEditorToNewDetachedWindow',
'workbench.action.copyEditorToNewWindow',
{
value: localize('copyEditorToNewDetachedWindow', "Copy Editor into New Detached Window"),
mnemonicTitle: localize({ key: 'miCopyEditorToNewDetachedWindow', comment: ['&& denotes a mnemonic'] }, "&&Copy Editor into New Detached Window"),
original: 'Copy Editor into New Detached Window'
value: localize('copyEditorToNewWindow', "Copy Editor into New Window"),
mnemonicTitle: localize({ key: 'miCopyEditorToNewWindow', comment: ['&& denotes a mnemonic'] }, "&&Copy Editor into New Window"),
original: 'Copy Editor into New Window'
},
false
);
}
}

abstract class BaseMoveCopyEditorGroupToNewDetachedWindowAction extends Action2 {
abstract class BaseMoveCopyEditorGroupToNewWindowAction extends Action2 {

constructor(
id: string,
Expand Down Expand Up @@ -2583,30 +2583,30 @@ abstract class BaseMoveCopyEditorGroupToNewDetachedWindowAction extends Action2
}
}

export class MoveEditorGroupToNewDetachedWindowAction extends BaseMoveCopyEditorGroupToNewDetachedWindowAction {
export class MoveEditorGroupToNewWindowAction extends BaseMoveCopyEditorGroupToNewWindowAction {

constructor() {
super(
'workbench.action.moveEditorGroupToNewDetachedWindow',
'workbench.action.moveEditorGroupToNewWindow',
{
value: localize('moveEditorGroupToNewDetachedWindow', "Move Editor Group into New Detached Window"),
mnemonicTitle: localize({ key: 'miMoveEditorGroupToNewDetachedWindow', comment: ['&& denotes a mnemonic'] }, "&&Move Editor Group into New Detached Window"),
original: 'Move Editor Group into New Detached Window'
value: localize('moveEditorGroupToNewWindow', "Move Editor Group into New Window"),
mnemonicTitle: localize({ key: 'miMoveEditorGroupToNewWindow', comment: ['&& denotes a mnemonic'] }, "&&Move Editor Group into New Window"),
original: 'Move Editor Group into New Window'
},
true
);
}
}

export class CopyEditorGroupToNewDetachedWindowAction extends BaseMoveCopyEditorGroupToNewDetachedWindowAction {
export class CopyEditorGroupToNewWindowAction extends BaseMoveCopyEditorGroupToNewWindowAction {

constructor() {
super(
'workbench.action.copyEditorGroupToNewDetachedWindow',
'workbench.action.copyEditorGroupToNewWindow',
{
value: localize('copyEditorGroupToNewDetachedWindow', "Copy Editor Group into New Detached Window"),
mnemonicTitle: localize({ key: 'miCopyEditorGroupToNewDetachedWindow', comment: ['&& denotes a mnemonic'] }, "&&Copy Editor Group into New Detached Window"),
original: 'Copy Editor Group into New Detached Window'
value: localize('copyEditorGroupToNewWindow', "Copy Editor Group into New Window"),
mnemonicTitle: localize({ key: 'miCopyEditorGroupToNewWindow', comment: ['&& denotes a mnemonic'] }, "&&Copy Editor Group into New Window"),
original: 'Copy Editor Group into New Window'
},
false
);
Expand All @@ -2617,11 +2617,11 @@ export class RestoreEditorsToMainWindowAction extends Action2 {

constructor() {
super({
id: 'workbench.action.restoreDetachedEditorsToMainWindow',
id: 'workbench.action.restoreEditorsToMainWindow',
title: {
value: localize('restoreDetachedEditorsToMainWindow', "Restore Detached Editors into Main Window"),
mnemonicTitle: localize({ key: 'miRestoreDetachedEditorsToMainWindow', comment: ['&& denotes a mnemonic'] }, "&&Restore Detached Editors into Main Window"),
original: 'Restore Detached Editors into Main Window'
value: localize('restoreEditorsToMainWindow', "Restore Editors into Main Window"),
mnemonicTitle: localize({ key: 'miRestoreEditorsToMainWindow', comment: ['&& denotes a mnemonic'] }, "&&Restore Editors into Main Window"),
original: 'Restore Editors into Main Window'
},
f1: true,
precondition: IsAuxiliaryWindowFocusedContext,
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/browser/parts/editor/editorPanes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class EditorPanes extends Disposable {

// Assert the `EditorInputCapabilities.AuxWindowUnsupported` condition
if (getWindow(this.editorPanesParent) !== mainWindow && editor.hasCapability(EditorInputCapabilities.AuxWindowUnsupported)) {
return await this.doShowError(createEditorOpenError(localize('editorUnsupportedInAuxWindow', "This type of editor cannot be opened in detached windows yet."), [
return await this.doShowError(createEditorOpenError(localize('editorUnsupportedInAuxWindow', "This type of editor cannot be opened in other windows yet."), [
toAction({
id: 'workbench.editor.action.closeEditor', label: localize('openFolder', "Close Editor"), run: async () => {
return this.groupView.closeEditor(editor);
Expand Down
5 changes: 2 additions & 3 deletions src/vs/workbench/browser/workbench.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { isStandalone } from 'vs/base/browser/browser';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
import { ActivityBarPosition, EditorTabsMode, LayoutSettings } from 'vs/workbench/services/layout/browser/layoutService';
import product from 'vs/platform/product/common/product';

const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration);

Expand Down Expand Up @@ -246,8 +245,8 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
},
'workbench.editor.dragToOpenWindow': {
'type': 'boolean',
'default': product.quality !== 'stable',
'markdownDescription': localize('dragToOpenWindow', "Controls if editors can be dragged out of the window to open them in a new detached window. Press and hold `Alt`-key while dragging to toggle this dynamically.")
'default': true,
'markdownDescription': localize('dragToOpenWindow', "Controls if editors can be dragged out of the window to open them in a new window. Press and hold `Alt`-key while dragging to toggle this dynamically.")
},
'workbench.editor.focusRecentEditorAfterClose': {
'type': 'boolean',
Expand Down