From f2e6fe3b863d076a36a69b410ad29cf6729cf777 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Thu, 14 Apr 2022 10:10:38 -0700 Subject: Show value on lazy variables after icon. Fix #135147 --- src/vs/workbench/contrib/debug/browser/baseDebugView.ts | 2 +- src/vs/workbench/contrib/debug/browser/media/debug.contribution.css | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/vs/workbench/contrib/debug/browser/baseDebugView.ts b/src/vs/workbench/contrib/debug/browser/baseDebugView.ts index 89f39336b31..e97efddd569 100644 --- a/src/vs/workbench/contrib/debug/browser/baseDebugView.ts +++ b/src/vs/workbench/contrib/debug/browser/baseDebugView.ts @@ -157,9 +157,9 @@ export abstract class AbstractExpressionsRenderer implements ITreeRenderer Date: Thu, 14 Apr 2022 10:48:33 -0700 Subject: Fixing capabilities for drop into - Copy logic into notebook and file editor since they override `capabilities` from `AbstractResourceEditorInput` - Remove unneeded override --- src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts | 4 ++++ src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts | 4 ++++ .../workbench/services/untitled/common/untitledTextEditorInput.ts | 7 +------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts b/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts index 630cd3a523a..b6317eb2dd7 100644 --- a/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts +++ b/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts @@ -60,6 +60,10 @@ export class FileEditorInput extends AbstractTextResourceEditorInput implements } } + if (!(capabilities & EditorInputCapabilities.Readonly)) { + capabilities |= EditorInputCapabilities.CanDropIntoEditor; + } + return capabilities; } diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts index cffd2b0362d..6e28efdd088 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorInput.ts @@ -102,6 +102,10 @@ export class NotebookEditorInput extends AbstractResourceEditorInput { } } + if (!(capabilities & EditorInputCapabilities.Readonly)) { + capabilities |= EditorInputCapabilities.CanDropIntoEditor; + } + return capabilities; } diff --git a/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts b/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts index e3c3799124f..deb041acb8c 100644 --- a/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts +++ b/src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { URI } from 'vs/base/common/uri'; -import { DEFAULT_EDITOR_ASSOCIATION, EditorInputCapabilities, findViewStateForEditor, GroupIdentifier, IUntitledTextResourceEditorInput, IUntypedEditorInput, Verbosity } from 'vs/workbench/common/editor'; +import { DEFAULT_EDITOR_ASSOCIATION, findViewStateForEditor, GroupIdentifier, IUntitledTextResourceEditorInput, IUntypedEditorInput, Verbosity } from 'vs/workbench/common/editor'; import { EditorInput } from 'vs/workbench/common/editor/editorInput'; import { AbstractTextResourceEditorInput } from 'vs/workbench/common/editor/textResourceEditorInput'; import { IUntitledTextEditorModel } from 'vs/workbench/services/untitled/common/untitledTextEditorModel'; @@ -116,11 +116,6 @@ export class UntitledTextEditorInput extends AbstractTextResourceEditorInput imp return this.model.getLanguageId(); } - override get capabilities(): EditorInputCapabilities { - const capabilities = super.capabilities; - return capabilities | EditorInputCapabilities.CanDropIntoEditor; - } - override async resolve(): Promise { if (!this.modelResolve) { this.modelResolve = this.model.resolve(); -- cgit v1.2.3 From 53411d55c5b045d299b531929300c8315812932e Mon Sep 17 00:00:00 2001 From: SteVen Batten Date: Thu, 14 Apr 2022 10:58:17 -0700 Subject: fixes #147468 --- .../workbench/services/workspaces/common/workspaceTrust.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/services/workspaces/common/workspaceTrust.ts b/src/vs/workbench/services/workspaces/common/workspaceTrust.ts index 49d6c42d4a8..8a29a82a900 100644 --- a/src/vs/workbench/services/workspaces/common/workspaceTrust.ts +++ b/src/vs/workbench/services/workspaces/common/workspaceTrust.ts @@ -215,22 +215,22 @@ export class WorkspaceTrustManagementService extends Disposable implements IWork this._logService.info('[WT] Enter getCanonicalUri()...'); } + let canonicalUri = uri; if (this.environmentService.remoteAuthority && uri.scheme === Schemas.vscodeRemote) { if (isCI) { this._logService.info('[WT] Return this.remoteAuthorityResolverService.getCanonicalURI(uri)...'); } - return this.remoteAuthorityResolverService.getCanonicalURI(uri); - } - - if (uri.scheme === 'vscode-vfs') { + canonicalUri = await this.remoteAuthorityResolverService.getCanonicalURI(uri); + } else if (uri.scheme === 'vscode-vfs') { const index = uri.authority.indexOf('+'); if (index !== -1) { - return uri.with({ authority: uri.authority.substr(0, index) }); + canonicalUri = uri.with({ authority: uri.authority.substr(0, index) }); } } - return uri; + // ignore query and fragent section of uris always + return canonicalUri.with({ query: null, fragment: null }); } private async resolveCanonicalUris(): Promise { -- cgit v1.2.3 From 3c9c0e36cd536805b8d376d1f1e09b6db0c53522 Mon Sep 17 00:00:00 2001 From: rebornix Date: Wed, 6 Apr 2022 10:39:47 -0700 Subject: Use SELECT_KERNEL_ID other than string literal --- .../notebook/browser/contrib/editorStatusBar/editorStatusBar.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts b/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts index cb7ab0f8586..83b35ce916d 100644 --- a/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts +++ b/src/vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar.ts @@ -38,7 +38,7 @@ import { ILanguageFeaturesService } from 'vs/editor/common/services/languageFeat registerAction2(class extends Action2 { constructor() { super({ - id: '_notebook.selectKernel', + id: SELECT_KERNEL_ID, category: NOTEBOOK_ACTIONS_CATEGORY, title: { value: nls.localize('notebookActions.selectKernel', "Select Notebook Kernel"), original: 'Select Notebook Kernel' }, // precondition: NOTEBOOK_IS_ACTIVE_EDITOR, @@ -381,7 +381,7 @@ export class KernelStatus extends Disposable implements IWorkbenchContribution { tooltip: isSuggested ? nls.localize('tooltop', "{0} (suggestion)", tooltip) : tooltip, command: SELECT_KERNEL_ID, }, - '_notebook.selectKernel', + SELECT_KERNEL_ID, StatusbarAlignment.RIGHT, 10 )); @@ -399,7 +399,7 @@ export class KernelStatus extends Disposable implements IWorkbenchContribution { command: SELECT_KERNEL_ID, backgroundColor: { id: 'statusBarItem.prominentBackground' } }, - '_notebook.selectKernel', + SELECT_KERNEL_ID, StatusbarAlignment.RIGHT, 10 )); -- cgit v1.2.3