mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-04-01 01:20:31 -04:00
Merge from vscode 591842cc4b71958c81947b254924a215fe3edcbd (#4886)
This commit is contained in:
@@ -24,6 +24,7 @@ export interface IResourceCommentThreadEvent {
|
||||
|
||||
export interface ICommentInfo extends CommentInfo {
|
||||
owner: string;
|
||||
label?: string;
|
||||
}
|
||||
|
||||
export interface IWorkspaceCommentThreadsEvent {
|
||||
|
||||
@@ -34,6 +34,9 @@ import { ICommandService, CommandsRegistry } from 'vs/platform/commands/common/c
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { ctxCommentEditorFocused, SimpleCommentEditor } from 'vs/workbench/contrib/comments/browser/simpleCommentEditor';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { IAction, Action } from 'vs/base/common/actions';
|
||||
import { ContextSubMenu } from 'vs/base/browser/contextmenu';
|
||||
import { IQuickInputService, QuickPickInput, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
|
||||
|
||||
export const ID = 'editor.contrib.review';
|
||||
|
||||
@@ -61,7 +64,7 @@ class CommentingRangeDecoration {
|
||||
return this._decorationId;
|
||||
}
|
||||
|
||||
constructor(private _editor: ICodeEditor, private _ownerId: string, private _extensionId: string | undefined, private _range: IRange, private _reply: modes.Command | undefined, commentingOptions: ModelDecorationOptions, private commentingRangesInfo?: modes.CommentingRanges) {
|
||||
constructor(private _editor: ICodeEditor, private _ownerId: string, private _extensionId: string | undefined, private _label: string | undefined, private _range: IRange, private _reply: modes.Command | undefined, commentingOptions: ModelDecorationOptions, private commentingRangesInfo?: modes.CommentingRanges) {
|
||||
const startLineNumber = _range.startLineNumber;
|
||||
const endLineNumber = _range.endLineNumber;
|
||||
let commentingRangeDecorations = [{
|
||||
@@ -78,9 +81,10 @@ class CommentingRangeDecoration {
|
||||
}
|
||||
}
|
||||
|
||||
public getCommentAction(): { replyCommand: modes.Command | undefined, ownerId: string, extensionId: string | undefined, commentingRangesInfo: modes.CommentingRanges | undefined } {
|
||||
public getCommentAction(): { replyCommand: modes.Command | undefined, ownerId: string, extensionId: string | undefined, label: string | undefined, commentingRangesInfo: modes.CommentingRanges | undefined } {
|
||||
return {
|
||||
extensionId: this._extensionId,
|
||||
label: this._label,
|
||||
replyCommand: this._reply,
|
||||
ownerId: this._ownerId,
|
||||
commentingRangesInfo: this.commentingRangesInfo
|
||||
@@ -120,11 +124,11 @@ class CommentingRangeDecorator {
|
||||
for (const info of commentInfos) {
|
||||
if (Array.isArray(info.commentingRanges)) {
|
||||
info.commentingRanges.forEach(range => {
|
||||
commentingRangeDecorations.push(new CommentingRangeDecoration(editor, info.owner, info.extensionId, range, info.reply, this.decorationOptions));
|
||||
commentingRangeDecorations.push(new CommentingRangeDecoration(editor, info.owner, info.extensionId, info.label, range, info.reply, this.decorationOptions));
|
||||
});
|
||||
} else {
|
||||
(info.commentingRanges ? info.commentingRanges.ranges : []).forEach(range => {
|
||||
commentingRangeDecorations.push(new CommentingRangeDecoration(editor, info.owner, info.extensionId, range, (info.commentingRanges as modes.CommentingRanges).newCommentThreadCommand, this.decorationOptions, info.commentingRanges as modes.CommentingRanges));
|
||||
commentingRangeDecorations.push(new CommentingRangeDecoration(editor, info.owner, info.extensionId, info.label, range, (info.commentingRanges as modes.CommentingRanges).newCommentThreadCommand, this.decorationOptions, info.commentingRanges as modes.CommentingRanges));
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -136,14 +140,15 @@ class CommentingRangeDecorator {
|
||||
}
|
||||
|
||||
public getMatchedCommentAction(line: number) {
|
||||
let result = [];
|
||||
for (const decoration of this.commentingRangeDecorations) {
|
||||
const range = decoration.getActiveRange();
|
||||
if (range && range.startLineNumber <= line && line <= range.endLineNumber) {
|
||||
return decoration.getCommentAction();
|
||||
result.push(decoration.getCommentAction());
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return result;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
@@ -164,7 +169,7 @@ export class ReviewController implements IEditorContribution {
|
||||
private _commentingRangeSpaceReserved = false;
|
||||
private _computePromise: CancelablePromise<Array<ICommentInfo | null>> | null;
|
||||
private _addInProgress: boolean;
|
||||
private _emptyThreadsToAddQueue: number[] = [];
|
||||
private _emptyThreadsToAddQueue: [number, IEditorMouseEvent | undefined][] = [];
|
||||
private _computeCommentingRangePromise: CancelablePromise<ICommentInfo[]> | null;
|
||||
private _computeCommentingRangeScheduler: Delayer<Array<ICommentInfo | null>> | null;
|
||||
private _pendingCommentCache: { [key: number]: { [key: string]: string } };
|
||||
@@ -178,6 +183,7 @@ export class ReviewController implements IEditorContribution {
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@ICodeEditorService private readonly codeEditorService: ICodeEditorService,
|
||||
@IContextMenuService readonly contextMenuService: IContextMenuService,
|
||||
@IQuickInputService private readonly quickInputService: IQuickInputService
|
||||
) {
|
||||
this.editor = editor;
|
||||
this.globalToDispose = [];
|
||||
@@ -547,11 +553,11 @@ export class ReviewController implements IEditorContribution {
|
||||
|
||||
if (e.target.element.className.indexOf('comment-diff-added') >= 0) {
|
||||
const lineNumber = e.target.position!.lineNumber;
|
||||
this.addOrToggleCommentAtLine(lineNumber);
|
||||
this.addOrToggleCommentAtLine(lineNumber, e);
|
||||
}
|
||||
}
|
||||
|
||||
public async addOrToggleCommentAtLine(lineNumber: number): Promise<void> {
|
||||
public async addOrToggleCommentAtLine(lineNumber: number, e: IEditorMouseEvent | undefined): Promise<void> {
|
||||
// If an add is already in progress, queue the next add and process it after the current one finishes to
|
||||
// prevent empty comment threads from being added to the same line.
|
||||
if (!this._addInProgress) {
|
||||
@@ -563,29 +569,98 @@ export class ReviewController implements IEditorContribution {
|
||||
this.processNextThreadToAdd();
|
||||
return;
|
||||
} else {
|
||||
this.addCommentAtLine(lineNumber);
|
||||
this.addCommentAtLine(lineNumber, e);
|
||||
}
|
||||
} else {
|
||||
this._emptyThreadsToAddQueue.push(lineNumber);
|
||||
this._emptyThreadsToAddQueue.push([lineNumber, e]);
|
||||
}
|
||||
}
|
||||
|
||||
private processNextThreadToAdd(): void {
|
||||
this._addInProgress = false;
|
||||
const lineNumber = this._emptyThreadsToAddQueue.shift();
|
||||
if (lineNumber) {
|
||||
this.addOrToggleCommentAtLine(lineNumber);
|
||||
const info = this._emptyThreadsToAddQueue.shift();
|
||||
if (info) {
|
||||
this.addOrToggleCommentAtLine(info[0], info[1]);
|
||||
}
|
||||
}
|
||||
|
||||
public addCommentAtLine(lineNumber: number): Promise<void> {
|
||||
const newCommentInfo = this._commentingRangeDecorator.getMatchedCommentAction(lineNumber);
|
||||
if (!newCommentInfo || !this.editor.hasModel()) {
|
||||
public addCommentAtLine(lineNumber: number, e: IEditorMouseEvent | undefined): Promise<void> {
|
||||
const newCommentInfos = this._commentingRangeDecorator.getMatchedCommentAction(lineNumber);
|
||||
if (!newCommentInfos.length || !this.editor.hasModel()) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const { replyCommand, ownerId, extensionId, commentingRangesInfo } = newCommentInfo;
|
||||
if (newCommentInfos.length > 1) {
|
||||
if (e) {
|
||||
const anchor = { x: e.event.posx, y: e.event.posy };
|
||||
|
||||
this.contextMenuService.showContextMenu({
|
||||
getAnchor: () => anchor,
|
||||
getActions: () => this.getContextMenuActions(newCommentInfos, lineNumber),
|
||||
getActionsContext: () => newCommentInfos.length ? newCommentInfos[0] : undefined,
|
||||
onHide: () => { this._addInProgress = false; }
|
||||
});
|
||||
|
||||
return Promise.resolve();
|
||||
} else {
|
||||
const picks = this.getCommentProvidersQuickPicks(newCommentInfos);
|
||||
return this.quickInputService.pick(picks, { placeHolder: nls.localize('pickCommentService', "Select Comment Provider"), matchOnDescription: true }).then(pick => {
|
||||
if (!pick) {
|
||||
return;
|
||||
}
|
||||
|
||||
const commentInfos = newCommentInfos.filter(info => info.ownerId === pick.id);
|
||||
|
||||
if (commentInfos.length) {
|
||||
const { replyCommand, ownerId, extensionId, commentingRangesInfo } = commentInfos[0];
|
||||
this.addCommentAtLine2(lineNumber, replyCommand, ownerId, extensionId, commentingRangesInfo);
|
||||
}
|
||||
}).then(() => {
|
||||
this._addInProgress = false;
|
||||
});
|
||||
}
|
||||
} else {
|
||||
const { replyCommand, ownerId, extensionId, commentingRangesInfo } = newCommentInfos[0]!;
|
||||
this.addCommentAtLine2(lineNumber, replyCommand, ownerId, extensionId, commentingRangesInfo);
|
||||
}
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
private getCommentProvidersQuickPicks(commentInfos: { replyCommand: modes.Command | undefined, ownerId: string, extensionId: string | undefined, label: string | undefined, commentingRangesInfo: modes.CommentingRanges | undefined }[]) {
|
||||
const picks: QuickPickInput[] = commentInfos.map((commentInfo) => {
|
||||
const { ownerId, extensionId, label } = commentInfo;
|
||||
|
||||
return <IQuickPickItem>{
|
||||
label: label || extensionId,
|
||||
id: ownerId
|
||||
};
|
||||
});
|
||||
|
||||
return picks;
|
||||
}
|
||||
|
||||
private getContextMenuActions(commentInfos: { replyCommand: modes.Command | undefined, ownerId: string, extensionId: string | undefined, label: string | undefined, commentingRangesInfo: modes.CommentingRanges | undefined }[], lineNumber: number): (IAction | ContextSubMenu)[] {
|
||||
const actions: (IAction | ContextSubMenu)[] = [];
|
||||
|
||||
commentInfos.forEach(commentInfo => {
|
||||
const { replyCommand, ownerId, extensionId, label, commentingRangesInfo } = commentInfo;
|
||||
|
||||
actions.push(new Action(
|
||||
'addCommentThread',
|
||||
`${label || extensionId}`,
|
||||
undefined,
|
||||
true,
|
||||
() => {
|
||||
this.addCommentAtLine2(lineNumber, replyCommand, ownerId, extensionId, commentingRangesInfo);
|
||||
return Promise.resolve();
|
||||
}
|
||||
));
|
||||
});
|
||||
return actions;
|
||||
}
|
||||
|
||||
public addCommentAtLine2(lineNumber: number, replyCommand: modes.Command | undefined, ownerId: string, extensionId: string | undefined, commentingRangesInfo: modes.CommentingRanges | undefined) {
|
||||
if (commentingRangesInfo) {
|
||||
let range = new Range(lineNumber, 1, lineNumber, 1);
|
||||
if (commentingRangesInfo.newCommentThreadCommand) {
|
||||
@@ -597,7 +672,7 @@ export class ReviewController implements IEditorContribution {
|
||||
this._addInProgress = false;
|
||||
}
|
||||
} else if (commentingRangesInfo.newCommentThreadCallback) {
|
||||
return commentingRangesInfo.newCommentThreadCallback(this.editor.getModel().uri, range)
|
||||
return commentingRangesInfo.newCommentThreadCallback(this.editor.getModel()!.uri, range)
|
||||
.then(_ => {
|
||||
this.processNextThreadToAdd();
|
||||
})
|
||||
@@ -621,7 +696,6 @@ export class ReviewController implements IEditorContribution {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
|
||||
private setComments(commentInfos: ICommentInfo[]): void {
|
||||
if (!this.editor) {
|
||||
return;
|
||||
@@ -762,7 +836,7 @@ CommandsRegistry.registerCommand({
|
||||
}
|
||||
|
||||
const position = activeEditor.getPosition();
|
||||
return controller.addOrToggleCommentAtLine(position.lineNumber);
|
||||
return controller.addOrToggleCommentAtLine(position.lineNumber, undefined);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ export class DebugModel implements IDebugModel {
|
||||
// Make sure to de-dupe if a session is re-intialized. In case of EH debugging we are adding a session again after an attach.
|
||||
return false;
|
||||
}
|
||||
if (s.state === State.Inactive && s.getLabel() === session.getLabel()) {
|
||||
if (s.state === State.Inactive && s.configuration.name === session.configuration.name) {
|
||||
// Make sure to remove all inactive sessions that are using the same configuration as the new session
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -783,6 +783,7 @@ export class DebugSession implements IDebugSession {
|
||||
}));
|
||||
|
||||
this.rawListeners.push(this.raw.onDidExitAdapter(event => {
|
||||
this.initialized = true;
|
||||
this._onDidEndAdapter.fire(event);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
} from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { TestExtensionEnablementService } from 'vs/platform/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { URLService } from 'vs/platform/url/common/urlService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
||||
@@ -83,30 +83,30 @@ suite('Experimental Prompts', () => {
|
||||
});
|
||||
|
||||
|
||||
test('Show experimental prompt if experiment should be run. Choosing option with link should mark experiment as complete', () => {
|
||||
// test('Show experimental prompt if experiment should be run. Choosing option with link should mark experiment as complete', () => {
|
||||
|
||||
storageData = {
|
||||
enabled: true,
|
||||
state: ExperimentState.Run
|
||||
};
|
||||
// storageData = {
|
||||
// enabled: true,
|
||||
// state: ExperimentState.Run
|
||||
// };
|
||||
|
||||
instantiationService.stub(INotificationService, {
|
||||
prompt: (a: Severity, b: string, c: IPromptChoice[], options: IPromptOptions) => {
|
||||
assert.equal(b, promptText);
|
||||
assert.equal(c.length, 2);
|
||||
c[0].run();
|
||||
return undefined!;
|
||||
}
|
||||
});
|
||||
// instantiationService.stub(INotificationService, {
|
||||
// prompt: (a: Severity, b: string, c: IPromptChoice[], options: IPromptOptions) => {
|
||||
// assert.equal(b, promptText);
|
||||
// assert.equal(c.length, 2);
|
||||
// c[0].run();
|
||||
// return undefined!;
|
||||
// }
|
||||
// });
|
||||
|
||||
experimentalPrompt = instantiationService.createInstance(ExperimentalPrompts);
|
||||
onExperimentEnabledEvent.fire(experiment);
|
||||
// experimentalPrompt = instantiationService.createInstance(ExperimentalPrompts);
|
||||
// onExperimentEnabledEvent.fire(experiment);
|
||||
|
||||
return Promise.resolve(null).then(result => {
|
||||
assert.equal(storageData['state'], ExperimentState.Complete);
|
||||
});
|
||||
// return Promise.resolve(null).then(result => {
|
||||
// assert.equal(storageData['state'], ExperimentState.Complete);
|
||||
// });
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
test('Show experimental prompt if experiment should be run. Choosing negative option should mark experiment as complete', () => {
|
||||
|
||||
|
||||
@@ -115,20 +115,16 @@ export function onExtensionChanged(accessor: ServicesAccessor): Event<IExtension
|
||||
});
|
||||
}
|
||||
|
||||
export function getInstalledExtensions(accessor: ServicesAccessor): Promise<IExtensionStatus[]> {
|
||||
export async function getInstalledExtensions(accessor: ServicesAccessor): Promise<IExtensionStatus[]> {
|
||||
const extensionService = accessor.get(IExtensionManagementService);
|
||||
const extensionEnablementService = accessor.get(IExtensionEnablementService);
|
||||
return extensionService.getInstalled().then(extensions => {
|
||||
return extensionEnablementService.getDisabledExtensions()
|
||||
.then(disabledExtensions => {
|
||||
return extensions.map(extension => {
|
||||
return {
|
||||
identifier: extension.identifier,
|
||||
local: extension,
|
||||
globallyEnabled: disabledExtensions.every(disabled => !areSameExtensions(disabled, extension.identifier))
|
||||
};
|
||||
});
|
||||
});
|
||||
const extensions = await extensionService.getInstalled();
|
||||
return extensions.map(extension => {
|
||||
return {
|
||||
identifier: extension.identifier,
|
||||
local: extension,
|
||||
globallyEnabled: extensionEnablementService.isEnabled(extension)
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/we
|
||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||
import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
|
||||
import { IOpenerService } from 'vs/platform/opener/common/opener';
|
||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { IThemeService } from 'vs/platform/theme/common/themeService';
|
||||
import { KeybindingLabel } from 'vs/base/browser/ui/keybindingLabel/keybindingLabel';
|
||||
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
|
||||
@@ -200,7 +199,6 @@ export class ExtensionEditor extends BaseEditor {
|
||||
@IKeybindingService private readonly keybindingService: IKeybindingService,
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@IOpenerService private readonly openerService: IOpenerService,
|
||||
@IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService,
|
||||
@IExtensionTipsService private readonly extensionTipsService: IExtensionTipsService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IExtensionService private readonly extensionService: IExtensionService,
|
||||
@@ -546,7 +544,6 @@ export class ExtensionEditor extends BaseEditor {
|
||||
.then(removeEmbeddedSVGs)
|
||||
.then(body => {
|
||||
const wbeviewElement = this.instantiationService.createInstance(WebviewElement,
|
||||
this.layoutService.getContainer(Parts.EDITOR_PART),
|
||||
{
|
||||
enableFindWidget: true,
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import 'vs/css!./media/extensionActions';
|
||||
import { localize } from 'vs/nls';
|
||||
import { IAction, Action } from 'vs/base/common/actions';
|
||||
import { Throttler, Delayer } from 'vs/base/common/async';
|
||||
import { Delayer } from 'vs/base/common/async';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import * as json from 'vs/base/common/json';
|
||||
@@ -1044,9 +1044,10 @@ export class ReloadAction extends ExtensionAction {
|
||||
private static readonly EnabledClass = 'extension-action reload';
|
||||
private static readonly DisabledClass = `${ReloadAction.EnabledClass} disabled`;
|
||||
|
||||
// Use delayer to wait for more updates
|
||||
private throttler: Throttler;
|
||||
private disposables: IDisposable[] = [];
|
||||
private _runningExtensions: IExtensionDescription[] = [];
|
||||
private get runningExtensions(): IExtensionDescription[] { return this._runningExtensions; }
|
||||
private set runningExtensions(runningExtensions: IExtensionDescription[]) { this._runningExtensions = runningExtensions; this.update(); }
|
||||
|
||||
constructor(
|
||||
@IExtensionsWorkbenchService private readonly extensionsWorkbenchService: IExtensionsWorkbenchService,
|
||||
@@ -1055,39 +1056,38 @@ export class ReloadAction extends ExtensionAction {
|
||||
@IExtensionEnablementService private readonly extensionEnablementService: IExtensionEnablementService
|
||||
) {
|
||||
super('extensions.reload', localize('reloadAction', "Reload"), ReloadAction.DisabledClass, false);
|
||||
this.throttler = new Throttler();
|
||||
this.extensionService.onDidChangeExtensions(this.update, this, this.disposables);
|
||||
this.update();
|
||||
this.extensionService.onDidChangeExtensions(this.updateRunningExtensions, this, this.disposables);
|
||||
this.updateRunningExtensions();
|
||||
}
|
||||
|
||||
update(): Promise<void> {
|
||||
return this.throttler.queue(() => {
|
||||
this.enabled = false;
|
||||
this.tooltip = '';
|
||||
if (!this.extension) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
const state = this.extension.state;
|
||||
if (state === ExtensionState.Installing || state === ExtensionState.Uninstalling) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
const installed = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, this.extension.identifier))[0];
|
||||
const local = this.extension.local || (installed && installed.local);
|
||||
if (local && local.manifest && local.manifest.contributes && local.manifest.contributes.localizations && local.manifest.contributes.localizations.length > 0) {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
return this.extensionService.getExtensions()
|
||||
.then(runningExtensions => this.computeReloadState(runningExtensions, installed));
|
||||
}).then(() => {
|
||||
this.class = this.enabled ? ReloadAction.EnabledClass : ReloadAction.DisabledClass;
|
||||
});
|
||||
private updateRunningExtensions(): void {
|
||||
this.extensionService.getExtensions().then(runningExtensions => this.runningExtensions = runningExtensions);
|
||||
}
|
||||
|
||||
private computeReloadState(runningExtensions: IExtensionDescription[], installed: IExtension): void {
|
||||
update(): void {
|
||||
this.enabled = false;
|
||||
this.tooltip = '';
|
||||
if (!this.extension) {
|
||||
return;
|
||||
}
|
||||
const state = this.extension.state;
|
||||
if (state === ExtensionState.Installing || state === ExtensionState.Uninstalling) {
|
||||
return;
|
||||
}
|
||||
const installed = this.extensionsWorkbenchService.local.filter(e => areSameExtensions(e.identifier, this.extension.identifier))[0];
|
||||
const local = this.extension.local || (installed && installed.local);
|
||||
if (local && local.manifest && local.manifest.contributes && local.manifest.contributes.localizations && local.manifest.contributes.localizations.length > 0) {
|
||||
return;
|
||||
}
|
||||
this.computeReloadState(installed);
|
||||
this.class = this.enabled ? ReloadAction.EnabledClass : ReloadAction.DisabledClass;
|
||||
}
|
||||
|
||||
private computeReloadState(installed: IExtension): void {
|
||||
const isUninstalled = this.extension.state === ExtensionState.Uninstalled;
|
||||
const isDisabled = this.extension.local ? !this.extensionEnablementService.isEnabled(this.extension.local) : false;
|
||||
const isEnabled = this.extension.local ? this.extensionEnablementService.isEnabled(this.extension.local) : false;
|
||||
const runningExtension = runningExtensions.filter(e => areSameExtensions({ id: e.identifier.value }, this.extension.identifier))[0];
|
||||
const runningExtension = this.runningExtensions.filter(e => areSameExtensions({ id: e.identifier.value }, this.extension.identifier))[0];
|
||||
|
||||
if (installed && installed.local) {
|
||||
if (runningExtension) {
|
||||
|
||||
@@ -11,12 +11,12 @@ import * as ExtensionsActions from 'vs/workbench/contrib/extensions/electron-bro
|
||||
import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/node/extensionsWorkbenchService';
|
||||
import {
|
||||
IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension,
|
||||
DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, EnablementState, InstallOperation, IExtensionManagementServerService, IExtensionManagementServer
|
||||
DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, EnablementState, InstallOperation, IExtensionManagementServerService
|
||||
} from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
import { TestExtensionEnablementService } from 'vs/platform/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
@@ -74,7 +74,7 @@ suite('ExtensionsActions Test', () => {
|
||||
instantiationService.stub(IExtensionManagementService, 'onDidUninstallExtension', didUninstallEvent.event);
|
||||
instantiationService.stub(IRemoteAgentService, RemoteAgentService);
|
||||
|
||||
instantiationService.stub(IExtensionManagementServerService, instantiationService.createInstance(ExtensionManagementServerService, <IExtensionManagementServer>{ authority: 'vscode-local', extensionManagementService: instantiationService.get(IExtensionManagementService), label: 'local' }));
|
||||
instantiationService.stub(IExtensionManagementServerService, instantiationService.createInstance(ExtensionManagementServerService));
|
||||
|
||||
instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService));
|
||||
|
||||
@@ -1202,7 +1202,7 @@ suite('ExtensionsActions Test', () => {
|
||||
|
||||
const gallery = aGalleryExtension('a', { identifier: local.identifier, version: '1.0.2' });
|
||||
installEvent.fire({ identifier: gallery.identifier, gallery });
|
||||
didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Install, local: aLocalExtension('a', gallery, gallery) });
|
||||
didInstallEvent.fire({ identifier: gallery.identifier, gallery, operation: InstallOperation.Update, local: aLocalExtension('a', gallery, gallery) });
|
||||
|
||||
assert.ok(!testObject.enabled);
|
||||
});
|
||||
|
||||
@@ -34,7 +34,7 @@ import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/ex
|
||||
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
|
||||
import { ConfigurationKey } from 'vs/workbench/contrib/extensions/common/extensions';
|
||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||
import { TestExtensionEnablementService } from 'vs/platform/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
import product from 'vs/platform/product/node/product';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
|
||||
@@ -12,12 +12,12 @@ import { IExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/com
|
||||
import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/node/extensionsWorkbenchService';
|
||||
import {
|
||||
IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension, IQueryOptions,
|
||||
DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, IExtensionManagementServerService, IExtensionManagementServer, EnablementState, ExtensionRecommendationReason, SortBy
|
||||
DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IExtensionIdentifier, IExtensionManagementServerService, EnablementState, ExtensionRecommendationReason, SortBy
|
||||
} from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
import { TestExtensionEnablementService } from 'vs/platform/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
@@ -90,7 +90,7 @@ suite('ExtensionsListView Tests', () => {
|
||||
instantiationService.stub(IExtensionManagementService, 'onDidUninstallExtension', didUninstallEvent.event);
|
||||
instantiationService.stub(IRemoteAgentService, RemoteAgentService);
|
||||
|
||||
instantiationService.stub(IExtensionManagementServerService, instantiationService.createInstance(ExtensionManagementServerService, <IExtensionManagementServer>{ authority: 'vscode-local', extensionManagementService: instantiationService.get(IExtensionManagementService), label: 'local' }));
|
||||
instantiationService.stub(IExtensionManagementServerService, instantiationService.createInstance(ExtensionManagementServerService));
|
||||
|
||||
instantiationService.stub(IExtensionEnablementService, new TestExtensionEnablementService(instantiationService));
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ import { IExtensionsWorkbenchService, ExtensionState, AutoCheckUpdatesConfigurat
|
||||
import { ExtensionsWorkbenchService } from 'vs/workbench/contrib/extensions/node/extensionsWorkbenchService';
|
||||
import {
|
||||
IExtensionManagementService, IExtensionGalleryService, IExtensionEnablementService, IExtensionTipsService, ILocalExtension, IGalleryExtension,
|
||||
DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IGalleryExtensionAssets, IExtensionIdentifier, EnablementState, InstallOperation, IExtensionManagementServerService, IExtensionManagementServer
|
||||
DidInstallExtensionEvent, DidUninstallExtensionEvent, InstallExtensionEvent, IGalleryExtensionAssets, IExtensionIdentifier, EnablementState, InstallOperation, IExtensionManagementServerService
|
||||
} from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { getGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { ExtensionManagementService } from 'vs/platform/extensionManagement/node/extensionManagementService';
|
||||
import { ExtensionTipsService } from 'vs/workbench/contrib/extensions/electron-browser/extensionTipsService';
|
||||
import { TestExtensionEnablementService } from 'vs/platform/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { TestExtensionEnablementService } from 'vs/workbench/services/extensionManagement/test/electron-browser/extensionEnablementService.test';
|
||||
import { ExtensionGalleryService } from 'vs/platform/extensionManagement/node/extensionGalleryService';
|
||||
import { IURLService } from 'vs/platform/url/common/url';
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
@@ -77,7 +77,7 @@ suite('ExtensionsWorkbenchServiceTest', () => {
|
||||
});
|
||||
|
||||
instantiationService.stub(IRemoteAgentService, RemoteAgentService);
|
||||
instantiationService.stub(IExtensionManagementServerService, instantiationService.createInstance(ExtensionManagementServerService, <IExtensionManagementServer>{ authority: 'vscode-local', extensionManagementService: instantiationService.get(IExtensionManagementService), label: 'local' }));
|
||||
instantiationService.stub(IExtensionManagementServerService, instantiationService.createInstance(ExtensionManagementServerService));
|
||||
|
||||
instantiationService.stub(IExtensionManagementService, ExtensionManagementService);
|
||||
instantiationService.stub(IExtensionManagementService, 'onInstallExtension', installEvent.event);
|
||||
|
||||
@@ -7,7 +7,7 @@ import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import * as resources from 'vs/base/common/resources';
|
||||
import { IEditorViewState } from 'vs/editor/common/editorCommon';
|
||||
import { toResource, SideBySideEditorInput, IWorkbenchEditorConfiguration } from 'vs/workbench/common/editor';
|
||||
import { toResource, SideBySideEditorInput, IWorkbenchEditorConfiguration, SideBySideEditor as SideBySideEditorChoice } from 'vs/workbench/common/editor';
|
||||
import { ITextFileService, ITextFileEditorModel } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { FileOperationEvent, FileOperation, IFileService, FileChangeType, FileChangesEvent } from 'vs/platform/files/common/files';
|
||||
import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileEditorInput';
|
||||
@@ -94,7 +94,7 @@ export class FileEditorTracker extends Disposable implements IWorkbenchContribut
|
||||
distinct(
|
||||
coalesce(this.editorService.visibleEditors
|
||||
.map(editorInput => {
|
||||
const resource = toResource(editorInput, { supportSideBySide: true });
|
||||
const resource = toResource(editorInput, { supportSideBySide: SideBySideEditorChoice.MASTER });
|
||||
return resource ? this.textFileService.models.get(resource) : undefined;
|
||||
}))
|
||||
.filter(model => !model.isDirty()),
|
||||
@@ -325,7 +325,7 @@ export class FileEditorTracker extends Disposable implements IWorkbenchContribut
|
||||
private handleUpdatesToVisibleBinaryEditors(e: FileChangesEvent): void {
|
||||
const editors = this.editorService.visibleControls;
|
||||
editors.forEach(editor => {
|
||||
const resource = editor.input ? toResource(editor.input, { supportSideBySide: true }) : undefined;
|
||||
const resource = editor.input ? toResource(editor.input, { supportSideBySide: SideBySideEditorChoice.MASTER }) : undefined;
|
||||
|
||||
// Support side-by-side binary editors too
|
||||
let isBinaryEditor = false;
|
||||
@@ -346,7 +346,7 @@ export class FileEditorTracker extends Disposable implements IWorkbenchContribut
|
||||
private handleOutOfWorkspaceWatchers(): void {
|
||||
const visibleOutOfWorkspacePaths = new ResourceMap<URI>();
|
||||
coalesce(this.editorService.visibleEditors.map(editorInput => {
|
||||
return toResource(editorInput, { supportSideBySide: true });
|
||||
return toResource(editorInput, { supportSideBySide: SideBySideEditorChoice.MASTER });
|
||||
})).filter(resource => {
|
||||
return this.fileService.canHandleResource(resource) && !this.contextService.isInsideWorkspace(resource);
|
||||
}).forEach(resource => {
|
||||
|
||||
@@ -17,7 +17,7 @@ import { dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { VIEWLET_ID, IExplorerService } from 'vs/workbench/contrib/files/common/files';
|
||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { IFileService, AutoSaveConfiguration } from 'vs/platform/files/common/files';
|
||||
import { toResource, ITextEditor } from 'vs/workbench/common/editor';
|
||||
import { toResource, ITextEditor, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||
import { ExplorerViewlet } from 'vs/workbench/contrib/files/browser/explorerViewlet';
|
||||
import { IUntitledEditorService } from 'vs/workbench/services/untitled/common/untitledEditorService';
|
||||
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
|
||||
@@ -723,7 +723,7 @@ export class ShowActiveFileInExplorer extends Action {
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
const resource = toResource(this.editorService.activeEditor, { supportSideBySide: true });
|
||||
const resource = toResource(this.editorService.activeEditor, { supportSideBySide: SideBySideEditor.MASTER });
|
||||
if (resource) {
|
||||
this.commandService.executeCommand(REVEAL_IN_EXPLORER_COMMAND_ID, resource);
|
||||
} else {
|
||||
@@ -795,7 +795,7 @@ export class ShowOpenedFileInNewWindow extends Action {
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
const fileResource = toResource(this.editorService.activeEditor, { supportSideBySide: true });
|
||||
const fileResource = toResource(this.editorService.activeEditor, { supportSideBySide: SideBySideEditor.MASTER });
|
||||
if (fileResource) {
|
||||
if (this.fileService.canHandleResource(fileResource)) {
|
||||
this.windowService.openWindow([{ fileUri: fileResource }], { forceNewWindow: true });
|
||||
@@ -898,7 +898,7 @@ export class CompareWithClipboardAction extends Action {
|
||||
}
|
||||
|
||||
public run(): Promise<any> {
|
||||
const resource = toResource(this.editorService.activeEditor, { supportSideBySide: true });
|
||||
const resource = toResource(this.editorService.activeEditor, { supportSideBySide: SideBySideEditor.MASTER });
|
||||
if (resource && (this.fileService.canHandleResource(resource) || resource.scheme === Schemas.untitled)) {
|
||||
if (!this.registrationDisposal) {
|
||||
const provider = this.instantiationService.createInstance(ClipboardContentProvider);
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as nls from 'vs/nls';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
// {{SQL CARBON EDIT}} - Import EditorInput
|
||||
import { toResource, IEditorCommandsContext, EditorInput } from 'vs/workbench/common/editor';
|
||||
import { toResource, IEditorCommandsContext, EditorInput, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||
import { IWindowsService, IWindowService, IURIToOpen, IOpenSettings, INewWindowOptions } from 'vs/platform/windows/common/windows';
|
||||
import { ServicesAccessor, IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
@@ -41,6 +41,7 @@ import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editor
|
||||
import { ILabelService } from 'vs/platform/label/common/label';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { basename } from 'vs/base/common/resources';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/queryEditorService';
|
||||
@@ -136,7 +137,7 @@ function save(
|
||||
let viewStateOfSource: IEditorViewState | null;
|
||||
const activeTextEditorWidget = getCodeEditor(editorService.activeTextEditorWidget);
|
||||
if (activeTextEditorWidget) {
|
||||
const activeResource = toResource(editorService.activeEditor, { supportSideBySide: true });
|
||||
const activeResource = toResource(editorService.activeEditor, { supportSideBySide: SideBySideEditor.MASTER });
|
||||
if (activeResource && (fileService.canHandleResource(activeResource) || resource.scheme === Schemas.untitled) && activeResource.toString() === resource.toString()) {
|
||||
viewStateOfSource = activeTextEditorWidget.saveViewState();
|
||||
}
|
||||
@@ -314,28 +315,46 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
});
|
||||
|
||||
const COMPARE_WITH_SAVED_SCHEMA = 'showModifications';
|
||||
let provider: FileOnDiskContentProvider;
|
||||
let providerDisposables: IDisposable[] = [];
|
||||
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
id: COMPARE_WITH_SAVED_COMMAND_ID,
|
||||
when: undefined,
|
||||
weight: KeybindingWeight.WorkbenchContrib,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyCode.KEY_D),
|
||||
handler: (accessor, resource: URI | object) => {
|
||||
if (!provider) {
|
||||
const instantiationService = accessor.get(IInstantiationService);
|
||||
const textModelService = accessor.get(ITextModelService);
|
||||
provider = instantiationService.createInstance(FileOnDiskContentProvider);
|
||||
textModelService.registerTextModelContentProvider(COMPARE_WITH_SAVED_SCHEMA, provider);
|
||||
const instantiationService = accessor.get(IInstantiationService);
|
||||
const textModelService = accessor.get(ITextModelService);
|
||||
const editorService = accessor.get(IEditorService);
|
||||
|
||||
// Register provider at first as needed
|
||||
let registerEditorListener = false;
|
||||
if (providerDisposables.length === 0) {
|
||||
registerEditorListener = true;
|
||||
|
||||
const provider = instantiationService.createInstance(FileOnDiskContentProvider);
|
||||
providerDisposables.push(provider);
|
||||
providerDisposables.push(textModelService.registerTextModelContentProvider(COMPARE_WITH_SAVED_SCHEMA, provider));
|
||||
}
|
||||
|
||||
const editorService = accessor.get(IEditorService);
|
||||
// Open editor (only files supported)
|
||||
const uri = getResourceForCommand(resource, accessor.get(IListService), editorService);
|
||||
|
||||
if (uri && uri.scheme === Schemas.file /* only files on disk supported for now */) {
|
||||
const name = basename(uri);
|
||||
const editorLabel = nls.localize('modifiedLabel', "{0} (on disk) ↔ {1}", name, name);
|
||||
|
||||
return editorService.openEditor({ leftResource: uri.with({ scheme: COMPARE_WITH_SAVED_SCHEMA }), rightResource: uri, label: editorLabel }).then(() => undefined);
|
||||
editorService.openEditor({ leftResource: uri.with({ scheme: COMPARE_WITH_SAVED_SCHEMA }), rightResource: uri, label: editorLabel }).then(() => {
|
||||
|
||||
// Dispose once no more diff editor is opened with the scheme
|
||||
if (registerEditorListener) {
|
||||
providerDisposables.push(editorService.onDidVisibleEditorsChange(() => {
|
||||
if (!editorService.editors.some(editor => !!toResource(editor, { supportSideBySide: SideBySideEditor.DETAILS, filterByScheme: COMPARE_WITH_SAVED_SCHEMA }))) {
|
||||
providerDisposables = dispose(providerDisposables);
|
||||
}
|
||||
}));
|
||||
}
|
||||
}, error => {
|
||||
providerDisposables = dispose(providerDisposables);
|
||||
});
|
||||
}
|
||||
|
||||
return Promise.resolve(true);
|
||||
@@ -554,7 +573,7 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
|
||||
handler: accessor => {
|
||||
const editorService = accessor.get(IEditorService);
|
||||
|
||||
const resource = toResource(editorService.activeEditor, { supportSideBySide: true });
|
||||
const resource = toResource(editorService.activeEditor, { supportSideBySide: SideBySideEditor.MASTER });
|
||||
if (resource) {
|
||||
// {{SQL CARBON EDIT}}
|
||||
return save(resource, false, { skipSaveParticipants: true }, editorService, accessor.get(IFileService), accessor.get(IUntitledEditorService), accessor.get(ITextFileService), accessor.get(IEditorGroupsService), accessor.get(IQueryEditorService));
|
||||
@@ -586,7 +605,7 @@ CommandsRegistry.registerCommand({
|
||||
const editorGroup = editorGroupService.getGroup(context.groupId);
|
||||
if (editorGroup) {
|
||||
editorGroup.editors.forEach(editor => {
|
||||
const resource = toResource(editor, { supportSideBySide: true });
|
||||
const resource = toResource(editor, { supportSideBySide: SideBySideEditor.MASTER });
|
||||
if (resource && (resource.scheme === Schemas.untitled || fileService.canHandleResource(resource))) {
|
||||
saveAllArg.push(resource);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IListService, WorkbenchAsyncDataTree } from 'vs/platform/list/browser/listService';
|
||||
import { OpenEditor } from 'vs/workbench/contrib/files/common/files';
|
||||
import { toResource } from 'vs/workbench/common/editor';
|
||||
import { toResource, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||
import { List } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { ExplorerItem } from 'vs/workbench/contrib/files/common/explorerModel';
|
||||
@@ -41,7 +41,7 @@ export function getResourceForCommand(resource: URI | object | undefined, listSe
|
||||
}
|
||||
}
|
||||
|
||||
return editorService.activeEditor ? toResource(editorService.activeEditor, { supportSideBySide: true }) : null;
|
||||
return editorService.activeEditor ? toResource(editorService.activeEditor, { supportSideBySide: SideBySideEditor.MASTER }) : null;
|
||||
}
|
||||
|
||||
export function getMultiSelectedResources(resource: URI | object | undefined, listService: IListService, editorService: IEditorService): Array<URI> {
|
||||
|
||||
@@ -25,9 +25,9 @@ export class ExplorerDecorationsProvider implements IDecorationsProvider {
|
||||
this.toDispose.push(contextService.onDidChangeWorkspaceFolders(e => {
|
||||
this._onDidChange.fire(e.changed.concat(e.added).map(wf => wf.uri));
|
||||
}));
|
||||
this.toDispose.push(explorerService.onDidChangeItem(item => {
|
||||
if (item) {
|
||||
this._onDidChange.fire([item.resource]);
|
||||
this.toDispose.push(explorerService.onDidChangeItem(change => {
|
||||
if (change.item) {
|
||||
this._onDidChange.fire([change.item.resource]);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { Action, IAction } from 'vs/base/common/actions';
|
||||
import { memoize } from 'vs/base/common/decorators';
|
||||
import { IFilesConfiguration, ExplorerFolderContext, FilesExplorerFocusedContext, ExplorerFocusedContext, ExplorerRootContext, ExplorerResourceReadonlyContext, IExplorerService, ExplorerResourceCut, ExplorerResourceMoveableToTrash } from 'vs/workbench/contrib/files/common/files';
|
||||
import { NewFolderAction, NewFileAction, FileCopiedContext, RefreshExplorerView } from 'vs/workbench/contrib/files/browser/fileActions';
|
||||
import { toResource } from 'vs/workbench/common/editor';
|
||||
import { toResource, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { CollapseAction } from 'vs/workbench/browser/viewlet';
|
||||
@@ -167,11 +167,11 @@ export class ExplorerView extends ViewletPanel {
|
||||
|
||||
this.disposables.push(this.labelService.onDidChangeFormatters(() => {
|
||||
this._onDidChangeTitleArea.fire();
|
||||
this.refresh();
|
||||
this.refresh(true);
|
||||
}));
|
||||
|
||||
this.disposables.push(this.explorerService.onDidChangeRoots(() => this.setTreeInput()));
|
||||
this.disposables.push(this.explorerService.onDidChangeItem(e => this.refresh(e)));
|
||||
this.disposables.push(this.explorerService.onDidChangeItem(e => this.refresh(e.recursive, e.item)));
|
||||
this.disposables.push(this.explorerService.onDidChangeEditable(async e => {
|
||||
const isEditing = !!this.explorerService.getEditableData(e);
|
||||
|
||||
@@ -181,7 +181,7 @@ export class ExplorerView extends ViewletPanel {
|
||||
DOM.removeClass(treeContainer, 'highlight');
|
||||
}
|
||||
|
||||
await this.refresh(e.parent);
|
||||
await this.refresh(false, e.parent);
|
||||
|
||||
if (isEditing) {
|
||||
DOM.addClass(treeContainer, 'highlight');
|
||||
@@ -365,7 +365,7 @@ export class ExplorerView extends ViewletPanel {
|
||||
|
||||
// Refresh viewer as needed if this originates from a config event
|
||||
if (event && needsRefresh) {
|
||||
this.refresh();
|
||||
this.refresh(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ export class ExplorerView extends ViewletPanel {
|
||||
* Refresh the contents of the explorer to get up to date data from the disk about the file structure.
|
||||
* If the item is passed we refresh only that level of the tree, otherwise we do a full refresh.
|
||||
*/
|
||||
private refresh(item?: ExplorerItem): Promise<void> {
|
||||
private refresh(recursive: boolean, item?: ExplorerItem): Promise<void> {
|
||||
if (!this.tree || !this.isBodyVisible()) {
|
||||
this.shouldRefresh = true;
|
||||
return Promise.resolve(undefined);
|
||||
@@ -432,7 +432,6 @@ export class ExplorerView extends ViewletPanel {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
|
||||
const recursive = !item;
|
||||
const toRefresh = item || this.tree.getInput();
|
||||
|
||||
return this.tree.updateChildren(toRefresh, recursive);
|
||||
@@ -504,7 +503,7 @@ export class ExplorerView extends ViewletPanel {
|
||||
}
|
||||
|
||||
// check for files
|
||||
return withNullAsUndefined(toResource(input, { supportSideBySide: true }));
|
||||
return withNullAsUndefined(toResource(input, { supportSideBySide: SideBySideEditor.MASTER }));
|
||||
}
|
||||
|
||||
private async onSelectResource(resource: URI | undefined, reveal = this.autoReveal): Promise<void> {
|
||||
|
||||
@@ -325,8 +325,7 @@ export class FilesFilter implements ITreeFilter<ExplorerItem, FuzzyScore> {
|
||||
|
||||
// Hide those that match Hidden Patterns
|
||||
const cached = this.hiddenExpressionPerRoot.get(stat.root.resource.toString());
|
||||
if (cached && cached.parsed(path.normalize(path.relative(stat.root.resource.path, stat.resource.path)), stat.name, name => !!(stat.parent && stat.parent.getChild(name)))) {
|
||||
// review (isidor): is path.normalize necessary? path.relative already returns an os path
|
||||
if (cached && cached.parsed(path.relative(stat.root.resource.path, stat.resource.path), stat.name, name => !!(stat.parent && stat.parent.getChild(name)))) {
|
||||
return false; // hidden through pattern
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ export class ExplorerService implements IExplorerService {
|
||||
private static readonly EXPLORER_FILE_CHANGES_REACT_DELAY = 500; // delay in ms to react to file changes to give our internal events a chance to react first
|
||||
|
||||
private _onDidChangeRoots = new Emitter<void>();
|
||||
private _onDidChangeItem = new Emitter<ExplorerItem | undefined>();
|
||||
private _onDidChangeItem = new Emitter<{ item?: ExplorerItem, recursive: boolean }>();
|
||||
private _onDidChangeEditable = new Emitter<ExplorerItem>();
|
||||
private _onDidSelectResource = new Emitter<{ resource?: URI, reveal?: boolean }>();
|
||||
private _onDidCopyItems = new Emitter<{ items: ExplorerItem[], cut: boolean, previouslyCutItems: ExplorerItem[] | undefined }>();
|
||||
@@ -40,6 +40,7 @@ export class ExplorerService implements IExplorerService {
|
||||
private editable: { stat: ExplorerItem, data: IEditableData } | undefined;
|
||||
private _sortOrder: SortOrder;
|
||||
private cutItems: ExplorerItem[] | undefined;
|
||||
private fileSystemProviderSchemes = new Set<string>();
|
||||
|
||||
constructor(
|
||||
@IFileService private fileService: IFileService,
|
||||
@@ -60,7 +61,7 @@ export class ExplorerService implements IExplorerService {
|
||||
return this._onDidChangeRoots.event;
|
||||
}
|
||||
|
||||
get onDidChangeItem(): Event<ExplorerItem | undefined> {
|
||||
get onDidChangeItem(): Event<{ item?: ExplorerItem, recursive: boolean }> {
|
||||
return this._onDidChangeItem.event;
|
||||
}
|
||||
|
||||
@@ -98,7 +99,14 @@ export class ExplorerService implements IExplorerService {
|
||||
this.disposables.push(this.fileService.onAfterOperation(e => this.onFileOperation(e)));
|
||||
this.disposables.push(this.fileService.onFileChanges(e => this.onFileChanges(e)));
|
||||
this.disposables.push(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(this.configurationService.getValue<IFilesConfiguration>())));
|
||||
this.disposables.push(this.fileService.onDidChangeFileSystemProviderRegistrations(() => this._onDidChangeItem.fire(undefined)));
|
||||
this.disposables.push(this.fileService.onDidChangeFileSystemProviderRegistrations(e => {
|
||||
if (e.added && this.fileSystemProviderSchemes.has(e.scheme)) {
|
||||
// A file system provider got re-registered, we should update all file stats since they might change (got read-only)
|
||||
this._onDidChangeItem.fire({ recursive: true });
|
||||
} else {
|
||||
this.fileSystemProviderSchemes.add(e.scheme);
|
||||
}
|
||||
}));
|
||||
this.disposables.push(model.onDidChangeRoots(() => this._onDidChangeRoots.fire()));
|
||||
|
||||
return model;
|
||||
@@ -158,19 +166,19 @@ export class ExplorerService implements IExplorerService {
|
||||
// Update Input with disk Stat
|
||||
ExplorerItem.mergeLocalWithDisk(modelStat, root);
|
||||
const item = root.find(resource);
|
||||
this._onDidChangeItem.fire(item ? item.parent : undefined);
|
||||
this._onDidChangeItem.fire({ item: root, recursive: true });
|
||||
|
||||
// Select and Reveal
|
||||
this._onDidSelectResource.fire({ resource: item ? item.resource : undefined, reveal });
|
||||
}, () => {
|
||||
root.isError = true;
|
||||
this._onDidChangeItem.fire(root);
|
||||
this._onDidChangeItem.fire({ item: root, recursive: false });
|
||||
});
|
||||
}
|
||||
|
||||
refresh(): void {
|
||||
this.model.roots.forEach(r => r.forgetChildren());
|
||||
this._onDidChangeItem.fire(undefined);
|
||||
this._onDidChangeItem.fire({ recursive: true });
|
||||
const resource = this.editorService.activeEditor ? this.editorService.activeEditor.getResource() : undefined;
|
||||
if (resource) {
|
||||
// We did a top level refresh, reveal the active file #67118
|
||||
@@ -205,7 +213,7 @@ export class ExplorerService implements IExplorerService {
|
||||
p.removeChild(childElement);
|
||||
p.addChild(childElement);
|
||||
// Refresh the Parent (View)
|
||||
this._onDidChangeItem.fire(p);
|
||||
this._onDidChangeItem.fire({ item: p, recursive: false });
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -224,7 +232,7 @@ export class ExplorerService implements IExplorerService {
|
||||
modelElements.forEach(modelElement => {
|
||||
// Rename File (Model)
|
||||
modelElement.rename(newElement);
|
||||
this._onDidChangeItem.fire(modelElement.parent);
|
||||
this._onDidChangeItem.fire({ item: modelElement.parent, recursive: false });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -238,8 +246,8 @@ export class ExplorerService implements IExplorerService {
|
||||
modelElements.forEach((modelElement, index) => {
|
||||
const oldParent = modelElement.parent;
|
||||
modelElement.move(newParents[index]);
|
||||
this._onDidChangeItem.fire(oldParent);
|
||||
this._onDidChangeItem.fire(newParents[index]);
|
||||
this._onDidChangeItem.fire({ item: oldParent, recursive: false });
|
||||
this._onDidChangeItem.fire({ item: newParents[index], recursive: false });
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -254,7 +262,7 @@ export class ExplorerService implements IExplorerService {
|
||||
// Remove Element from Parent (Model)
|
||||
parent.removeChild(element);
|
||||
// Refresh Parent (View)
|
||||
this._onDidChangeItem.fire(parent);
|
||||
this._onDidChangeItem.fire({ item: parent, recursive: false });
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -332,7 +340,7 @@ export class ExplorerService implements IExplorerService {
|
||||
|
||||
if (shouldRefresh()) {
|
||||
this.roots.forEach(r => r.forgetChildren());
|
||||
this._onDidChangeItem.fire(undefined);
|
||||
this._onDidChangeItem.fire({ recursive: true });
|
||||
}
|
||||
}, ExplorerService.EXPLORER_FILE_CHANGES_REACT_DELAY);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
|
||||
import { IWorkbenchEditorConfiguration, IEditorIdentifier, IEditorInput, toResource } from 'vs/workbench/common/editor';
|
||||
import { IWorkbenchEditorConfiguration, IEditorIdentifier, IEditorInput, toResource, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||
import { IFilesConfiguration, FileChangeType, IFileService } from 'vs/platform/files/common/files';
|
||||
import { ContextKeyExpr, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { ITextModelContentProvider } from 'vs/editor/common/services/resolverService';
|
||||
@@ -43,7 +43,7 @@ export interface IExplorerService {
|
||||
readonly roots: ExplorerItem[];
|
||||
readonly sortOrder: SortOrder;
|
||||
readonly onDidChangeRoots: Event<void>;
|
||||
readonly onDidChangeItem: Event<ExplorerItem | undefined>;
|
||||
readonly onDidChangeItem: Event<{ item?: ExplorerItem, recursive: boolean }>;
|
||||
readonly onDidChangeEditable: Event<ExplorerItem>;
|
||||
readonly onDidSelectResource: Event<{ resource?: URI, reveal?: boolean }>;
|
||||
readonly onDidCopyItems: Event<{ items: ExplorerItem[], cut: boolean, previouslyCutItems: ExplorerItem[] | undefined }>;
|
||||
@@ -231,7 +231,7 @@ export class OpenEditor implements IEditorIdentifier {
|
||||
}
|
||||
|
||||
public isUntitled(): boolean {
|
||||
return !!toResource(this.editor, { supportSideBySide: true, filter: Schemas.untitled });
|
||||
return !!toResource(this.editor, { supportSideBySide: SideBySideEditor.MASTER, filterByScheme: Schemas.untitled });
|
||||
}
|
||||
|
||||
public isDirty(): boolean {
|
||||
@@ -239,6 +239,6 @@ export class OpenEditor implements IEditorIdentifier {
|
||||
}
|
||||
|
||||
public getResource(): URI | null {
|
||||
return toResource(this.editor, { supportSideBySide: true });
|
||||
return toResource(this.editor, { supportSideBySide: SideBySideEditor.MASTER });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { LinkProviderRegistry, ILink } from 'vs/editor/common/modes';
|
||||
import { LinkProviderRegistry, ILink, ILinksList } from 'vs/editor/common/modes';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { OUTPUT_MODE_ID, LOG_MODE_ID } from 'vs/workbench/contrib/output/common/output';
|
||||
import { MonacoWebWorker, createWebWorker } from 'vs/editor/common/services/webWorker';
|
||||
@@ -42,8 +42,8 @@ export class OutputLinkProvider {
|
||||
if (folders.length > 0) {
|
||||
if (!this.linkProviderRegistration) {
|
||||
this.linkProviderRegistration = LinkProviderRegistry.register([{ language: OUTPUT_MODE_ID, scheme: '*' }, { language: LOG_MODE_ID, scheme: '*' }], {
|
||||
provideLinks: (model, token): Promise<ILink[]> => {
|
||||
return this.provideLinks(model.uri);
|
||||
provideLinks: (model): Promise<ILinksList> => {
|
||||
return this.provideLinks(model.uri).then(links => links && { links });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import { ISearchConfiguration, ISearchConfigurationProperties } from 'vs/workben
|
||||
import { SymbolKind, Location, ProviderResult } from 'vs/editor/common/modes';
|
||||
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { toResource } from 'vs/workbench/common/editor';
|
||||
import { toResource, SideBySideEditor } from 'vs/workbench/common/editor';
|
||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||
import { CancellationToken } from 'vs/base/common/cancellation';
|
||||
|
||||
@@ -85,7 +85,7 @@ export function getOutOfWorkspaceEditorResources(editorService: IEditorService,
|
||||
const resources: URI[] = [];
|
||||
|
||||
editorService.editors.forEach(editor => {
|
||||
const resource = toResource(editor, { supportSideBySide: true });
|
||||
const resource = toResource(editor, { supportSideBySide: SideBySideEditor.MASTER });
|
||||
if (resource && !contextService.isInsideWorkspace(resource)) {
|
||||
resources.push(resource);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ CommandsRegistry.registerCommand('_workbench.captureSyntaxTokens', function (acc
|
||||
|
||||
if (!resource) {
|
||||
const editorService = accessor.get(IEditorService);
|
||||
const file = editorService.activeEditor ? toResource(editorService.activeEditor, { filter: 'file' }) : null;
|
||||
const file = editorService.activeEditor ? toResource(editorService.activeEditor, { filterByScheme: 'file' }) : null;
|
||||
if (file) {
|
||||
process(file).then(result => {
|
||||
console.log(result);
|
||||
|
||||
@@ -41,9 +41,9 @@ const defaultCssRules = `
|
||||
body {
|
||||
background-color: var(--vscode-editor-background);
|
||||
color: var(--vscode-editor-foreground);
|
||||
font-family: var(--vscode-editor-font-family);
|
||||
font-weight: var(--vscode-editor-font-weight);
|
||||
font-size: var(--vscode-editor-font-size);
|
||||
font-family: var(--vscode-font-family);
|
||||
font-weight: var(--vscode-font-weight);
|
||||
font-size: var(--vscode-font-size);
|
||||
margin: 0;
|
||||
padding: 0 20px;
|
||||
}
|
||||
@@ -112,16 +112,18 @@ module.exports = function createWebviewManager(host) {
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {HTMLDocument} document
|
||||
* @param {HTMLElement} body
|
||||
* @param {HTMLDocument?} document
|
||||
* @param {HTMLElement?} body
|
||||
*/
|
||||
const applyStyles = (document, body) => {
|
||||
if (!body) {
|
||||
if (!document) {
|
||||
return;
|
||||
}
|
||||
|
||||
body.classList.remove('vscode-light', 'vscode-dark', 'vscode-high-contrast');
|
||||
body.classList.add(initData.activeTheme);
|
||||
if (body) {
|
||||
body.classList.remove('vscode-light', 'vscode-dark', 'vscode-high-contrast');
|
||||
body.classList.add(initData.activeTheme);
|
||||
}
|
||||
|
||||
if (initData.styles) {
|
||||
for (const variable of Object.keys(initData.styles)) {
|
||||
@@ -323,7 +325,16 @@ module.exports = function createWebviewManager(host) {
|
||||
|
||||
// write new content onto iframe
|
||||
newFrame.contentDocument.open('text/html', 'replace');
|
||||
|
||||
newFrame.contentWindow.addEventListener('keydown', handleInnerKeydown);
|
||||
|
||||
newFrame.contentWindow.addEventListener('DOMContentLoaded', e => {
|
||||
const contentDocument = e.target ? (/** @type {HTMLDocument} */ (e.target)) : undefined;
|
||||
if (contentDocument) {
|
||||
applyStyles(contentDocument, contentDocument.body);
|
||||
}
|
||||
});
|
||||
|
||||
newFrame.contentWindow.onbeforeunload = () => {
|
||||
if (isInDevelopmentMode) { // Allow reloads while developing a webview
|
||||
host.postMessage('do-reload');
|
||||
|
||||
@@ -22,6 +22,8 @@ import { WebviewFindWidget } from '../browser/webviewFindWidget';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
|
||||
import { WebviewContentOptions, WebviewPortMapping, WebviewOptions, Webview } from 'vs/workbench/contrib/webview/common/webview';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IEditorOptions, EDITOR_FONT_DEFAULTS } from 'vs/editor/common/config/editorOptions';
|
||||
|
||||
|
||||
interface IKeydownEvent {
|
||||
@@ -306,7 +308,6 @@ export class WebviewElement extends Disposable implements Webview {
|
||||
public get onDidFocus(): Event<void> { return this._onDidFocus.event; }
|
||||
|
||||
constructor(
|
||||
private readonly _styleElement: Element,
|
||||
private readonly _options: WebviewOptions,
|
||||
private _contentOptions: WebviewContentOptions,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@@ -314,6 +315,7 @@ export class WebviewElement extends Disposable implements Webview {
|
||||
@IEnvironmentService environmentService: IEnvironmentService,
|
||||
@IFileService fileService: IFileService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IConfigurationService private readonly _configurationService: IConfigurationService,
|
||||
) {
|
||||
super();
|
||||
this._webview = document.createElement('webview');
|
||||
@@ -540,9 +542,12 @@ export class WebviewElement extends Disposable implements Webview {
|
||||
});
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// {{SQL CARBON EDIT}} - make public
|
||||
public style(theme: ITheme): void {
|
||||
const { fontFamily, fontWeight, fontSize } = window.getComputedStyle(this._styleElement); // TODO@theme avoid styleElement
|
||||
const configuration = this._configurationService.getValue<IEditorOptions>('editor');
|
||||
const editorFontFamily = configuration.fontFamily || EDITOR_FONT_DEFAULTS.fontFamily;
|
||||
const editorFontWeight = configuration.fontWeight || EDITOR_FONT_DEFAULTS.fontWeight;
|
||||
const editorFontSize = configuration.fontSize || EDITOR_FONT_DEFAULTS.fontSize;
|
||||
|
||||
const exportedColors = colorRegistry.getColorRegistry().getColors().reduce((colors, entry) => {
|
||||
const color = theme.getColor(entry.id);
|
||||
@@ -554,9 +559,12 @@ export class WebviewElement extends Disposable implements Webview {
|
||||
|
||||
|
||||
const styles = {
|
||||
'vscode-editor-font-family': fontFamily,
|
||||
'vscode-editor-font-weight': fontWeight,
|
||||
'vscode-editor-font-size': fontSize,
|
||||
'vscode-font-family': '-apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif',
|
||||
'vscode-font-weight': 'normal',
|
||||
'vscode-font-size': '13px',
|
||||
'vscode-editor-font-family': editorFontFamily,
|
||||
'vscode-editor-font-weight': editorFontWeight,
|
||||
'vscode-editor-font-size': editorFontSize,
|
||||
...exportedColors
|
||||
};
|
||||
|
||||
|
||||
@@ -4,15 +4,13 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IWebviewService, Webview, WebviewContentOptions, WebviewOptions } from 'vs/workbench/contrib/webview/common/webview';
|
||||
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
|
||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { IWebviewService, WebviewOptions, WebviewContentOptions, Webview } from 'vs/workbench/contrib/webview/common/webview';
|
||||
|
||||
export class WebviewService implements IWebviewService {
|
||||
_serviceBrand: any;
|
||||
|
||||
constructor(
|
||||
@IWorkbenchLayoutService private readonly _layoutService: IWorkbenchLayoutService,
|
||||
@IInstantiationService private readonly _instantiationService: IInstantiationService,
|
||||
) { }
|
||||
|
||||
@@ -21,7 +19,6 @@ export class WebviewService implements IWebviewService {
|
||||
contentOptions: WebviewContentOptions
|
||||
): Webview {
|
||||
const element = this._instantiationService.createInstance(WebviewElement,
|
||||
this._layoutService.getContainer(Parts.EDITOR_PART),
|
||||
options,
|
||||
contentOptions);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user