mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-22 12:50:29 -04:00
Initial VS Code 1.19 source merge (#571)
* Initial 1.19 xcopy * Fix yarn build * Fix numerous build breaks * Next batch of build break fixes * More build break fixes * Runtime breaks * Additional post merge fixes * Fix windows setup file * Fix test failures. * Update license header blocks to refer to source eula
This commit is contained in:
@@ -24,20 +24,19 @@ import { once, debounceEvent } from 'vs/base/common/event';
|
||||
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
|
||||
import { IEditorGroupService } from 'vs/workbench/services/group/common/groupService';
|
||||
import { IWindowsService } from 'vs/platform/windows/common/windows';
|
||||
import { getCodeEditor } from 'vs/editor/common/services/codeEditorService';
|
||||
import { getCodeEditor } from 'vs/editor/browser/services/codeEditorService';
|
||||
import { getExcludes, ISearchConfiguration } from 'vs/platform/search/common/search';
|
||||
import { IExpression } from 'vs/base/common/glob';
|
||||
import { ICursorPositionChangedEvent } from 'vs/editor/common/controller/cursorEvents';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ResourceGlobMatcher } from 'vs/workbench/common/resources';
|
||||
import { IEditorRegistry, Extensions } from 'vs/workbench/browser/editor';
|
||||
import { ResourceGlobMatcher } from 'vs/workbench/electron-browser/resources';
|
||||
|
||||
/**
|
||||
* Stores the selection & view state of an editor and allows to compare it to other selection states.
|
||||
*/
|
||||
export class TextEditorState {
|
||||
|
||||
private static EDITOR_SELECTION_THRESHOLD = 10; // number of lines to move in editor to justify for new state
|
||||
private static readonly EDITOR_SELECTION_THRESHOLD = 10; // number of lines to move in editor to justify for new state
|
||||
|
||||
private textEditorSelection: ITextEditorSelection;
|
||||
|
||||
@@ -175,10 +174,10 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
|
||||
|
||||
public _serviceBrand: any;
|
||||
|
||||
private static STORAGE_KEY = 'history.entries';
|
||||
private static MAX_HISTORY_ITEMS = 200;
|
||||
private static MAX_STACK_ITEMS = 20;
|
||||
private static MAX_RECENTLY_CLOSED_EDITORS = 20;
|
||||
private static readonly STORAGE_KEY = 'history.entries';
|
||||
private static readonly MAX_HISTORY_ITEMS = 200;
|
||||
private static readonly MAX_STACK_ITEMS = 20;
|
||||
private static readonly MAX_RECENTLY_CLOSED_EDITORS = 20;
|
||||
|
||||
private stack: IStackEntry[];
|
||||
private index: number;
|
||||
@@ -189,7 +188,6 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
|
||||
private history: (IEditorInput | IResourceInput)[];
|
||||
private recentlyClosedFiles: IRecentlyClosedFile[];
|
||||
private loaded: boolean;
|
||||
private registry: IEditorRegistry;
|
||||
private resourceFilter: ResourceGlobMatcher;
|
||||
|
||||
constructor(
|
||||
@@ -210,7 +208,6 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
|
||||
this.stack = [];
|
||||
this.recentlyClosedFiles = [];
|
||||
this.loaded = false;
|
||||
this.registry = Registry.as<IEditorRegistry>(Extensions.Editors);
|
||||
this.resourceFilter = instantiationService.createInstance(
|
||||
ResourceGlobMatcher,
|
||||
(root: URI) => this.getExcludes(root),
|
||||
@@ -228,7 +225,7 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
|
||||
private getExcludes(root?: URI): IExpression {
|
||||
const scope = root ? { resource: root } : void 0;
|
||||
|
||||
return getExcludes(this.configurationService.getConfiguration<ISearchConfiguration>(scope));
|
||||
return getExcludes(this.configurationService.getValue<ISearchConfiguration>(scope));
|
||||
}
|
||||
|
||||
private registerListeners(): void {
|
||||
@@ -247,8 +244,8 @@ export class HistoryService extends BaseHistoryService implements IHistoryServic
|
||||
|
||||
private onEditorClosed(event: IEditorCloseEvent): void {
|
||||
|
||||
// Track closing of pinned editor to support to reopen closed editors
|
||||
if (event.pinned) {
|
||||
// Track closing of editor to support to reopen closed editors (unless editor was replaced)
|
||||
if (!event.replaced) {
|
||||
const resource = event.editor ? event.editor.getResource() : void 0;
|
||||
const supportsReopen = resource && this.fileService.canHandleResource(resource); // we only support file'ish things to reopen
|
||||
if (supportsReopen) {
|
||||
Reference in New Issue
Block a user