Merge from vscode 2a36b7d0d5
(#10237)
This commit is contained in:
Родитель
d7a425239b
Коммит
cebbd04d10
|
@ -2,7 +2,24 @@
|
|||
# Flags: CaseSensitive WordMatch
|
||||
# ContextLines: 2
|
||||
|
||||
10 results - 4 files
|
||||
16 results - 5 files
|
||||
|
||||
src/vs/base/browser/dom.ts:
|
||||
81 };
|
||||
82
|
||||
83: /** @deprecated ES6 - use classList*/
|
||||
84 export const hasClass: (node: HTMLElement | SVGElement, className: string) => boolean = _classList.hasClass.bind(_classList);
|
||||
85: /** @deprecated ES6 - use classList*/
|
||||
86 export const addClass: (node: HTMLElement | SVGElement, className: string) => void = _classList.addClass.bind(_classList);
|
||||
87: /** @deprecated ES6 - use classList*/
|
||||
88 export const addClasses: (node: HTMLElement | SVGElement, ...classNames: string[]) => void = _classList.addClasses.bind(_classList);
|
||||
89: /** @deprecated ES6 - use classList*/
|
||||
90 export const removeClass: (node: HTMLElement | SVGElement, className: string) => void = _classList.removeClass.bind(_classList);
|
||||
91: /** @deprecated ES6 - use classList*/
|
||||
92 export const removeClasses: (node: HTMLElement | SVGElement, ...classNames: string[]) => void = _classList.removeClasses.bind(_classList);
|
||||
93: /** @deprecated ES6 - use classList*/
|
||||
94 export const toggleClass: (node: HTMLElement | SVGElement, className: string, shouldHaveIt?: boolean) => void = _classList.toggleClass.bind(_classList);
|
||||
95
|
||||
|
||||
src/vs/base/common/arrays.ts:
|
||||
401
|
||||
|
|
|
@ -80,11 +80,17 @@ const _classList: IDomClassList = new class implements IDomClassList {
|
|||
}
|
||||
};
|
||||
|
||||
/** @deprecated ES6 - use classList*/
|
||||
export const hasClass: (node: HTMLElement | SVGElement, className: string) => boolean = _classList.hasClass.bind(_classList);
|
||||
/** @deprecated ES6 - use classList*/
|
||||
export const addClass: (node: HTMLElement | SVGElement, className: string) => void = _classList.addClass.bind(_classList);
|
||||
/** @deprecated ES6 - use classList*/
|
||||
export const addClasses: (node: HTMLElement | SVGElement, ...classNames: string[]) => void = _classList.addClasses.bind(_classList);
|
||||
/** @deprecated ES6 - use classList*/
|
||||
export const removeClass: (node: HTMLElement | SVGElement, className: string) => void = _classList.removeClass.bind(_classList);
|
||||
/** @deprecated ES6 - use classList*/
|
||||
export const removeClasses: (node: HTMLElement | SVGElement, ...classNames: string[]) => void = _classList.removeClasses.bind(_classList);
|
||||
/** @deprecated ES6 - use classList*/
|
||||
export const toggleClass: (node: HTMLElement | SVGElement, className: string, shouldHaveIt?: boolean) => void = _classList.toggleClass.bind(_classList);
|
||||
|
||||
class DomListener implements IDisposable {
|
||||
|
|
|
@ -178,17 +178,7 @@ export class BaseActionViewItem extends Disposable implements IActionViewItem {
|
|||
onClick(event: DOM.EventLike): void {
|
||||
DOM.EventHelper.stop(event, true);
|
||||
|
||||
let context: any;
|
||||
if (types.isUndefinedOrNull(this._context)) {
|
||||
context = event;
|
||||
} else {
|
||||
context = this._context;
|
||||
|
||||
if (types.isObject(context)) {
|
||||
context.event = event;
|
||||
}
|
||||
}
|
||||
|
||||
const context = types.isUndefinedOrNull(this._context) ? undefined : this._context;
|
||||
this.actionRunner.run(this._action, context);
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
|
||||
.linux .monaco-pane-view .pane > .pane-header .action-item .monaco-select-box,
|
||||
.windows .monaco-pane-view .pane > .pane-header .action-item .monaco-select-box {
|
||||
padding: 0px 23px 2px 8px;
|
||||
padding: 0px 23px 0px 8px;
|
||||
}
|
||||
|
||||
/* Bold font style does not go well with CJK fonts */
|
||||
|
|
|
@ -148,6 +148,8 @@ class DisposedModelInfo {
|
|||
|
||||
export class ModelServiceImpl extends Disposable implements IModelService {
|
||||
|
||||
public static MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK = 20 * 1024 * 1024;
|
||||
|
||||
public _serviceBrand: undefined;
|
||||
|
||||
private readonly _onModelAdded: Emitter<ITextModel> = this._register(new Emitter<ITextModel>());
|
||||
|
@ -263,12 +265,12 @@ export class ModelServiceImpl extends Disposable implements IModelService {
|
|||
return platform.OS === platform.OperatingSystem.Linux || platform.OS === platform.OperatingSystem.Macintosh ? '\n' : '\r\n';
|
||||
}
|
||||
|
||||
private _getMaxMemoryForClosedFilesUndoStack(): number {
|
||||
const result = this._configurationService.getValue<number>('files.maxMemoryForClosedFilesUndoStackMB');
|
||||
if (typeof result === 'number') {
|
||||
return result * 1024 * 1024;
|
||||
private _shouldRestoreUndoStack(): boolean {
|
||||
const result = this._configurationService.getValue<boolean>('files.restoreUndoStack');
|
||||
if (typeof result === 'boolean') {
|
||||
return result;
|
||||
}
|
||||
return 20 * 1024 * 1024;
|
||||
return true;
|
||||
}
|
||||
|
||||
public getCreationOptions(language: string, resource: URI | undefined, isForSimpleWidget: boolean): ITextModelCreationOptions {
|
||||
|
@ -504,7 +506,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
|
|||
const model = modelData.model;
|
||||
let maintainUndoRedoStack = false;
|
||||
let heapSize = 0;
|
||||
if (resource.scheme === Schemas.file || resource.scheme === Schemas.vscodeRemote || resource.scheme === Schemas.userData) {
|
||||
if (this._shouldRestoreUndoStack() && (resource.scheme === Schemas.file || resource.scheme === Schemas.vscodeRemote || resource.scheme === Schemas.userData)) {
|
||||
const elements = this._undoRedoService.getElements(resource);
|
||||
if ((elements.past.length > 0 || elements.future.length > 0) && isEditStackPastFutureElements(elements)) {
|
||||
maintainUndoRedoStack = true;
|
||||
|
@ -516,8 +518,6 @@ export class ModelServiceImpl extends Disposable implements IModelService {
|
|||
heapSize += element.heapSize(resource);
|
||||
element.setModel(resource); // remove reference from text buffer instance
|
||||
}
|
||||
} else {
|
||||
maintainUndoRedoStack = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ export class ModelServiceImpl extends Disposable implements IModelService {
|
|||
return;
|
||||
}
|
||||
|
||||
const maxMemory = this._getMaxMemoryForClosedFilesUndoStack();
|
||||
const maxMemory = ModelServiceImpl.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;
|
||||
if (heapSize > maxMemory) {
|
||||
// the undo stack for this file would never fit in the configured memory, so don't bother with it.
|
||||
this._undoRedoService.removeElements(resource);
|
||||
|
|
|
@ -46,7 +46,7 @@ export class AuthenticationTokenService extends Disposable implements IAuthentic
|
|||
}
|
||||
|
||||
async setToken(token: IUserDataSyncAuthToken | undefined): Promise<void> {
|
||||
if (token && this._token ? token.token !== this._token.token && token.authenticationProviderId !== this._token.authenticationProviderId : token !== this._token) {
|
||||
if (token && this._token ? token.token !== this._token.token || token.authenticationProviderId !== this._token.authenticationProviderId : token !== this._token) {
|
||||
this._token = token;
|
||||
this._onDidChangeToken.fire(token);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { $ } from 'vs/base/browser/dom';
|
||||
|
||||
export class BrowserClipboardService implements IClipboardService {
|
||||
|
||||
|
@ -14,39 +15,57 @@ export class BrowserClipboardService implements IClipboardService {
|
|||
|
||||
async writeText(text: string, type?: string): Promise<void> {
|
||||
if (type) {
|
||||
return; // TODO@sbatten
|
||||
return; // TODO@sbatten support for writing a specific type into clipboard is unsupported
|
||||
}
|
||||
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||
return navigator.clipboard.writeText(text);
|
||||
} else {
|
||||
const activeElement = <HTMLElement>document.activeElement;
|
||||
const newTextarea = document.createElement('textarea');
|
||||
newTextarea.className = 'clipboard-copy';
|
||||
newTextarea.style.visibility = 'false';
|
||||
newTextarea.style.height = '1px';
|
||||
newTextarea.style.width = '1px';
|
||||
newTextarea.setAttribute('aria-hidden', 'true');
|
||||
newTextarea.style.position = 'absolute';
|
||||
newTextarea.style.top = '-1000';
|
||||
newTextarea.style.left = '-1000';
|
||||
document.body.appendChild(newTextarea);
|
||||
newTextarea.value = text;
|
||||
newTextarea.focus();
|
||||
newTextarea.select();
|
||||
document.execCommand('copy');
|
||||
activeElement.focus();
|
||||
document.body.removeChild(newTextarea);
|
||||
// Guard access to navigator.clipboard with try/catch
|
||||
// as we have seen DOMExceptions in certain browsers
|
||||
// due to security policies.
|
||||
try {
|
||||
return await navigator.clipboard.writeText(text);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
// Fallback to textarea and execCommand solution
|
||||
|
||||
const activeElement = document.activeElement;
|
||||
|
||||
const textArea: HTMLTextAreaElement = document.body.appendChild($('textarea', { 'aria-hidden': true }));
|
||||
textArea.style.height = '1px';
|
||||
textArea.style.width = '1px';
|
||||
textArea.style.position = 'absolute';
|
||||
|
||||
textArea.value = text;
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
|
||||
document.execCommand('copy');
|
||||
|
||||
if (activeElement instanceof HTMLElement) {
|
||||
activeElement.focus();
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
async readText(type?: string): Promise<string> {
|
||||
if (type) {
|
||||
return ''; // TODO@sbatten
|
||||
return ''; // TODO@sbatten support for reading a specific type from clipboard is unsupported
|
||||
}
|
||||
|
||||
return navigator.clipboard.readText();
|
||||
// Guard access to navigator.clipboard with try/catch
|
||||
// as we have seen DOMExceptions in certain browsers
|
||||
// due to security policies.
|
||||
try {
|
||||
return await navigator.clipboard.readText();
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
readTextSync(): string | undefined {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { getErrorMessage, isPromiseCanceledError, canceled } from 'vs/base/common/errors';
|
||||
import { StatisticType, IGalleryExtension, IExtensionGalleryService, IGalleryExtensionAsset, IQueryOptions, SortBy, SortOrder, IExtensionIdentifier, IReportedExtension, InstallOperation, ITranslation, IGalleryExtensionVersion, IGalleryExtensionAssets, isIExtensionIdentifier } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { StatisticType, IGalleryExtension, IExtensionGalleryService, IGalleryExtensionAsset, IQueryOptions, SortBy, SortOrder, IExtensionIdentifier, IReportedExtension, InstallOperation, ITranslation, IGalleryExtensionVersion, IGalleryExtensionAssets, isIExtensionIdentifier, DefaultIconPath } from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { getGalleryExtensionId, getGalleryExtensionTelemetryData, adoptToGalleryExtensionId } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
import { assign, getOrDefault } from 'vs/base/common/objects';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
|
@ -252,7 +252,7 @@ function getIconAsset(version: IRawGalleryExtensionVersion): IGalleryExtensionAs
|
|||
if (asset) {
|
||||
return asset;
|
||||
}
|
||||
const uri = require.toUrl('./media/defaultIcon.png');
|
||||
const uri = DefaultIconPath;
|
||||
return { uri, fallbackUri: uri };
|
||||
}
|
||||
|
||||
|
|
|
@ -247,7 +247,7 @@ export interface IExtensionTipsService {
|
|||
}
|
||||
|
||||
|
||||
|
||||
export const DefaultIconPath = require.toUrl('./media/defaultIcon.png');
|
||||
export const ExtensionsLabel = localize('extensions', "Extensions");
|
||||
export const ExtensionsChannelId = 'extensions';
|
||||
export const PreferencesLabel = localize('preferences', "Preferences");
|
|
@ -141,6 +141,9 @@ export interface IPathData {
|
|||
// file exists, if false it does not. with
|
||||
// undefined the state is unknown.
|
||||
exists?: boolean;
|
||||
|
||||
// Specifies if the file should be only be opened if it exists
|
||||
openOnlyIfExists?: boolean;
|
||||
}
|
||||
|
||||
export interface IOpenFileRequest {
|
||||
|
|
|
@ -17,6 +17,7 @@ import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
|||
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
|
||||
import { IRemoteAgentService } from 'vs/workbench/services/remote/common/remoteAgentService';
|
||||
|
||||
interface AllowedExtension {
|
||||
id: string;
|
||||
|
@ -25,6 +26,8 @@ interface AllowedExtension {
|
|||
|
||||
const accountUsages = new Map<string, { [accountName: string]: string[] }>();
|
||||
|
||||
const VSO_ALLOWED_EXTENSIONS = ['github.vscode-pull-request-github', 'github.vscode-pull-request-github-insiders', 'vscode.git'];
|
||||
|
||||
function addAccountUsage(providerId: string, accountName: string, extensionOrFeatureName: string) {
|
||||
const providerAccountUsage = accountUsages.get(providerId);
|
||||
if (!providerAccountUsage) {
|
||||
|
@ -290,7 +293,8 @@ export class MainThreadAuthentication extends Disposable implements MainThreadAu
|
|||
@IDialogService private readonly dialogService: IDialogService,
|
||||
@IStorageService private readonly storageService: IStorageService,
|
||||
@INotificationService private readonly notificationService: INotificationService,
|
||||
@IStorageKeysSyncRegistryService private readonly storageKeysSyncRegistryService: IStorageKeysSyncRegistryService
|
||||
@IStorageKeysSyncRegistryService private readonly storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
|
||||
@IRemoteAgentService private readonly remoteAgentService: IRemoteAgentService
|
||||
) {
|
||||
super();
|
||||
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostAuthentication);
|
||||
|
@ -319,6 +323,11 @@ export class MainThreadAuthentication extends Disposable implements MainThreadAu
|
|||
return true;
|
||||
}
|
||||
|
||||
const remoteConnection = this.remoteAgentService.getConnection();
|
||||
if (remoteConnection && remoteConnection.remoteAuthority === 'vsonline' && VSO_ALLOWED_EXTENSIONS.includes(extensionId)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const { choice } = await this.dialogService.show(
|
||||
Severity.Info,
|
||||
nls.localize('confirmAuthenticationAccess', "The extension '{0}' wants to access the {1} account '{2}'.", extensionName, providerName, accountName),
|
||||
|
|
|
@ -124,7 +124,8 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape {
|
|||
selection: options.selection,
|
||||
// preserve pre 1.38 behaviour to not make group active when preserveFocus: true
|
||||
// but make sure to restore the editor to fix https://github.com/microsoft/vscode/issues/79633
|
||||
activation: options.preserveFocus ? EditorActivation.RESTORE : undefined
|
||||
activation: options.preserveFocus ? EditorActivation.RESTORE : undefined,
|
||||
ignoreOverrides: true
|
||||
};
|
||||
|
||||
const input: IResourceEditorInput = {
|
||||
|
|
|
@ -610,7 +610,7 @@ namespace HotExitState {
|
|||
|
||||
class MainThreadCustomEditorModel extends Disposable implements ICustomEditorModel, IWorkingCopy {
|
||||
|
||||
private readonly _fromBackup: boolean = false;
|
||||
private _fromBackup: boolean = false;
|
||||
private _hotExitState: HotExitState.State = HotExitState.Allowed;
|
||||
private _backupId: string | undefined;
|
||||
|
||||
|
@ -808,13 +808,14 @@ class MainThreadCustomEditorModel extends Disposable implements ICustomEditorMod
|
|||
return;
|
||||
}
|
||||
|
||||
if (this._currentEditIndex === this._savePoint && !this._isDirtyFromContentChange) {
|
||||
if (this._currentEditIndex === this._savePoint && !this._isDirtyFromContentChange && !this._fromBackup) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._proxy.$revert(this._editorResource, this.viewType, CancellationToken.None);
|
||||
this.change(() => {
|
||||
this._isDirtyFromContentChange = false;
|
||||
this._fromBackup = false;
|
||||
this._currentEditIndex = this._savePoint;
|
||||
this.spliceEdits();
|
||||
});
|
||||
|
@ -837,6 +838,7 @@ class MainThreadCustomEditorModel extends Disposable implements ICustomEditorMod
|
|||
this.change(() => {
|
||||
this._isDirtyFromContentChange = false;
|
||||
this._savePoint = this._currentEditIndex;
|
||||
this._fromBackup = false;
|
||||
});
|
||||
|
||||
try {
|
||||
|
|
|
@ -198,8 +198,10 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
|
|||
);
|
||||
|
||||
// Apply extension environment variable collections to the environment
|
||||
const mergedCollection = new MergedEnvironmentVariableCollection(this._environmentVariableCollections);
|
||||
mergedCollection.applyToProcessEnvironment(env);
|
||||
if (!shellLaunchConfig.strictEnv) {
|
||||
const mergedCollection = new MergedEnvironmentVariableCollection(this._environmentVariableCollections);
|
||||
mergedCollection.applyToProcessEnvironment(env);
|
||||
}
|
||||
|
||||
this._proxy.$sendResolvedLaunchConfig(id, shellLaunchConfig);
|
||||
// Fork the process and listen for messages
|
||||
|
|
|
@ -576,6 +576,15 @@ export class CompositeDragAndDropObserver extends Disposable {
|
|||
private constructor() {
|
||||
super();
|
||||
this.transferData = LocalSelectionTransfer.getInstance<DraggedCompositeIdentifier | DraggedViewIdentifier>();
|
||||
|
||||
this._register(this._onDragEnd.event(e => {
|
||||
const id = e.dragAndDropData.getData().id;
|
||||
const type = e.dragAndDropData.getData().type;
|
||||
const data = this.readDragData(type);
|
||||
if (data && data.getData().id === id) {
|
||||
this.transferData.clearData(type === 'view' ? DraggedViewIdentifier.prototype : DraggedCompositeIdentifier.prototype);
|
||||
}
|
||||
}));
|
||||
}
|
||||
private readDragData(type: ViewType): CompositeDragAndDropData | undefined {
|
||||
if (this.transferData.hasData(type === 'view' ? DraggedViewIdentifier.prototype : DraggedCompositeIdentifier.prototype)) {
|
||||
|
@ -658,12 +667,8 @@ export class CompositeDragAndDropObserver extends Disposable {
|
|||
}));
|
||||
disposableStore.add(new DragAndDropObserver(element, {
|
||||
onDragEnd: e => {
|
||||
const { id, type } = draggedItemProvider();
|
||||
|
||||
const { type } = draggedItemProvider();
|
||||
const data = this.readDragData(type);
|
||||
if (data && data.getData().id === id) {
|
||||
this.transferData.clearData(type === 'view' ? DraggedViewIdentifier.prototype : DraggedCompositeIdentifier.prototype);
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
return;
|
||||
|
|
|
@ -44,7 +44,7 @@ import { LineNumbersType } from 'vs/editor/common/config/editorOptions';
|
|||
import { ActivitybarPart } from 'vs/workbench/browser/parts/activitybar/activitybarPart';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
enum Settings {
|
||||
export enum Settings {
|
||||
ACTIVITYBAR_VISIBLE = 'workbench.activityBar.visible',
|
||||
STATUSBAR_VISIBLE = 'workbench.statusBar.visible',
|
||||
|
||||
|
@ -52,6 +52,7 @@ enum Settings {
|
|||
PANEL_POSITION = 'workbench.panel.defaultLocation',
|
||||
|
||||
ZEN_MODE_RESTORE = 'zenMode.restore',
|
||||
WORKSPACE_FIRST_OPEN = 'workbench.workspaceFirstOpen'
|
||||
}
|
||||
|
||||
enum Storage {
|
||||
|
@ -547,7 +548,12 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
|||
|
||||
private applyDefaultLayout(environmentService: IWorkbenchEnvironmentService, storageService: IStorageService) {
|
||||
const defaultLayout = environmentService.options?.defaultLayout;
|
||||
if (!defaultLayout || !defaultLayout.firstRun) {
|
||||
if (!defaultLayout) {
|
||||
return;
|
||||
}
|
||||
|
||||
const firstOpen = storageService.getBoolean(Settings.WORKSPACE_FIRST_OPEN, StorageScope.WORKSPACE);
|
||||
if (!firstOpen) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -752,14 +758,25 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
|||
return [];
|
||||
}
|
||||
|
||||
private _openedDefaultEditors: boolean = false;
|
||||
get openedDefaultEditors() {
|
||||
return this._openedDefaultEditors;
|
||||
}
|
||||
|
||||
private getInitialFilesToOpen(): { filesToOpenOrCreate?: IPath[], filesToDiff?: IPath[] } | undefined {
|
||||
const defaultLayout = this.environmentService.options?.defaultLayout;
|
||||
if (defaultLayout?.firstRun && defaultLayout?.editors?.length) {
|
||||
//
|
||||
if (defaultLayout?.editors?.length && this.storageService.getBoolean(Settings.WORKSPACE_FIRST_OPEN, StorageScope.WORKSPACE)) {
|
||||
this._openedDefaultEditors = true;
|
||||
|
||||
return {
|
||||
filesToOpenOrCreate: defaultLayout.editors
|
||||
.sort((a, b) => (a.active ? -1 : 1) - (b.active ? -1 : 1))
|
||||
.map(f => ({ fileUri: URI.file(f.path).with({ scheme: f.scheme }), inactive: !f.active }))
|
||||
.map<IPath>(f => {
|
||||
// Support the old path+scheme api until embedders can migrate
|
||||
if ('path' in f && 'scheme' in f) {
|
||||
return { fileUri: URI.file((f as any).path).with({ scheme: (f as any).scheme }) };
|
||||
}
|
||||
return { fileUri: URI.revive(f.uri), openOnlyIfExists: f.openOnlyIfExists };
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
|
|
До Ширина: | Высота: | Размер: 4.1 KiB После Ширина: | Высота: | Размер: 4.1 KiB |
|
@ -22,7 +22,7 @@ import { ActivityAction, ActivityActionViewItem, ICompositeBar, ICompositeBarCol
|
|||
import { ViewletDescriptor } from 'vs/workbench/browser/viewlet';
|
||||
import { Extensions as ActionExtensions, IWorkbenchActionRegistry } from 'vs/workbench/common/actions';
|
||||
import { IActivity } from 'vs/workbench/common/activity';
|
||||
import { ACTIVITY_BAR_FOREGROUND, ACTIVITY_BAR_ACTIVE_BORDER, ACTIVITY_BAR_ACTIVE_FOCUS_BORDER, ACTIVITY_BAR_ACTIVE_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { ACTIVITY_BAR_FOREGROUND, ACTIVITY_BAR_ACTIVE_BORDER, ACTIVITY_BAR_ACTIVE_FOCUS_BORDER, ACTIVITY_BAR_ACTIVE_BACKGROUND, ACTIVITY_BAR_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { IActivityBarService } from 'vs/workbench/services/activityBar/browser/activityBarService';
|
||||
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet';
|
||||
|
@ -362,35 +362,43 @@ export class HomeAction extends Action {
|
|||
}
|
||||
|
||||
registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) => {
|
||||
const activityBarBackgroundColor = theme.getColor(ACTIVITY_BAR_BACKGROUND);
|
||||
if (activityBarBackgroundColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .activitybar > .content > .home-bar > .home-bar-icon-badge {
|
||||
background-color: ${activityBarBackgroundColor};
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const activeForegroundColor = theme.getColor(ACTIVITY_BAR_FOREGROUND);
|
||||
if (activeForegroundColor) {
|
||||
const activityBarForegroundColor = theme.getColor(ACTIVITY_BAR_FOREGROUND);
|
||||
if (activityBarForegroundColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active .action-label:not(.codicon),
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .action-label:not(.codicon),
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover .action-label:not(.codicon) {
|
||||
background-color: ${activeForegroundColor} !important;
|
||||
background-color: ${activityBarForegroundColor} !important;
|
||||
}
|
||||
.monaco-workbench .activitybar > .content .home-bar > .monaco-action-bar .action-item .action-label.codicon,
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active .action-label.codicon,
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .action-label.codicon,
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover .action-label.codicon {
|
||||
color: ${activeForegroundColor} !important;
|
||||
color: ${activityBarForegroundColor} !important;
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const activeBorderColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BORDER);
|
||||
if (activeBorderColor) {
|
||||
const activityBarActiveBorderColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BORDER);
|
||||
if (activityBarActiveBorderColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator:before {
|
||||
border-left-color: ${activeBorderColor};
|
||||
border-left-color: ${activityBarActiveBorderColor};
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const activeFocusBorderColor = theme.getColor(ACTIVITY_BAR_ACTIVE_FOCUS_BORDER);
|
||||
if (activeFocusBorderColor) {
|
||||
const activityBarActiveFocusBorderColor = theme.getColor(ACTIVITY_BAR_ACTIVE_FOCUS_BORDER);
|
||||
if (activityBarActiveFocusBorderColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus::before {
|
||||
visibility: hidden;
|
||||
|
@ -398,17 +406,17 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) =
|
|||
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked:focus .active-item-indicator:before {
|
||||
visibility: visible;
|
||||
border-left-color: ${activeFocusBorderColor};
|
||||
border-left-color: ${activityBarActiveFocusBorderColor};
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
||||
const activeBackgroundColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BACKGROUND);
|
||||
if (activeBackgroundColor) {
|
||||
const activityBarActiveBackgroundColor = theme.getColor(ACTIVITY_BAR_ACTIVE_BACKGROUND);
|
||||
if (activityBarActiveBackgroundColor) {
|
||||
collector.addRule(`
|
||||
.monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator {
|
||||
z-index: 0;
|
||||
background-color: ${activeBackgroundColor};
|
||||
background-color: ${activityBarActiveBackgroundColor};
|
||||
}
|
||||
`);
|
||||
}
|
||||
|
|
|
@ -366,6 +366,10 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
|||
animated: false
|
||||
}));
|
||||
|
||||
const homeBarIconBadge = document.createElement('div');
|
||||
addClass(homeBarIconBadge, 'home-bar-icon-badge');
|
||||
this.homeBarContainer.appendChild(homeBarIconBadge);
|
||||
|
||||
this.homeBar.push(this._register(this.instantiationService.createInstance(HomeAction, command, title, icon)), { icon: true, label: false });
|
||||
|
||||
const content = assertIsDefined(this.content);
|
||||
|
@ -424,7 +428,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
|||
this.globalActivityAction = new ActivityAction({
|
||||
id: 'workbench.actions.manage',
|
||||
name: nls.localize('manage', "Manage"),
|
||||
cssClass: Codicon.gear.classNames
|
||||
cssClass: Codicon.settingsGear.classNames
|
||||
});
|
||||
|
||||
if (getUserDataSyncStore(this.productService, this.configurationService)) {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
/** Home Bar */
|
||||
|
||||
.monaco-workbench .activitybar > .content > .home-bar {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
display: flex;
|
||||
|
@ -34,6 +35,22 @@
|
|||
order: -1;
|
||||
}
|
||||
|
||||
.monaco-workbench .activitybar > .content > .home-bar > .home-bar-icon-badge {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 9px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
z-index: 1; /* on top of home indicator */
|
||||
background-image: url('../../../media/code-icon.svg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: 14px;
|
||||
pointer-events: none;
|
||||
border-top: 2px solid transparent;
|
||||
border-left: 2px solid transparent;
|
||||
}
|
||||
|
||||
/** Viewlet Switcher */
|
||||
|
||||
.monaco-workbench .activitybar > .content .monaco-action-bar {
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
height: 100%;
|
||||
position: relative;
|
||||
z-index: 3000;
|
||||
background-image: url('code-icon.svg');
|
||||
background-image: url('../../../media/code-icon.svg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
background-size: 16px;
|
||||
|
|
|
@ -38,7 +38,7 @@ import { FileUserDataProvider } from 'vs/workbench/services/userData/common/file
|
|||
import { BACKUPS } from 'vs/platform/environment/common/environment';
|
||||
import { joinPath } from 'vs/base/common/resources';
|
||||
import { BrowserStorageService } from 'vs/platform/storage/browser/storageService';
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { getThemeTypeSelector, DARK, HIGH_CONTRAST, LIGHT } from 'vs/platform/theme/common/themeService';
|
||||
import { registerWindowDriver } from 'vs/platform/driver/browser/driver';
|
||||
import { BufferLogService } from 'vs/platform/log/common/bufferLog';
|
||||
|
@ -52,6 +52,7 @@ import { coalesce } from 'vs/base/common/arrays';
|
|||
import { InMemoryFileSystemProvider } from 'vs/platform/files/common/inMemoryFilesystemProvider';
|
||||
import { WebResourceIdentityService, IResourceIdentityService } from 'vs/platform/resource/common/resourceIdentityService';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { Settings } from 'vs/workbench/browser/layout';
|
||||
|
||||
class BrowserMain extends Disposable {
|
||||
|
||||
|
@ -65,12 +66,12 @@ class BrowserMain extends Disposable {
|
|||
async open(): Promise<IWorkbench> {
|
||||
const services = await this.initServices();
|
||||
|
||||
// const defaultLayout = this.configuration?.defaultLayout;
|
||||
// if (defaultLayout) {
|
||||
// defaultLayout.firstRun = services.storageService.get(firstSessionDateStorageKey, StorageScope.GLOBAL) === undefined;
|
||||
// }
|
||||
const firstOpen = services.storageService.getBoolean(Settings.WORKSPACE_FIRST_OPEN, StorageScope.WORKSPACE);
|
||||
if (firstOpen === undefined || firstOpen) {
|
||||
services.storageService.store(Settings.WORKSPACE_FIRST_OPEN, !(firstOpen ?? false), StorageScope.WORKSPACE);
|
||||
}
|
||||
|
||||
await domContentLoaded();
|
||||
{ await domContentLoaded(); }
|
||||
mark('willStartWorkbench');
|
||||
|
||||
// Base Theme
|
||||
|
|
|
@ -103,7 +103,7 @@ import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuratio
|
|||
},
|
||||
'workbench.editor.showIcons': {
|
||||
'type': 'boolean',
|
||||
'description': nls.localize('showIcons', "Controls whether opened editors should show with an icon or not. This requires an file icon theme to be enabled as well."),
|
||||
'description': nls.localize('showIcons', "Controls whether opened editors should show with an icon or not. This requires a file icon theme to be enabled as well."),
|
||||
'default': true
|
||||
},
|
||||
'workbench.editor.enablePreview': {
|
||||
|
|
|
@ -1481,6 +1481,9 @@ export async function pathsToEditors(paths: IPathData[] | undefined, fileService
|
|||
}
|
||||
|
||||
const exists = (typeof path.exists === 'boolean') ? path.exists : await fileService.exists(resource);
|
||||
if (!exists && path.openOnlyIfExists) {
|
||||
return undefined; // {{SQL CARBON EDIT}} @anthonydresser revert after strictnullchecks
|
||||
}
|
||||
|
||||
const options: ITextEditorOptions = (exists && typeof path.lineNumber === 'number') ? {
|
||||
selection: {
|
||||
|
|
|
@ -91,7 +91,7 @@ export class NativeBackupTracker extends BackupTracker implements IWorkbenchCont
|
|||
|
||||
// we ran a backup but received an error that we show to the user
|
||||
if (backupError) {
|
||||
this.showErrorDialog(localize('backupTrackerBackupFailed', "One or many editors that are dirty could not be saved to the backup location."), backupError);
|
||||
this.showErrorDialog(localize('backupTrackerBackupFailed', "One or more dirty editors could not be saved to the back up location."), backupError);
|
||||
|
||||
return true; // veto (the backup failed)
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ export class NativeBackupTracker extends BackupTracker implements IWorkbenchCont
|
|||
try {
|
||||
return await this.confirmBeforeShutdown(workingCopies.filter(workingCopy => backups.indexOf(workingCopy) === -1));
|
||||
} catch (error) {
|
||||
this.showErrorDialog(localize('backupTrackerConfirmFailed', "One or many editors that are dirty could not be saved or reverted."), error);
|
||||
this.showErrorDialog(localize('backupTrackerConfirmFailed', "One or more dirty editors could not be saved or reverted."), error);
|
||||
|
||||
return true; // veto (save or revert failed)
|
||||
}
|
||||
|
|
|
@ -119,6 +119,10 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput {
|
|||
}
|
||||
|
||||
public isSaving(): boolean {
|
||||
if (this.isUntitled()) {
|
||||
return false; // untitled is never saving automatically
|
||||
}
|
||||
|
||||
if (!this.isDirty()) {
|
||||
return false; // the editor needs to be dirty for being saved
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
|||
// {{SQL CARBON EDIT}}
|
||||
import {
|
||||
IExtensionManagementService, IExtensionGalleryService, ILocalExtension, IGalleryExtension, IQueryOptions,
|
||||
InstallExtensionEvent, DidInstallExtensionEvent, DidUninstallExtensionEvent, IExtensionIdentifier, InstallOperation
|
||||
InstallExtensionEvent, DidInstallExtensionEvent, DidUninstallExtensionEvent, IExtensionIdentifier, InstallOperation, DefaultIconPath
|
||||
} from 'vs/platform/extensionManagement/common/extensionManagement';
|
||||
import { IWorkbenchExtensionEnablementService, EnablementState, IExtensionManagementServerService, IExtensionManagementServer } from 'vs/workbench/services/extensionManagement/common/extensionManagement';
|
||||
import { getGalleryExtensionTelemetryData, getLocalExtensionTelemetryData, areSameExtensions, getMaliciousExtensionsSet, groupByExtension, ExtensionIdentifierWithVersion } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
|
||||
|
@ -172,7 +172,7 @@ class Extension implements IExtension {
|
|||
}
|
||||
}
|
||||
}
|
||||
return require.toUrl('./media/defaultIcon.png');
|
||||
return DefaultIconPath;
|
||||
}
|
||||
|
||||
get repository(): string | undefined {
|
||||
|
|
|
@ -205,7 +205,7 @@ configurationRegistry.registerConfiguration({
|
|||
'properties': {
|
||||
[FILES_EXCLUDE_CONFIG]: {
|
||||
'type': 'object',
|
||||
'markdownDescription': nls.localize('exclude', "Configure glob patterns for excluding files and folders. For example, the files explorer decides which files and folders to show or hide based on this setting. Refer to the `#search.exclude#` setting to define search specific excludes. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)."),
|
||||
'markdownDescription': nls.localize('exclude', "Configure glob patterns for excluding files and folders. For example, the file Explorer decides which files and folders to show or hide based on this setting. Refer to the `#search.exclude#` setting to define search specific excludes. Read more about glob patterns [here](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options)."),
|
||||
'default': { '**/.git': true, '**/.svn': true, '**/.hg': true, '**/CVS': true, '**/.DS_Store': true },
|
||||
'scope': ConfigurationScope.RESOURCE,
|
||||
'additionalProperties': {
|
||||
|
@ -321,10 +321,10 @@ configurationRegistry.registerConfiguration({
|
|||
'markdownDescription': nls.localize('maxMemoryForLargeFilesMB', "Controls the memory available to Azure Data Studio after restart when trying to open large files. Same effect as specifying `--max-memory=NEWSIZE` on the command line."), // {{SQL CARBON EDIT}} Change product name to ADS
|
||||
included: platform.isNative
|
||||
},
|
||||
'files.maxMemoryForClosedFilesUndoStackMB': {
|
||||
'type': 'number',
|
||||
'default': 20,
|
||||
'markdownDescription': nls.localize('maxMemoryForClosedFilesUndoStackMB', "Controls the maximum ammount of memory the undo stack should hold for files that have been closed.")
|
||||
'files.restoreUndoStack': {
|
||||
'type': 'boolean',
|
||||
'description': nls.localize('files.restoreUndoStack', "Restore the undo stack when a file is reopened."),
|
||||
'default': true
|
||||
},
|
||||
'files.saveConflictResolution': {
|
||||
'type': 'string',
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
overflow: visible !important;
|
||||
} */
|
||||
|
||||
.monaco-workbench .part.editor > .content .notebook-editor .cell-list-container .monaco-editor-hover {
|
||||
.monaco-workbench .part.editor > .content .notebook-editor .cell-list-container .overflowingContentWidgets > div {
|
||||
z-index: 600 !important; /* @rebornix: larger than the editor title bar */
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,15 @@ export class NotebookEditorInput extends EditorInput {
|
|||
return this.textModel?.isDirty() || false;
|
||||
}
|
||||
|
||||
isReadonly() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public isSaving(): boolean {
|
||||
if (this.isUntitled()) {
|
||||
return false; // untitled is never saving automatically
|
||||
}
|
||||
|
||||
if (!this.isDirty()) {
|
||||
return false; // the editor needs to be dirty for being saved
|
||||
}
|
||||
|
@ -210,7 +218,7 @@ export class NotebookEditorInput extends EditorInput {
|
|||
}
|
||||
|
||||
async backup(): Promise<IWorkingCopyBackup> {
|
||||
return {};
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
matches(otherInput: unknown): boolean {
|
||||
|
|
|
@ -233,7 +233,7 @@ abstract class AbstractCellRenderer {
|
|||
addMarkdownCell.tabIndex = 0;
|
||||
const insertMarkdownBelow = this.instantiationService.createInstance(InsertMarkdownCellAction);
|
||||
disposables.add(DOM.addDisposableListener(addMarkdownCell, DOM.EventType.CLICK, e => {
|
||||
this.actionRunner.run(insertMarkdownBelow, context);
|
||||
this.actionRunner.run(insertMarkdownBelow, toolbarContext);
|
||||
e.stopPropagation();
|
||||
}));
|
||||
|
||||
|
@ -242,7 +242,7 @@ abstract class AbstractCellRenderer {
|
|||
if ((event.equals(KeyCode.Enter) || event.equals(KeyCode.Space))) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.actionRunner.run(insertMarkdownBelow, context);
|
||||
this.actionRunner.run(insertMarkdownBelow, toolbarContext);
|
||||
}
|
||||
})));
|
||||
|
||||
|
|
|
@ -40,7 +40,10 @@ export class CodeCell extends Disposable {
|
|||
const width = this.viewCell.layoutInfo.editorWidth;
|
||||
const lineNum = this.viewCell.lineCount;
|
||||
const lineHeight = this.viewCell.layoutInfo.fontInfo?.lineHeight || 17;
|
||||
const totalHeight = lineNum * lineHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING;
|
||||
const totalHeight = this.viewCell.layoutInfo.editorHeight === 0
|
||||
? lineNum * lineHeight + EDITOR_TOP_PADDING + EDITOR_BOTTOM_PADDING
|
||||
: this.viewCell.layoutInfo.editorHeight;
|
||||
|
||||
this.layoutEditor(
|
||||
{
|
||||
width: width,
|
||||
|
|
|
@ -173,8 +173,7 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod
|
|||
|
||||
save() {
|
||||
if (this._textModel && !this._textModel.isDisposed() && this.editState === CellEditState.Editing) {
|
||||
let cnt = this._textModel.getLineCount();
|
||||
this.model.source = this._textModel.getLinesContent().map((str, index) => str + (index !== cnt - 1 ? '\n' : ''));
|
||||
this.model.source = this._textModel.getLinesContent();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -185,6 +184,7 @@ export class CodeCellViewModel extends BaseCellViewModel implements ICellViewMod
|
|||
this._buffer = this._textModel.getTextBuffer();
|
||||
this._register(ref);
|
||||
this._register(this._textModel.onDidChangeContent(() => {
|
||||
this.editState = CellEditState.Editing;
|
||||
this.model.contentChange();
|
||||
this._onDidChangeState.fire({ contentChanged: true });
|
||||
}));
|
||||
|
|
|
@ -808,7 +808,7 @@ configurationRegistry.registerConfiguration({
|
|||
'search.seedOnFocus': {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: nls.localize('search.seedOnFocus', "Update workspace seach query to the editor's selected text when focusing the search view. This happens either on click or when triggering the `workbench.views.search.focus` command.")
|
||||
description: nls.localize('search.seedOnFocus', "Update workspace search query to the editor's selected text when focusing the search view. This happens either on click or when triggering the `workbench.views.search.focus` command.")
|
||||
},
|
||||
'search.searchOnTypeDebouncePeriod': {
|
||||
type: 'number',
|
||||
|
|
|
@ -208,11 +208,11 @@ registry.registerWorkbenchAction(
|
|||
'Search Editor: Open New Search Editor to Side', category);
|
||||
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(RerunSearchEditorSearchAction,
|
||||
{ mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R } }, ContextKeyExpr.and(SearchEditorConstants.InSearchEditor)),
|
||||
{ mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_R } }),
|
||||
'Search Editor: Search Again', category, SearchEditorConstants.InSearchEditor);
|
||||
|
||||
registry.registerWorkbenchAction(SyncActionDescriptor.from(FocusQueryEditorWidgetAction,
|
||||
{ primary: KeyCode.Escape }, ContextKeyExpr.and(SearchEditorConstants.InSearchEditor)),
|
||||
{ primary: KeyCode.Escape }),
|
||||
'Search Editor: Focus Query Editor Widget', category, SearchEditorConstants.InSearchEditor);
|
||||
//#endregion
|
||||
|
||||
|
|
|
@ -248,10 +248,7 @@ export class SearchEditor extends BaseTextEditor {
|
|||
}
|
||||
|
||||
focusSearchInput() {
|
||||
const viewState = this.loadViewState();
|
||||
if (viewState && viewState.focused === 'editor') {
|
||||
this.queryEditorWidget.searchInput.focus();
|
||||
}
|
||||
this.queryEditorWidget.searchInput.focus();
|
||||
}
|
||||
|
||||
focusNextInput() {
|
||||
|
|
|
@ -161,7 +161,7 @@ export class RerunSearchEditorSearchAction extends Action {
|
|||
|
||||
export class FocusQueryEditorWidgetAction extends Action {
|
||||
static readonly ID: string = Constants.FocusQueryEditorWidgetCommandId;
|
||||
static readonly LABEL = localize('search.action.focusQueryEditorWidget', "Focus Query Editor Widget");
|
||||
static readonly LABEL = localize('search.action.focusQueryEditorWidget', "Focus Search Editor Input");
|
||||
|
||||
constructor(id: string, label: string,
|
||||
@IEditorService private readonly editorService: IEditorService,
|
||||
|
|
|
@ -10,6 +10,7 @@ import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions as
|
|||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
|
||||
import { ISurveyData, IProductService } from 'vs/platform/product/common/productService';
|
||||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { Severity, INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
@ -25,6 +26,7 @@ class LanguageSurvey extends Disposable {
|
|||
constructor(
|
||||
data: ISurveyData,
|
||||
storageService: IStorageService,
|
||||
storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
|
||||
notificationService: INotificationService,
|
||||
telemetryService: ITelemetryService,
|
||||
modelService: IModelService,
|
||||
|
@ -41,6 +43,14 @@ class LanguageSurvey extends Disposable {
|
|||
const EDITED_LANGUAGE_COUNT_KEY = `${data.surveyId}.editedCount`;
|
||||
const EDITED_LANGUAGE_DATE_KEY = `${data.surveyId}.editedDate`;
|
||||
|
||||
// opt-in to syncing
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: SESSION_COUNT_KEY, version: 1 });
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: LAST_SESSION_DATE_KEY, version: 1 });
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: SKIP_VERSION_KEY, version: 1 });
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: IS_CANDIDATE_KEY, version: 1 });
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: EDITED_LANGUAGE_COUNT_KEY, version: 1 });
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: EDITED_LANGUAGE_DATE_KEY, version: 1 });
|
||||
|
||||
const skipVersion = storageService.get(SKIP_VERSION_KEY, StorageScope.GLOBAL, '');
|
||||
if (skipVersion) {
|
||||
return;
|
||||
|
@ -131,6 +141,7 @@ class LanguageSurveysContribution implements IWorkbenchContribution {
|
|||
|
||||
constructor(
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IStorageKeysSyncRegistryService storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IModelService modelService: IModelService,
|
||||
|
@ -144,7 +155,7 @@ class LanguageSurveysContribution implements IWorkbenchContribution {
|
|||
|
||||
productService.surveys
|
||||
.filter(surveyData => surveyData.surveyId && surveyData.editCount && surveyData.languageId && surveyData.surveyUrl && surveyData.userProbability)
|
||||
.map(surveyData => new LanguageSurvey(surveyData, storageService, notificationService, telemetryService, modelService, textFileService, openerService, productService));
|
||||
.map(surveyData => new LanguageSurvey(surveyData, storageService, storageKeysSyncRegistryService, notificationService, telemetryService, modelService, textFileService, openerService, productService));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import { IWorkbenchContributionsRegistry, IWorkbenchContribution, Extensions as
|
|||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
import { Severity, INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
@ -26,6 +27,7 @@ class NPSContribution implements IWorkbenchContribution {
|
|||
|
||||
constructor(
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IStorageKeysSyncRegistryService storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
|
||||
@INotificationService notificationService: INotificationService,
|
||||
@ITelemetryService telemetryService: ITelemetryService,
|
||||
@IOpenerService openerService: IOpenerService,
|
||||
|
@ -35,6 +37,12 @@ class NPSContribution implements IWorkbenchContribution {
|
|||
return;
|
||||
}
|
||||
|
||||
// opt-in to syncing
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: SESSION_COUNT_KEY, version: 1 });
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: LAST_SESSION_DATE_KEY, version: 1 });
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: SKIP_VERSION_KEY, version: 1 });
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: IS_CANDIDATE_KEY, version: 1 });
|
||||
|
||||
const skipVersion = storageService.get(SKIP_VERSION_KEY, StorageScope.GLOBAL, '');
|
||||
if (skipVersion) {
|
||||
return;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
import { Action, IAction } from 'vs/base/common/actions';
|
||||
import { EndOfLinePreference } from 'vs/editor/common/model';
|
||||
import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { TERMINAL_VIEW_ID, ITerminalConfigHelper, TitleEventSource, TERMINAL_COMMAND_ID, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED, TERMINAL_ACTION_CATEGORY, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { TERMINAL_VIEW_ID, ITerminalConfigHelper, TitleEventSource, TERMINAL_COMMAND_ID, KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED, TERMINAL_ACTION_CATEGORY, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, KEYBINDING_CONTEXT_TERMINAL_FIND_NOT_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_A11Y_TREE_FOCUS } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { SelectActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { attachSelectBoxStyler, attachStylerCallback } from 'vs/platform/theme/common/styler';
|
||||
|
@ -834,7 +834,7 @@ export function registerTerminalActions() {
|
|||
category,
|
||||
keybinding: {
|
||||
primary: KeyCode.Escape,
|
||||
when: ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE),
|
||||
when: ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, KEYBINDING_CONTEXT_TERMINAL_FIND_NOT_VISIBLE),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
});
|
||||
|
@ -883,13 +883,13 @@ export function registerTerminalActions() {
|
|||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: TERMINAL_COMMAND_ID.FIND_WIDGET_FOCUS,
|
||||
title: localize('workbench.action.terminal.focusFindWidget', "Focus Find Widget"),
|
||||
id: TERMINAL_COMMAND_ID.FIND_FOCUS,
|
||||
title: localize('workbench.action.terminal.focusFind', "Focus Find"),
|
||||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.CtrlCmd | KeyCode.KEY_F,
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FOCUS),
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FOCUS),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
});
|
||||
|
@ -901,14 +901,14 @@ export function registerTerminalActions() {
|
|||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: TERMINAL_COMMAND_ID.FIND_WIDGET_HIDE,
|
||||
title: localize('workbench.action.terminal.hideFindWidget', "Hide Find Widget"),
|
||||
id: TERMINAL_COMMAND_ID.FIND_HIDE,
|
||||
title: localize('workbench.action.terminal.hideFind', "Hide Find"),
|
||||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyCode.Escape,
|
||||
secondary: [KeyMod.Shift | KeyCode.Escape],
|
||||
when: ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE),
|
||||
when: ContextKeyExpr.and(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
});
|
||||
|
@ -1159,13 +1159,13 @@ export function registerTerminalActions() {
|
|||
constructor() {
|
||||
super({
|
||||
id: TERMINAL_COMMAND_ID.TOGGLE_FIND_REGEX,
|
||||
title: localize('workbench.action.terminal.toggleFindRegex', "Toggle find using regex"),
|
||||
title: localize('workbench.action.terminal.toggleFindRegex', "Toggle Find Using Regex"),
|
||||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_R,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_R },
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED),
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
});
|
||||
|
@ -1179,13 +1179,13 @@ export function registerTerminalActions() {
|
|||
constructor() {
|
||||
super({
|
||||
id: TERMINAL_COMMAND_ID.TOGGLE_FIND_WHOLE_WORD,
|
||||
title: localize('workbench.action.terminal.toggleFindWholeWord', "Toggle find using whole word"),
|
||||
title: localize('workbench.action.terminal.toggleFindWholeWord', "Toggle Find Using Whole Word"),
|
||||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_W,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_W },
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED),
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
});
|
||||
|
@ -1199,13 +1199,13 @@ export function registerTerminalActions() {
|
|||
constructor() {
|
||||
super({
|
||||
id: TERMINAL_COMMAND_ID.TOGGLE_FIND_CASE_SENSITIVE,
|
||||
title: localize('workbench.action.terminal.toggleFindCaseSensitive', "Toggle find using case sensitive"),
|
||||
title: localize('workbench.action.terminal.toggleFindCaseSensitive', "Toggle Find Using Case Sensitive"),
|
||||
f1: true,
|
||||
category,
|
||||
keybinding: {
|
||||
primary: KeyMod.Alt | KeyCode.KEY_C,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Alt | KeyCode.KEY_C },
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED),
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
});
|
||||
|
@ -1226,12 +1226,12 @@ export function registerTerminalActions() {
|
|||
{
|
||||
primary: KeyCode.F3,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyCode.KEY_G, secondary: [KeyCode.F3] },
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED),
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
{
|
||||
primary: KeyMod.Shift | KeyCode.Enter,
|
||||
when: KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED,
|
||||
when: KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED,
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
]
|
||||
|
@ -1252,12 +1252,12 @@ export function registerTerminalActions() {
|
|||
{
|
||||
primary: KeyMod.Shift | KeyCode.F3,
|
||||
mac: { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_G, secondary: [KeyMod.Shift | KeyCode.F3] },
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED),
|
||||
when: ContextKeyExpr.or(KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED),
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
},
|
||||
{
|
||||
primary: KeyCode.Enter,
|
||||
when: KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED,
|
||||
when: KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED,
|
||||
weight: KeybindingWeight.WorkbenchContrib
|
||||
}
|
||||
]
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import { SimpleFindWidget } from 'vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget';
|
||||
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_FOCUSED, KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { FindReplaceState } from 'vs/editor/contrib/find/findState';
|
||||
import { ITerminalService } from 'vs/workbench/contrib/terminal/browser/terminal';
|
||||
|
@ -24,8 +24,8 @@ export class TerminalFindWidget extends SimpleFindWidget {
|
|||
this._register(findState.onFindReplaceStateChange(() => {
|
||||
this.show();
|
||||
}));
|
||||
this._findInputFocused = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED.bindTo(this._contextKeyService);
|
||||
this._findWidgetFocused = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED.bindTo(this._contextKeyService);
|
||||
this._findInputFocused = KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_FOCUSED.bindTo(this._contextKeyService);
|
||||
this._findWidgetFocused = KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED.bindTo(this._contextKeyService);
|
||||
}
|
||||
|
||||
public find(previous: boolean) {
|
||||
|
|
|
@ -1079,6 +1079,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||
|
||||
// Dispose the environment info widget if it exists
|
||||
this._environmentInfo?.disposable.dispose();
|
||||
this._environmentInfo = undefined;
|
||||
|
||||
if (!reset) {
|
||||
// HACK: Force initialText to be non-falsy for reused terminals such that the
|
||||
|
@ -1410,6 +1411,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||
if (!info ||
|
||||
this._configHelper.config.environmentChangesIndicator === 'off' ||
|
||||
this._configHelper.config.environmentChangesIndicator === 'warnonly' && !info.requiresAction) {
|
||||
this._environmentInfo = undefined;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -245,12 +245,14 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
|
|||
const env = terminalEnvironment.createTerminalEnvironment(shellLaunchConfig, lastActiveWorkspace, envFromConfigValue, this._configurationResolverService, isWorkspaceShellAllowed, this._productService.version, this._configHelper.config.detectLocale, baseEnv);
|
||||
|
||||
// Fetch any extension environment additions and apply them
|
||||
this._extEnvironmentVariableCollection = this._environmentVariableService.mergedCollection;
|
||||
this._register(this._environmentVariableService.onDidChangeCollections(newCollection => this._onEnvironmentVariableCollectionChange(newCollection)));
|
||||
this._extEnvironmentVariableCollection.applyToProcessEnvironment(env);
|
||||
if (this._extEnvironmentVariableCollection.map.size > 0) {
|
||||
this._environmentVariableInfo = new EnvironmentVariableInfoChangesActive(this._extEnvironmentVariableCollection);
|
||||
this._onEnvironmentVariableInfoChange.fire(this._environmentVariableInfo);
|
||||
if (!shellLaunchConfig.strictEnv) {
|
||||
this._extEnvironmentVariableCollection = this._environmentVariableService.mergedCollection;
|
||||
this._register(this._environmentVariableService.onDidChangeCollections(newCollection => this._onEnvironmentVariableCollectionChange(newCollection)));
|
||||
this._extEnvironmentVariableCollection.applyToProcessEnvironment(env);
|
||||
if (this._extEnvironmentVariableCollection.map.size > 0) {
|
||||
this._environmentVariableInfo = new EnvironmentVariableInfoChangesActive(this._extEnvironmentVariableCollection);
|
||||
this._onEnvironmentVariableInfoChange.fire(this._environmentVariableInfo);
|
||||
}
|
||||
}
|
||||
|
||||
const useConpty = this._configHelper.config.windowsEnableConpty && !isScreenReaderModeEnabled;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as nls from 'vs/nls';
|
||||
import { TERMINAL_VIEW_ID, IShellLaunchConfig, ITerminalConfigHelper, ITerminalNativeService, ISpawnExtHostProcessRequest, IStartExtensionTerminalRequest, IAvailableShellsRequest, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, ITerminalProcessExtHostProxy, IShellDefinition, LinuxDistro, KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { TERMINAL_VIEW_ID, IShellLaunchConfig, ITerminalConfigHelper, ITerminalNativeService, ISpawnExtHostProcessRequest, IStartExtensionTerminalRequest, IAvailableShellsRequest, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE, KEYBINDING_CONTEXT_TERMINAL_IS_OPEN, ITerminalProcessExtHostProxy, IShellDefinition, LinuxDistro, KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE } from 'vs/workbench/contrib/terminal/common/terminal';
|
||||
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
import { ILifecycleService } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
|
@ -121,7 +121,7 @@ export class TerminalService implements ITerminalService {
|
|||
}
|
||||
this._terminalFocusContextKey = KEYBINDING_CONTEXT_TERMINAL_FOCUS.bindTo(this._contextKeyService);
|
||||
this._terminalShellTypeContextKey = KEYBINDING_CONTEXT_TERMINAL_SHELL_TYPE.bindTo(this._contextKeyService);
|
||||
this._findWidgetVisible = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.bindTo(this._contextKeyService);
|
||||
this._findWidgetVisible = KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE.bindTo(this._contextKeyService);
|
||||
this._configHelper = this._instantiationService.createInstance(TerminalConfigHelper, this._terminalNativeService?.linuxDistro || LinuxDistro.Unknown);
|
||||
this.onTabDisposed(tab => this._removeTab(tab));
|
||||
this.onActiveTabChanged(() => {
|
||||
|
|
|
@ -37,15 +37,15 @@ export const KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED = new RawContextKey<boole
|
|||
export const KEYBINDING_CONTEXT_TERMINAL_TEXT_NOT_SELECTED = KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED.toNegated();
|
||||
|
||||
/** A context key that is set when the find widget in integrated terminal is visible. */
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE = new RawContextKey<boolean>('terminalFindWidgetVisible', false);
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE = new RawContextKey<boolean>('terminalFindVisible', false);
|
||||
/** A context key that is set when the find widget in integrated terminal is not visible. */
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_NOT_VISIBLE = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_VISIBLE.toNegated();
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_NOT_VISIBLE = KEYBINDING_CONTEXT_TERMINAL_FIND_VISIBLE.toNegated();
|
||||
/** A context key that is set when the find widget find input in integrated terminal is focused. */
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED = new RawContextKey<boolean>('terminalFindWidgetInputFocused', false);
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_FOCUSED = new RawContextKey<boolean>('terminalFindInputFocused', false);
|
||||
/** A context key that is set when the find widget in integrated terminal is focused. */
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_FOCUSED = new RawContextKey<boolean>('terminalFindWidgetFocused', false);
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_FOCUSED = new RawContextKey<boolean>('terminalFindFocused', false);
|
||||
/** A context key that is set when the find widget find input in integrated terminal is not focused. */
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_NOT_FOCUSED = KEYBINDING_CONTEXT_TERMINAL_FIND_WIDGET_INPUT_FOCUSED.toNegated();
|
||||
export const KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_NOT_FOCUSED = KEYBINDING_CONTEXT_TERMINAL_FIND_INPUT_FOCUSED.toNegated();
|
||||
|
||||
export const IS_WORKSPACE_SHELL_ALLOWED_STORAGE_KEY = 'terminal.integrated.isWorkspaceShellAllowed';
|
||||
export const NEVER_MEASURE_RENDER_TIME_STORAGE_KEY = 'terminal.integrated.neverMeasureRenderTime';
|
||||
|
@ -474,8 +474,8 @@ export const enum TERMINAL_COMMAND_ID {
|
|||
MANAGE_WORKSPACE_SHELL_PERMISSIONS = 'workbench.action.terminal.manageWorkspaceShellPermissions',
|
||||
RENAME = 'workbench.action.terminal.rename',
|
||||
RENAME_WITH_ARG = 'workbench.action.terminal.renameWithArg',
|
||||
FIND_WIDGET_FOCUS = 'workbench.action.terminal.focusFindWidget',
|
||||
FIND_WIDGET_HIDE = 'workbench.action.terminal.hideFindWidget',
|
||||
FIND_FOCUS = 'workbench.action.terminal.focusFind',
|
||||
FIND_HIDE = 'workbench.action.terminal.hideFind',
|
||||
QUICK_OPEN_TERM = 'workbench.action.quickOpenTerm',
|
||||
SCROLL_TO_PREVIOUS_COMMAND = 'workbench.action.terminal.scrollToPreviousCommand',
|
||||
SCROLL_TO_NEXT_COMMAND = 'workbench.action.terminal.scrollToNextCommand',
|
||||
|
@ -501,8 +501,8 @@ export const DEFAULT_COMMANDS_TO_SKIP_SHELL: string[] = [
|
|||
TERMINAL_COMMAND_ID.DELETE_TO_LINE_START,
|
||||
TERMINAL_COMMAND_ID.DELETE_WORD_LEFT,
|
||||
TERMINAL_COMMAND_ID.DELETE_WORD_RIGHT,
|
||||
TERMINAL_COMMAND_ID.FIND_WIDGET_FOCUS,
|
||||
TERMINAL_COMMAND_ID.FIND_WIDGET_HIDE,
|
||||
TERMINAL_COMMAND_ID.FIND_FOCUS,
|
||||
TERMINAL_COMMAND_ID.FIND_HIDE,
|
||||
TERMINAL_COMMAND_ID.FIND_NEXT,
|
||||
TERMINAL_COMMAND_ID.FIND_PREVIOUS,
|
||||
TERMINAL_COMMAND_ID.TOGGLE_FIND_REGEX,
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
|
||||
<path d="M1024,1024H0V0H1024Z" fill="#f6f6f6" fill-opacity="0"/>
|
||||
<g>
|
||||
<g>
|
||||
<path d="M582.813,821.171,558.39,811.078h-218.7L281.039,972.344,175.172,681.078l-47.313,130H42.7V874.61c0,82.436,133.634,149.265,298.65,149.265,98.328,0,185.57-23.688,239.93-60.453l-5.922-14.8-16.094-39.672-15.829-39.391,39.344-16.048,14.829-6.046c-.2-3.423-.282-6.751-.282-10.125s.078-6.8.282-10.125Z" fill="#008575"/>
|
||||
<path d="M469.32,469.266A209.424,209.424,0,0,1,386.164,452.5a210.842,210.842,0,0,1-92.828-75.656H42.7V768.437H98.016L175.172,556.2,281.039,847.469l28.805-79.032h248.5l1.046-2.749,16.047-39.672,16.094-39.859L631.25,702.5l8.718,3.624V469.266Z" fill="#008575"/>
|
||||
</g>
|
||||
<g opacity="0.25">
|
||||
<path d="M175.172,556.2,281.039,847.469l28.805-79.032h31.508V426.906a209.408,209.408,0,0,1-23.008-19.89,212.537,212.537,0,0,1-25.008-30.172H42.7V768.437H98.016Z" fill="#fff"/>
|
||||
<path d="M339.688,811.078,281.039,972.344,175.172,681.078l-47.313,130H42.7V874.61c0,82.436,133.634,149.265,298.65,149.265v-212.8Z" fill="#fff"/>
|
||||
</g>
|
||||
<path d="M469.32,469.266A209.424,209.424,0,0,1,386.164,452.5a212.329,212.329,0,0,1-67.82-45.484,215.513,215.513,0,0,1-45.555-67.7,210.416,210.416,0,0,1-16.8-83.375,221.318,221.318,0,0,1,1.125-22.359C133.234,251.8,42.7,309.031,42.7,376.844c0,82.484,133.673,149.359,298.65,149.359,95.164,0,179.859-22.3,234.507-56.937Z" fill="#b8d432"/>
|
||||
<path d="M469.32,469.266A209.424,209.424,0,0,1,386.164,452.5a212.329,212.329,0,0,1-67.82-45.484,215.513,215.513,0,0,1-45.555-67.7,210.416,210.416,0,0,1-16.8-83.375,221.318,221.318,0,0,1,1.125-22.359C133.234,251.8,42.7,309.031,42.7,376.844c0,82.484,133.673,149.359,298.65,149.359,95.164,0,179.859-22.3,234.507-56.937Z" fill="#008575"/>
|
||||
<path d="M852.3,170.625a126.119,126.119,0,0,1,50.139,10,132.135,132.135,0,0,1,41.048,27.156,126.539,126.539,0,0,1,27.64,40.516,129.321,129.321,0,0,1,.173,100.14,128.033,128.033,0,0,1-27.517,40.657,130.32,130.32,0,0,1-40.765,27.515,123.843,123.843,0,0,1-49.688,9.985H469.32a166.759,166.759,0,0,1-66.484-13.344,170.1,170.1,0,0,1-54.352-36.406,172.108,172.108,0,0,1-36.476-54.313,172.741,172.741,0,0,1,0-133.109,171.229,171.229,0,0,1,36.429-54.3A173.023,173.023,0,0,1,402.8,98.61,167.87,167.87,0,0,1,469.32,85.282,164.541,164.541,0,0,1,500.328,88.3a200.977,200.977,0,0,1,30.8-37.157,189.149,189.149,0,0,1,38.312-27.829A189.23,189.23,0,0,1,661.344,0a187.037,187.037,0,0,1,69.813,12.984,191.558,191.558,0,0,1,58.155,35.8,194.176,194.176,0,0,1,41.845,54.265A200.919,200.919,0,0,1,852.3,170.625Z" fill="#008575"/>
|
||||
<path d="M386.289,399.328a191.554,191.554,0,0,1,0-147.047A188.377,188.377,0,0,1,486.821,151.8a186.583,186.583,0,0,1,107.913-11.423A222.149,222.149,0,0,1,628.75,99.3a203.4,203.4,0,0,1,42.312-30.813,205.773,205.773,0,0,1,48.594-19.157,212.357,212.357,0,0,1,53.11-6.672c3.3,0,6.2.734,9.5.8a191.241,191.241,0,0,0-51.109-30.469A187.037,187.037,0,0,0,661.344,0a192.068,192.068,0,0,0-48.016,5.954,194.156,194.156,0,0,0-44.016,17.358,189.427,189.427,0,0,0-38.218,27.829A197.207,197.207,0,0,0,500.328,88.3a164.541,164.541,0,0,0-31.008-3.016A167.543,167.543,0,0,0,402.836,98.61a169.992,169.992,0,0,0-90.828,90.765,171.365,171.365,0,0,0,36.429,187.406c12.172,12.172,26.391,21.563,41.766,29.656C389.039,404.016,387.414,401.953,386.289,399.328Z" fill="#fff" opacity="0.2" style="isolation: isolate"/>
|
||||
<path d="M938.647,833.672a152.447,152.447,0,0,1-4.672,37.016l45.61,18.624L963.617,929l-46.063-19.016a149.169,149.169,0,0,1-51.891,52.062l19,45.564L844.991,1024l-18.766-45.656a149.9,149.9,0,0,1-74.015,0L733.569,1024l-39.64-16.39L712.9,962.046a144.7,144.7,0,0,1-52.015-52.062L614.866,929l-15.921-39.688,45.64-18.624a152.468,152.468,0,0,1-4.626-37.016,147.047,147.047,0,0,1,4.751-36.97l-45.735-18.718,15.97-39.64,46.062,18.922A148.589,148.589,0,0,1,712.975,705.3l-19-46.016,39.719-16.016,18.641,45.64a150.28,150.28,0,0,1,73.984,0l18.7-45.64,39.687,16.016L865.742,705.3a154.853,154.853,0,0,1,51.937,51.968l46.015-18.922,15.969,39.64L934.07,796.7A157.427,157.427,0,0,1,938.647,833.672ZM789.3,940.344A103.068,103.068,0,0,0,830.647,932a107.121,107.121,0,0,0,33.813-22.843,109.322,109.322,0,0,0,23-34.016,105.036,105.036,0,0,0,0-82.781,109.269,109.269,0,0,0-56.813-56.845,101.608,101.608,0,0,0-41.344-8.5,102.956,102.956,0,0,0-41.515,8.5,110.282,110.282,0,0,0-34.016,23,106.128,106.128,0,0,0-22.8,33.845,106.831,106.831,0,0,0,0,82.781A105.967,105.967,0,0,0,747.788,932,104.438,104.438,0,0,0,789.3,940.344Z" fill="#008575"/>
|
||||
<path d="M469.32,469.266A209.424,209.424,0,0,1,386.164,452.5a212.329,212.329,0,0,1-67.82-45.484,215.513,215.513,0,0,1-45.555-67.7,210.416,210.416,0,0,1-16.8-83.375,221.318,221.318,0,0,1,1.125-22.359C133.234,251.8,42.7,309.031,42.7,376.844c0,82.484,133.673,149.359,298.65,149.359,95.164,0,179.859-22.3,234.507-56.937Z" fill="#fff" opacity="0.55"/>
|
||||
</g>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 4.8 KiB |
|
@ -88,7 +88,7 @@ export class ReleaseNotesManager {
|
|||
this._currentReleaseNotes.webview.onDidClickLink(uri => this.onDidClickLink(URI.parse(uri)));
|
||||
this._currentReleaseNotes.onDispose(() => { this._currentReleaseNotes = undefined; });
|
||||
|
||||
const iconPath = URI.parse(require.toUrl('./media/code-icon.svg'));
|
||||
const iconPath = URI.parse(require.toUrl('vs/workbench/browser/media/code-icon.svg'));
|
||||
this._currentReleaseNotes.iconPath = {
|
||||
light: iconPath,
|
||||
dark: iconPath
|
||||
|
|
|
@ -136,8 +136,8 @@ export class ProductContribution implements IWorkbenchContribution {
|
|||
|
||||
// was there an update? if so, open release notes
|
||||
const releaseNotesUrl = productService.releaseNotesUrl;
|
||||
if (shouldShowReleaseNotes && releaseNotesUrl && lastVersion && productService.version !== lastVersion && productService.quality === 'stable') { // {{SQL CARBON EDIT}} Only show release notes for stable build) {
|
||||
/*showReleaseNotes(instantiationService, productService.version) {{SQL CARBON EDIT}} Prompt user to open release notes in browser until we can get ADS release notes from the web
|
||||
if (shouldShowReleaseNotes && !environmentService.skipReleaseNotes && releaseNotesUrl && lastVersion && productService.version !== lastVersion && productService.quality === 'stable') { // {{SQL CARBON EDIT}} Only show release notes for stable build) {
|
||||
/*showReleaseNotes(instantiationService, productService.version)
|
||||
.then(undefined, () => {*/
|
||||
notificationService.prompt(
|
||||
severity.Info,
|
||||
|
|
|
@ -102,8 +102,8 @@ export class DynamicWebviewEditorOverlay extends Disposable implements WebviewOv
|
|||
this.container.style.position = 'absolute';
|
||||
this.container.style.top = `${frameRect.top - containerRect.top}px`;
|
||||
this.container.style.left = `${frameRect.left - containerRect.left}px`;
|
||||
this.container.style.width = `${dimension ? dimension.width : frameRect.width}px`;
|
||||
this.container.style.height = `${dimension ? dimension.height : frameRect.height}px`;
|
||||
this.container.style.width = `${dimension && frameRect.width > 0 ? dimension.width : frameRect.width}px`;
|
||||
this.container.style.height = `${dimension && frameRect.height > 0 ? dimension.height : frameRect.height}px`;
|
||||
}
|
||||
|
||||
private show() {
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
|
||||
<path d="M1024,1024H0V0H1024Z" fill="#f6f6f6" fill-opacity="0"/>
|
||||
<g>
|
||||
<g>
|
||||
<path d="M582.813,821.171,558.39,811.078h-218.7L281.039,972.344,175.172,681.078l-47.313,130H42.7V874.61c0,82.436,133.634,149.265,298.65,149.265,98.328,0,185.57-23.688,239.93-60.453l-5.922-14.8-16.094-39.672-15.829-39.391,39.344-16.048,14.829-6.046c-.2-3.423-.282-6.751-.282-10.125s.078-6.8.282-10.125Z" fill="#008575"/>
|
||||
<path d="M469.32,469.266A209.424,209.424,0,0,1,386.164,452.5a210.842,210.842,0,0,1-92.828-75.656H42.7V768.437H98.016L175.172,556.2,281.039,847.469l28.805-79.032h248.5l1.046-2.749,16.047-39.672,16.094-39.859L631.25,702.5l8.718,3.624V469.266Z" fill="#008575"/>
|
||||
</g>
|
||||
<g opacity="0.25">
|
||||
<path d="M175.172,556.2,281.039,847.469l28.805-79.032h31.508V426.906a209.408,209.408,0,0,1-23.008-19.89,212.537,212.537,0,0,1-25.008-30.172H42.7V768.437H98.016Z" fill="#fff"/>
|
||||
<path d="M339.688,811.078,281.039,972.344,175.172,681.078l-47.313,130H42.7V874.61c0,82.436,133.634,149.265,298.65,149.265v-212.8Z" fill="#fff"/>
|
||||
</g>
|
||||
<path d="M469.32,469.266A209.424,209.424,0,0,1,386.164,452.5a212.329,212.329,0,0,1-67.82-45.484,215.513,215.513,0,0,1-45.555-67.7,210.416,210.416,0,0,1-16.8-83.375,221.318,221.318,0,0,1,1.125-22.359C133.234,251.8,42.7,309.031,42.7,376.844c0,82.484,133.673,149.359,298.65,149.359,95.164,0,179.859-22.3,234.507-56.937Z" fill="#b8d432"/>
|
||||
<path d="M469.32,469.266A209.424,209.424,0,0,1,386.164,452.5a212.329,212.329,0,0,1-67.82-45.484,215.513,215.513,0,0,1-45.555-67.7,210.416,210.416,0,0,1-16.8-83.375,221.318,221.318,0,0,1,1.125-22.359C133.234,251.8,42.7,309.031,42.7,376.844c0,82.484,133.673,149.359,298.65,149.359,95.164,0,179.859-22.3,234.507-56.937Z" fill="#008575"/>
|
||||
<path d="M852.3,170.625a126.119,126.119,0,0,1,50.139,10,132.135,132.135,0,0,1,41.048,27.156,126.539,126.539,0,0,1,27.64,40.516,129.321,129.321,0,0,1,.173,100.14,128.033,128.033,0,0,1-27.517,40.657,130.32,130.32,0,0,1-40.765,27.515,123.843,123.843,0,0,1-49.688,9.985H469.32a166.759,166.759,0,0,1-66.484-13.344,170.1,170.1,0,0,1-54.352-36.406,172.108,172.108,0,0,1-36.476-54.313,172.741,172.741,0,0,1,0-133.109,171.229,171.229,0,0,1,36.429-54.3A173.023,173.023,0,0,1,402.8,98.61,167.87,167.87,0,0,1,469.32,85.282,164.541,164.541,0,0,1,500.328,88.3a200.977,200.977,0,0,1,30.8-37.157,189.149,189.149,0,0,1,38.312-27.829A189.23,189.23,0,0,1,661.344,0a187.037,187.037,0,0,1,69.813,12.984,191.558,191.558,0,0,1,58.155,35.8,194.176,194.176,0,0,1,41.845,54.265A200.919,200.919,0,0,1,852.3,170.625Z" fill="#008575"/>
|
||||
<path d="M386.289,399.328a191.554,191.554,0,0,1,0-147.047A188.377,188.377,0,0,1,486.821,151.8a186.583,186.583,0,0,1,107.913-11.423A222.149,222.149,0,0,1,628.75,99.3a203.4,203.4,0,0,1,42.312-30.813,205.773,205.773,0,0,1,48.594-19.157,212.357,212.357,0,0,1,53.11-6.672c3.3,0,6.2.734,9.5.8a191.241,191.241,0,0,0-51.109-30.469A187.037,187.037,0,0,0,661.344,0a192.068,192.068,0,0,0-48.016,5.954,194.156,194.156,0,0,0-44.016,17.358,189.427,189.427,0,0,0-38.218,27.829A197.207,197.207,0,0,0,500.328,88.3a164.541,164.541,0,0,0-31.008-3.016A167.543,167.543,0,0,0,402.836,98.61a169.992,169.992,0,0,0-90.828,90.765,171.365,171.365,0,0,0,36.429,187.406c12.172,12.172,26.391,21.563,41.766,29.656C389.039,404.016,387.414,401.953,386.289,399.328Z" fill="#fff" opacity="0.2" style="isolation: isolate"/>
|
||||
<path d="M938.647,833.672a152.447,152.447,0,0,1-4.672,37.016l45.61,18.624L963.617,929l-46.063-19.016a149.169,149.169,0,0,1-51.891,52.062l19,45.564L844.991,1024l-18.766-45.656a149.9,149.9,0,0,1-74.015,0L733.569,1024l-39.64-16.39L712.9,962.046a144.7,144.7,0,0,1-52.015-52.062L614.866,929l-15.921-39.688,45.64-18.624a152.468,152.468,0,0,1-4.626-37.016,147.047,147.047,0,0,1,4.751-36.97l-45.735-18.718,15.97-39.64,46.062,18.922A148.589,148.589,0,0,1,712.975,705.3l-19-46.016,39.719-16.016,18.641,45.64a150.28,150.28,0,0,1,73.984,0l18.7-45.64,39.687,16.016L865.742,705.3a154.853,154.853,0,0,1,51.937,51.968l46.015-18.922,15.969,39.64L934.07,796.7A157.427,157.427,0,0,1,938.647,833.672ZM789.3,940.344A103.068,103.068,0,0,0,830.647,932a107.121,107.121,0,0,0,33.813-22.843,109.322,109.322,0,0,0,23-34.016,105.036,105.036,0,0,0,0-82.781,109.269,109.269,0,0,0-56.813-56.845,101.608,101.608,0,0,0-41.344-8.5,102.956,102.956,0,0,0-41.515,8.5,110.282,110.282,0,0,0-34.016,23,106.128,106.128,0,0,0-22.8,33.845,106.831,106.831,0,0,0,0,82.781A105.967,105.967,0,0,0,747.788,932,104.438,104.438,0,0,0,789.3,940.344Z" fill="#008575"/>
|
||||
<path d="M469.32,469.266A209.424,209.424,0,0,1,386.164,452.5a212.329,212.329,0,0,1-67.82-45.484,215.513,215.513,0,0,1-45.555-67.7,210.416,210.416,0,0,1-16.8-83.375,221.318,221.318,0,0,1,1.125-22.359C133.234,251.8,42.7,309.031,42.7,376.844c0,82.484,133.673,149.359,298.65,149.359,95.164,0,179.859-22.3,234.507-56.937Z" fill="#fff" opacity="0.55"/>
|
||||
</g>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 4.8 KiB |
|
@ -220,7 +220,7 @@
|
|||
|
||||
.file-icons-enabled .show-file-icons .az_data_welcome_page-name-file-icon.file-icon::before { /* {{SQL CARBON EDIT}} We use azdata welcome page */
|
||||
content: ' ';
|
||||
background-image: url('../../code-icon.svg');
|
||||
background-image: url('../../../../browser/media/code-icon.svg');
|
||||
}
|
||||
|
||||
.monaco-workbench .part.editor > .content .welcomePage .mac-only,
|
||||
|
|
|
@ -45,8 +45,8 @@ import { CancellationToken } from 'vs/base/common/cancellation';
|
|||
import 'sql/workbench/contrib/welcome/page/browser/az_data_welcome_page'; // {{SQL CARBON EDIT}}
|
||||
import { IHostService } from 'vs/workbench/services/host/browser/host';
|
||||
import { IProductService } from 'vs/platform/product/common/productService';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
|
||||
import { IEditorOptions } from 'vs/platform/editor/common/editor';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
|
||||
const configurationKey = 'workbench.startupEditor';
|
||||
const oldConfigurationKey = 'workbench.welcome.enabled';
|
||||
|
@ -62,13 +62,14 @@ export class WelcomePageContribution implements IWorkbenchContribution {
|
|||
@IFileService fileService: IFileService,
|
||||
@IWorkspaceContextService contextService: IWorkspaceContextService,
|
||||
@ILifecycleService lifecycleService: ILifecycleService,
|
||||
@IEditorService editorGroupsService: IEditorGroupsService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@ICommandService private readonly commandService: ICommandService,
|
||||
) {
|
||||
const enabled = isWelcomePageEnabled(configurationService, contextService);
|
||||
if (enabled && lifecycleService.startupKind !== StartupKind.ReloadedWindow) {
|
||||
backupFileService.hasBackups().then(hasBackups => {
|
||||
if (!editorGroupsService.willRestoreEditors && !hasBackups) {
|
||||
// Open the welcome even if we opened a set of default editors
|
||||
if ((!editorService.activeEditor || layoutService.openedDefaultEditors) && !hasBackups) {
|
||||
const openWithReadme = configurationService.getValue(configurationKey) === 'readme';
|
||||
if (openWithReadme) {
|
||||
return Promise.all(contextService.getWorkspace().folders.map(folder => {
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
|
||||
.file-icons-enabled .show-file-icons .vs_code_editor_walkthrough\.md-name-file-icon.md-ext-file-icon.ext-file-icon.markdown-lang-file-icon.file-icon::before {
|
||||
content: ' ';
|
||||
background-image: url('../../code-icon.svg');
|
||||
background-image: url('../../../../browser/media/code-icon.svg');
|
||||
}
|
||||
|
||||
.monaco-workbench .part.editor > .content .walkThroughContent .mac-only,
|
||||
|
|
|
@ -192,7 +192,7 @@ class NativeContextMenuService extends Disposable implements IContextMenuService
|
|||
private async runAction(actionRunner: IActionRunner, actionToRun: IAction, delegate: IContextMenuDelegate, event: IContextMenuEvent): Promise<void> {
|
||||
this.telemetryService.publicLog2<WorkbenchActionExecutedEvent, WorkbenchActionExecutedClassification>('workbenchActionExecuted', { id: actionToRun.id, from: 'contextMenu' });
|
||||
|
||||
const context = delegate.getActionsContext ? delegate.getActionsContext(event) : event;
|
||||
const context = delegate.getActionsContext ? delegate.getActionsContext(event) : undefined;
|
||||
|
||||
const runnable = actionRunner.run(actionToRun, context);
|
||||
if (runnable) {
|
||||
|
|
|
@ -709,10 +709,17 @@ let schema: IJSONSchema = {
|
|||
'description': nls.localize('keybindings.json.key', "Key or key sequence (separated by space)"),
|
||||
},
|
||||
'command': {
|
||||
'type': 'string',
|
||||
'enum': commandsEnum,
|
||||
'enumDescriptions': <any>commandsEnumDescriptions,
|
||||
'description': nls.localize('keybindings.json.command', "Name of the command to execute"),
|
||||
'anyOf': [
|
||||
{
|
||||
'type': 'string',
|
||||
'enum': commandsEnum,
|
||||
'enumDescriptions': <any>commandsEnumDescriptions,
|
||||
'description': nls.localize('keybindings.json.command', "Name of the command to execute"),
|
||||
},
|
||||
{
|
||||
'type': 'string'
|
||||
}
|
||||
]
|
||||
},
|
||||
'when': {
|
||||
'type': 'string',
|
||||
|
|
|
@ -224,4 +224,9 @@ export interface IWorkbenchLayoutService extends ILayoutService {
|
|||
* Returns the next visible view part in a given direction
|
||||
*/
|
||||
getVisibleNeighborPart(part: Parts, direction: Direction): Parts | undefined;
|
||||
|
||||
/**
|
||||
* True if a default layout with default editors was applied at startup
|
||||
*/
|
||||
readonly openedDefaultEditors: boolean;
|
||||
}
|
||||
|
|
|
@ -370,6 +370,8 @@ export class TestLayoutService implements IWorkbenchLayoutService {
|
|||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
openedDefaultEditors = false;
|
||||
|
||||
dimension: IDimension = { width: 800, height: 600 };
|
||||
|
||||
container: HTMLElement = window.document.body;
|
||||
|
|
|
@ -146,18 +146,14 @@ interface IDefaultPanelLayout {
|
|||
}
|
||||
|
||||
interface IDefaultEditor {
|
||||
path: string;
|
||||
scheme: string;
|
||||
active?: boolean;
|
||||
readonly uri: UriComponents;
|
||||
readonly openOnlyIfExists?: boolean;
|
||||
}
|
||||
|
||||
interface IDefaultLayout {
|
||||
sidebar?: IDefaultSideBarLayout;
|
||||
panel?: IDefaultPanelLayout;
|
||||
editors?: IDefaultEditor[];
|
||||
|
||||
// Internal only
|
||||
firstRun?: boolean;
|
||||
readonly sidebar?: IDefaultSideBarLayout;
|
||||
readonly panel?: IDefaultPanelLayout;
|
||||
readonly editors?: IDefaultEditor[];
|
||||
}
|
||||
|
||||
interface IWorkbenchConstructionOptions {
|
||||
|
@ -270,6 +266,8 @@ interface IWorkbenchConstructionOptions {
|
|||
*/
|
||||
readonly homeIndicator?: IHomeIndicator;
|
||||
|
||||
readonly defaultLayout?: IDefaultLayout;
|
||||
|
||||
//#endregion
|
||||
|
||||
|
||||
|
@ -286,8 +284,6 @@ interface IWorkbenchConstructionOptions {
|
|||
readonly driver?: boolean;
|
||||
|
||||
//#endregion
|
||||
|
||||
defaultLayout?: IDefaultLayout;
|
||||
}
|
||||
|
||||
interface IWorkbench {
|
||||
|
@ -421,6 +417,7 @@ export {
|
|||
IHomeIndicator,
|
||||
|
||||
// Default layout
|
||||
IDefaultEditor,
|
||||
IDefaultLayout,
|
||||
IDefaultPanelLayout,
|
||||
IDefaultSideBarLayout,
|
||||
|
|
|
@ -8,7 +8,7 @@ import { join } from 'path';
|
|||
|
||||
export function setup(stableCodePath: string, testDataPath: string) {
|
||||
|
||||
describe('Data Migration: This test MUST run before releasing by providing the --stable-build command line argument', () => {
|
||||
describe('Datamigration', () => {
|
||||
it(`verifies opened editors are restored`, async function () {
|
||||
if (!stableCodePath) {
|
||||
this.skip();
|
||||
|
|
|
@ -267,17 +267,7 @@ after(async function () {
|
|||
await new Promise((c, e) => rimraf(testDataPath, { maxBusyTries: 10 }, err => err ? e(err) : c()));
|
||||
});
|
||||
|
||||
describe(`Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
|
||||
before(async function () {
|
||||
const app = new Application(this.defaultOptions);
|
||||
await app!.start(opts.web ? false : undefined);
|
||||
this.app = app;
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
await this.app.stop();
|
||||
});
|
||||
|
||||
describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
|
||||
if (screenshotsPath) {
|
||||
afterEach(async function () {
|
||||
if (this.currentTest.state !== 'failed') {
|
||||
|
@ -299,16 +289,34 @@ describe(`Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
|
|||
});
|
||||
}
|
||||
|
||||
sqlMain();
|
||||
/*if (!opts.web) { setupDataMigrationTests(opts['stable-build'], testDataPath); }
|
||||
if (!opts.web) { setupDataLossTests(); }
|
||||
if (!opts.web) { setupDataPreferencesTests(); }
|
||||
setupDataSearchTests();
|
||||
setupDataLanguagesTests();
|
||||
setupDataEditorTests();
|
||||
setupDataStatusbarTests(!!opts.web);
|
||||
if (!opts.web) { setupDataExtensionTests(); }
|
||||
if (!opts.web) { setupDataMultirootTests(); }
|
||||
if (!opts.web) { setupDataLocalizationTests(); }
|
||||
if (!opts.web) { setupLaunchTests(); }*/
|
||||
/*if (!opts.web && opts['stable-build']) {
|
||||
describe(`Stable vs Insiders Smoke Tests: This test MUST run before releasing by providing the --stable-build command line argument`, () => {
|
||||
setupDataMigrationTests(opts['stable-build'], testDataPath);
|
||||
});
|
||||
}*/
|
||||
|
||||
describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
|
||||
before(async function () {
|
||||
const app = new Application(this.defaultOptions);
|
||||
await app!.start(opts.web ? false : undefined);
|
||||
this.app = app;
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
await this.app.stop();
|
||||
});
|
||||
|
||||
sqlMain();
|
||||
/*if (!opts.web) { setupDataLossTests(); }
|
||||
if (!opts.web) { setupDataPreferencesTests(); }
|
||||
setupDataSearchTests();
|
||||
setupDataLanguagesTests();
|
||||
setupDataEditorTests();
|
||||
setupDataStatusbarTests(!!opts.web);
|
||||
if (!opts.web) { setupDataExtensionTests(); }
|
||||
if (!opts.web) { setupDataMultirootTests(); }
|
||||
if (!opts.web) { setupDataLocalizationTests(); }
|
||||
if (!opts.web) { setupLaunchTests(); }*/
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче