Merge VS Code 1.21 source code (#1067)

* Initial VS Code 1.21 file copy with patches

* A few more merges

* Post npm install

* Fix batch of build breaks

* Fix more build breaks

* Fix more build errors

* Fix more build breaks

* Runtime fixes 1

* Get connection dialog working with some todos

* Fix a few packaging issues

* Copy several node_modules to package build to fix loader issues

* Fix breaks from master

* A few more fixes

* Make tests pass

* First pass of license header updates

* Second pass of license header updates

* Fix restore dialog issues

* Remove add additional themes menu items

* fix select box issues where the list doesn't show up

* formatting

* Fix editor dispose issue

* Copy over node modules to correct location on all platforms
This commit is contained in:
Karl Burtram
2018-04-04 15:27:51 -07:00
committed by GitHub
parent 5fba3e31b4
commit dafb780987
9412 changed files with 141255 additions and 98813 deletions

View File

@@ -14,6 +14,8 @@ import { IEditorControl } from 'vs/platform/editor/common/editor';
import Event, { Emitter } from 'vs/base/common/event';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IConstructorSignature0, IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import DOM = require('vs/base/browser/dom');
import { IDisposable } from 'vs/base/common/lifecycle';
/**
* Composites are layed out in the sidebar and panel part of the workbench. At a time only one composite
@@ -27,6 +29,10 @@ import { IConstructorSignature0, IInstantiationService } from 'vs/platform/insta
*/
export abstract class Composite extends Component implements IComposite {
private _onTitleAreaUpdate: Emitter<void>;
private _onDidFocus: Emitter<void>;
private _focusTracker?: DOM.IFocusTracker;
private _focusListenerDisposable?: IDisposable;
private visible: boolean;
private parent: Builder;
@@ -45,6 +51,7 @@ export abstract class Composite extends Component implements IComposite {
this.visible = false;
this._onTitleAreaUpdate = new Emitter<void>();
this._onDidFocus = new Emitter<void>();
}
public getTitle(): string {
@@ -85,6 +92,14 @@ export abstract class Composite extends Component implements IComposite {
return this.parent;
}
public get onDidFocus(): Event<any> {
this._focusTracker = DOM.trackFocus(this.getContainer().getHTMLElement());
this._focusListenerDisposable = this._focusTracker.onDidFocus(() => {
this._onDidFocus.fire();
});
return this._onDidFocus.event;
}
/**
* Note: Clients should not call this method, the workbench calls this
* method. Calling it otherwise may result in unexpected behavior.
@@ -185,6 +200,15 @@ export abstract class Composite extends Component implements IComposite {
public dispose(): void {
this._onTitleAreaUpdate.dispose();
this._onDidFocus.dispose();
if (this._focusTracker) {
this._focusTracker.dispose();
}
if (this._focusListenerDisposable) {
this._focusListenerDisposable.dispose();
}
super.dispose();
}
@@ -199,6 +223,7 @@ export abstract class CompositeDescriptor<T extends Composite> {
public cssClass: string;
public order: number;
public keybindingId: string;
public enabled: boolean;
private ctor: IConstructorSignature0<T>;
@@ -208,6 +233,7 @@ export abstract class CompositeDescriptor<T extends Composite> {
this.name = name;
this.cssClass = cssClass;
this.order = order;
this.enabled = true;
this.keybindingId = keybindingId;
}