Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -85,7 +85,6 @@ export abstract class PeekViewWidget extends ZoneWidget {
private _onDidClose = new Emitter<PeekViewWidget>();
protected _headElement: HTMLDivElement;
protected _headingIcon: HTMLElement;
protected _primaryHeading: HTMLElement;
protected _secondaryHeading: HTMLElement;
protected _metaHeading: HTMLElement;
@@ -155,18 +154,18 @@ export abstract class PeekViewWidget extends ZoneWidget {
dom.append(this._headElement, titleElement);
dom.addStandardDisposableListener(titleElement, 'click', event => this._onTitleClick(event));
this._headingIcon = dom.$('span');
this._fillTitleIcon(titleElement);
this._primaryHeading = dom.$('span.filename');
this._secondaryHeading = dom.$('span.dirname');
this._metaHeading = dom.$('span.meta');
dom.append(titleElement, this._headingIcon, this._primaryHeading, this._secondaryHeading, this._metaHeading);
dom.append(titleElement, this._primaryHeading, this._secondaryHeading, this._metaHeading);
const actionsContainer = dom.$('.peekview-actions');
dom.append(this._headElement, actionsContainer);
const actionBarOptions = this._getActionBarOptions();
this._actionbarWidget = new ActionBar(actionsContainer, actionBarOptions);
this._disposables.push(this._actionbarWidget);
this._disposables.add(this._actionbarWidget);
this._actionbarWidget.push(new Action('peekview.close', nls.localize('label.close', "Close"), 'close-peekview-action', true, () => {
this.dispose();
@@ -174,6 +173,9 @@ export abstract class PeekViewWidget extends ZoneWidget {
}), { label: false, icon: true });
}
protected _fillTitleIcon(container: HTMLElement): void {
}
protected _getActionBarOptions(): IActionBarOptions {
return {};
}
@@ -182,10 +184,6 @@ export abstract class PeekViewWidget extends ZoneWidget {
// implement me
}
public setTitleIcon(iconClassName: string): void {
this._headingIcon.className = iconClassName ? `icon ${iconClassName}` : '';
}
public setTitle(primaryHeading: string, secondaryHeading?: string): void {
this._primaryHeading.innerHTML = strings.escape(primaryHeading);
this._primaryHeading.setAttribute('aria-label', primaryHeading);