mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 18:46:36 -05:00
This reverts commit d15a3fcc98.
This commit is contained in:
@@ -205,7 +205,7 @@ function parseCLIArgs() {
|
||||
function setCurrentWorkingDirectory() {
|
||||
try {
|
||||
if (process.platform === 'win32') {
|
||||
process.env['VSCODE_CWD'] = process.cwd(); // remember as environment variable
|
||||
process.env['VSCODE_CWD'] = process.cwd(); // remember as environment letiable
|
||||
process.chdir(path.dirname(app.getPath('exe'))); // always set application folder as cwd
|
||||
} else if (process.env['VSCODE_CWD']) {
|
||||
process.chdir(process.env['VSCODE_CWD']);
|
||||
@@ -347,4 +347,4 @@ function getUserDefinedLocale() {
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
//#endregion
|
||||
//#endregion
|
||||
4
src/sql/azdata.proposed.d.ts
vendored
4
src/sql/azdata.proposed.d.ts
vendored
@@ -4488,8 +4488,8 @@ declare module 'azdata' {
|
||||
* }
|
||||
* ```
|
||||
* @export
|
||||
* @param notebook provider
|
||||
* @returns disposable
|
||||
* @param {NotebookProvider} provider
|
||||
* @returns {vscode.Disposable}
|
||||
*/
|
||||
export function registerNotebookProvider(provider: NotebookProvider): vscode.Disposable;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ export class Button extends vsButton {
|
||||
super(container, options);
|
||||
|
||||
this._register(DOM.addDisposableListener(this.element, DOM.EventType.FOCUS, () => {
|
||||
this.element.style.outlineColor = this.buttonFocusOutline ? this.buttonFocusOutline.toString() : '';
|
||||
this.element.style.outlineColor = this.buttonFocusOutline ? this.buttonFocusOutline.toString() : null;
|
||||
this.element.style.outlineWidth = '1px';
|
||||
}));
|
||||
|
||||
|
||||
@@ -41,11 +41,11 @@ export class DropdownList extends Dropdown {
|
||||
if (action) {
|
||||
this.button = new Button(_contentContainer);
|
||||
this.button.label = action.label;
|
||||
this._register(DOM.addDisposableListener(this.button.element, DOM.EventType.CLICK, () => {
|
||||
this.toDispose.push(DOM.addDisposableListener(this.button.element, DOM.EventType.CLICK, () => {
|
||||
action.run();
|
||||
this.hide();
|
||||
}));
|
||||
this._register(DOM.addDisposableListener(this.button.element, DOM.EventType.KEY_DOWN, (e: KeyboardEvent) => {
|
||||
this.toDispose.push(DOM.addDisposableListener(this.button.element, DOM.EventType.KEY_DOWN, (e: KeyboardEvent) => {
|
||||
let event = new StandardKeyboardEvent(e);
|
||||
if (event.equals(KeyCode.Enter)) {
|
||||
e.stopPropagation();
|
||||
@@ -75,7 +75,7 @@ export class DropdownList extends Dropdown {
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(this._list.onSelectionChange(() => {
|
||||
this.toDispose.push(this._list.onSelectionChange(() => {
|
||||
// focus on the dropdown label then hide the dropdown list
|
||||
this.element.focus();
|
||||
this.hide();
|
||||
|
||||
@@ -241,7 +241,7 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
|
||||
}
|
||||
this.onRemoveItems(new ArrayIterator([item.view.id!]));
|
||||
});
|
||||
const disposable = combinedDisposable(onChangeDisposable, containerDisposable);
|
||||
const disposable = combinedDisposable([onChangeDisposable, containerDisposable]);
|
||||
|
||||
const onAdd = view.onAdd ? () => view.onAdd!() : () => { };
|
||||
const onRemove = view.onRemove ? () => view.onRemove!() : () => { };
|
||||
@@ -292,7 +292,7 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
|
||||
const onEndDisposable = onEnd(this.onSashEnd, this);
|
||||
const onDidResetDisposable = sash.onDidReset(() => this._onDidSashReset.fire(firstIndex(this.sashItems, item => item.sash === sash)));
|
||||
|
||||
const disposable = combinedDisposable(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash);
|
||||
const disposable = combinedDisposable([onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash]);
|
||||
const sashItem: ISashItem = { sash, disposable };
|
||||
|
||||
this.sashItems.splice(currentIndex - 1, 0, sashItem);
|
||||
@@ -344,7 +344,7 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
|
||||
}
|
||||
this.onRemoveItems(new ArrayIterator([item.view.id!]));
|
||||
});
|
||||
const disposable = combinedDisposable(onChangeDisposable, containerDisposable);
|
||||
const disposable = combinedDisposable([onChangeDisposable, containerDisposable]);
|
||||
|
||||
const onAdd = view.onAdd ? () => view.onAdd!() : () => { };
|
||||
const onRemove = view.onRemove ? () => view.onRemove!() : () => { };
|
||||
@@ -395,7 +395,7 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
|
||||
const onEndDisposable = onEnd(this.onSashEnd, this);
|
||||
const onDidResetDisposable = sash.onDidReset(() => this._onDidSashReset.fire(firstIndex(this.sashItems, item => item.sash === sash)));
|
||||
|
||||
const disposable = combinedDisposable(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash);
|
||||
const disposable = combinedDisposable([onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash]);
|
||||
const sashItem: ISashItem = { sash, disposable };
|
||||
|
||||
this.sashItems.splice(index - 1, 0, sashItem);
|
||||
@@ -527,10 +527,10 @@ export class ScrollableSplitView extends HeightMap implements IDisposable {
|
||||
const index = firstIndex(this.sashItems, item => item.sash === sash);
|
||||
|
||||
// This way, we can press Alt while we resize a sash, macOS style!
|
||||
const disposable = combinedDisposable(
|
||||
const disposable = combinedDisposable([
|
||||
domEvent(document.body, 'keydown')(e => resetSashDragState(this.sashDragState.current, e.altKey)),
|
||||
domEvent(document.body, 'keyup')(() => resetSashDragState(this.sashDragState.current, false))
|
||||
);
|
||||
]);
|
||||
|
||||
const resetSashDragState = (start: number, alt: boolean) => {
|
||||
const sizes = this.viewItems.map(i => i.size);
|
||||
|
||||
@@ -14,7 +14,7 @@ const defaultOptions: IAutoColumnSizeOptions = {
|
||||
autoSizeOnRender: false
|
||||
};
|
||||
|
||||
export class AutoColumnSize<T extends Object> implements Slick.Plugin<T> {
|
||||
export class AutoColumnSize<T> implements Slick.Plugin<T> {
|
||||
private _grid: Slick.Grid<T>;
|
||||
private _$container: JQuery;
|
||||
private _context: CanvasRenderingContext2D;
|
||||
|
||||
@@ -43,12 +43,13 @@ export class ActionBar extends ActionRunner implements IActionRunner {
|
||||
super();
|
||||
this._options = options;
|
||||
this._context = options.context;
|
||||
this._toDispose = [];
|
||||
|
||||
if (this._options.actionRunner) {
|
||||
this._actionRunner = this._options.actionRunner;
|
||||
} else {
|
||||
this._actionRunner = new ActionRunner();
|
||||
this._register(this._actionRunner);
|
||||
this._toDispose.push(this._actionRunner);
|
||||
}
|
||||
|
||||
//this._toDispose.push(this.addEmitter(this._actionRunner));
|
||||
@@ -364,6 +365,8 @@ export class ActionBar extends ActionRunner implements IActionRunner {
|
||||
lifecycle.dispose(this._items);
|
||||
this._items = [];
|
||||
|
||||
this._toDispose = lifecycle.dispose(this._toDispose);
|
||||
|
||||
this._domNode.remove();
|
||||
|
||||
super.dispose();
|
||||
|
||||
@@ -53,7 +53,7 @@ class AccountPanel extends ViewletPanel {
|
||||
|
||||
protected renderBody(container: HTMLElement): void {
|
||||
this.accountList = new List<azdata.Account>(container, new AccountListDelegate(AccountDialog.ACCOUNTLIST_HEIGHT), [this.instantiationService.createInstance(AccountListRenderer)]);
|
||||
this._register(attachListStyler(this.accountList, this.themeService));
|
||||
this.disposables.push(attachListStyler(this.accountList, this.themeService));
|
||||
}
|
||||
|
||||
protected layoutBody(size: number): void {
|
||||
|
||||
@@ -43,6 +43,7 @@ import * as platform from 'vs/platform/registry/common/platform';
|
||||
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
|
||||
import { ConnectionProfileGroup, IConnectionProfileGroup } from 'sql/platform/connection/common/connectionProfileGroup';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
|
||||
import { IQuickInputService } from 'vs/platform/quickinput/common/quickInput';
|
||||
import { IConnectionDialogService } from 'sql/workbench/services/connection/common/connectionDialogService';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
@@ -50,7 +51,6 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
import * as interfaces from './interfaces';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { Memento } from 'vs/workbench/common/memento';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
||||
export class ConnectionManagementService extends Disposable implements IConnectionManagementService {
|
||||
|
||||
@@ -70,7 +70,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
private _onConnectRequestSent = new Emitter<void>();
|
||||
private _onConnectionChanged = new Emitter<IConnectionParams>();
|
||||
private _onLanguageFlavorChanged = new Emitter<azdata.DidChangeLanguageFlavorParams>();
|
||||
private _connectionGlobalStatus = new ConnectionGlobalStatus(this._notificationService);
|
||||
private _connectionGlobalStatus = new ConnectionGlobalStatus(this._statusBarService);
|
||||
|
||||
private _mementoContext: Memento;
|
||||
private _mementoObj: any;
|
||||
@@ -86,7 +86,7 @@ export class ConnectionManagementService extends Disposable implements IConnecti
|
||||
@IConfigurationService private _configurationService: IConfigurationService,
|
||||
@ICapabilitiesService private _capabilitiesService: ICapabilitiesService,
|
||||
@IQuickInputService private _quickInputService: IQuickInputService,
|
||||
@INotificationService private _notificationService: INotificationService,
|
||||
@IStatusbarService private _statusBarService: IStatusbarService,
|
||||
@IResourceProviderService private _resourceProviderService: IResourceProviderService,
|
||||
@IAngularEventingService private _angularEventing: IAngularEventingService,
|
||||
@IAccountManagementService private _accountManagementService: IAccountManagementService,
|
||||
|
||||
@@ -90,31 +90,23 @@ export class QueryModelService implements IQueryModelService {
|
||||
|
||||
(<statusbar.IStatusbarRegistry>platform.Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor(
|
||||
TimeElapsedStatusBarItem,
|
||||
'status.timeElapsed',
|
||||
nls.localize('status.timeElapsed', "Time Elapsed"),
|
||||
StatusbarAlignment.RIGHT,
|
||||
100 /* Should appear to the right of the SQL editor status */
|
||||
));
|
||||
|
||||
(<statusbar.IStatusbarRegistry>platform.Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor(
|
||||
RowCountStatusBarItem,
|
||||
'status.rowCount',
|
||||
nls.localize('status.rowCount', "Row Count"),
|
||||
StatusbarAlignment.RIGHT,
|
||||
100 /* Should appear to the right of the SQL editor status */
|
||||
));
|
||||
|
||||
(<statusbar.IStatusbarRegistry>platform.Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor(
|
||||
QueryStatusbarItem,
|
||||
'status.query',
|
||||
nls.localize('status.query', "Query"),
|
||||
StatusbarAlignment.RIGHT,
|
||||
100 /* High Priority */
|
||||
));
|
||||
(<statusbar.IStatusbarRegistry>platform.Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor(
|
||||
SqlFlavorStatusbarItem,
|
||||
'status.sqlFlavor',
|
||||
nls.localize('status.sqlFlavor', "SQL Flavor"),
|
||||
StatusbarAlignment.RIGHT,
|
||||
90 /* Should appear to the right of the SQL editor status */
|
||||
));
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import './mainThreadAccountManagement';
|
||||
import './mainThreadBackgroundTaskManagement';
|
||||
import './mainThreadConnectionManagement';
|
||||
import './mainThreadCredentialManagement';
|
||||
import './mainThreadDashboard';
|
||||
import './mainThreadDashboardWebview';
|
||||
import './mainThreadDataProtocol';
|
||||
import './mainThreadExtensionManagement';
|
||||
import './mainThreadModalDialog';
|
||||
import './mainThreadModelView';
|
||||
import './mainThreadModelViewDialog';
|
||||
import './mainThreadNotebook';
|
||||
import './mainThreadNotebookDocumentsAndEditors';
|
||||
import './mainThreadObjectExplorer';
|
||||
import './mainThreadQueryEditor';
|
||||
import './mainThreadResourceProvider';
|
||||
import './mainThreadSerializationProvider';
|
||||
import './mainThreadTasks';
|
||||
@@ -3,8 +3,4 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vsda' {
|
||||
export class signer {
|
||||
sign(arg: any): any;
|
||||
}
|
||||
}
|
||||
import 'sql/workbench/api/electron-browser/mainThreadModalDialog';
|
||||
@@ -40,7 +40,8 @@ import { ExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
|
||||
import { ExtHostConfiguration, ExtHostConfigProvider } from 'vs/workbench/api/common/extHostConfiguration';
|
||||
import { ExtHostStorage } from 'vs/workbench/api/common/extHostStorage';
|
||||
import * as extHostTypes from 'vs/workbench/api/common/extHostTypes';
|
||||
import { IURITransformer } from 'vs/base/common/uriIpc';
|
||||
import { ISchemeTransformer } from 'vs/workbench/api/common/extHostLanguageFeatures';
|
||||
import { AzureResource } from 'sql/platform/accounts/common/interfaces';
|
||||
import { mssqlProviderName } from 'sql/platform/connection/common/constants';
|
||||
|
||||
export interface ISqlExtensionApiFactory {
|
||||
@@ -60,9 +61,10 @@ export function createApiFactory(
|
||||
extensionService: ExtHostExtensionService,
|
||||
logService: ExtHostLogService,
|
||||
extHostStorage: ExtHostStorage,
|
||||
uriTransformer: IURITransformer | null
|
||||
schemeTransformer: ISchemeTransformer | null,
|
||||
outputChannelName: string
|
||||
): ISqlExtensionApiFactory {
|
||||
let vsCodeFactory = extHostApi.createApiFactory(initData, rpcProtocol, extHostWorkspace, extHostConfiguration, extensionService, logService, extHostStorage, uriTransformer);
|
||||
let vsCodeFactory = extHostApi.createApiFactory(initData, rpcProtocol, extHostWorkspace, extHostConfiguration, extensionService, logService, extHostStorage, schemeTransformer, outputChannelName);
|
||||
|
||||
// Addressable instances
|
||||
const extHostAccountManagement = rpcProtocol.set(SqlExtHostContext.ExtHostAccountManagement, new ExtHostAccountManagement(rpcProtocol));
|
||||
|
||||
46
src/sql/workbench/api/node/sqlExtHost.contribution.ts
Normal file
46
src/sql/workbench/api/node/sqlExtHost.contribution.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IWorkbenchContribution, IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
// --- SQL contributions
|
||||
import 'sql/workbench/api/node/mainThreadConnectionManagement';
|
||||
import 'sql/workbench/api/node/mainThreadCredentialManagement';
|
||||
import 'sql/workbench/api/node/mainThreadDataProtocol';
|
||||
import 'sql/workbench/api/node/mainThreadObjectExplorer';
|
||||
import 'sql/workbench/api/node/mainThreadBackgroundTaskManagement';
|
||||
import 'sql/workbench/api/node/mainThreadSerializationProvider';
|
||||
import 'sql/workbench/api/node/mainThreadResourceProvider';
|
||||
import 'sql/workbench/api/electron-browser/mainThreadTasks';
|
||||
import 'sql/workbench/api/electron-browser/mainThreadDashboard';
|
||||
import 'sql/workbench/api/node/mainThreadDashboardWebview';
|
||||
import 'sql/workbench/api/node/mainThreadQueryEditor';
|
||||
import 'sql/workbench/api/node/mainThreadModelView';
|
||||
import 'sql/workbench/api/node/mainThreadModelViewDialog';
|
||||
import 'sql/workbench/api/node/mainThreadNotebook';
|
||||
import 'sql/workbench/api/node/mainThreadNotebookDocumentsAndEditors';
|
||||
import 'sql/workbench/api/node/mainThreadAccountManagement';
|
||||
import 'sql/workbench/api/node/mainThreadExtensionManagement';
|
||||
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
|
||||
|
||||
export class SqlExtHostContribution implements IWorkbenchContribution {
|
||||
|
||||
constructor(
|
||||
@IInstantiationService private instantiationService: IInstantiationService
|
||||
) {
|
||||
}
|
||||
|
||||
public getId(): string {
|
||||
return 'sql.api.sqlExtHost';
|
||||
}
|
||||
}
|
||||
|
||||
// Register File Tracker
|
||||
Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).registerWorkbenchContribution(
|
||||
SqlExtHostContribution,
|
||||
LifecyclePhase.Restored
|
||||
);
|
||||
@@ -14,7 +14,7 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { TreeItemCollapsibleState, ITreeViewDataProvider, TreeViewItemHandleArg, ViewContainer, ITreeItemLabel } from 'vs/workbench/common/views';
|
||||
import { FileIconThemableWorkbenchTree } from 'vs/workbench/browser/parts/views/viewsViewlet';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService2 } from 'vs/platform/progress/common/progress';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
@@ -160,7 +160,7 @@ export class CustomTreeView extends Disposable implements ITreeView {
|
||||
@IInstantiationService private instantiationService: IInstantiationService,
|
||||
@ICommandService private commandService: ICommandService,
|
||||
@IConfigurationService private configurationService: IConfigurationService,
|
||||
@IProgressService private progressService: IProgressService
|
||||
@IProgressService2 private progressService: IProgressService2
|
||||
) {
|
||||
super();
|
||||
this.root = new Root();
|
||||
@@ -516,7 +516,7 @@ class TreeDataSource implements IDataSource {
|
||||
private treeView: ITreeView,
|
||||
private container: ViewContainer,
|
||||
private id: string,
|
||||
@IProgressService private progressService: IProgressService,
|
||||
@IProgressService2 private progressService: IProgressService2,
|
||||
@IOEShimService private objectExplorerService: IOEShimService
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import { IModelService } from 'vs/editor/common/services/modelService';
|
||||
import { ComponentBase } from 'sql/workbench/electron-browser/modelComponents/componentBase';
|
||||
import { IComponent, IComponentDescriptor, IModelStore } from 'sql/workbench/electron-browser/modelComponents/interfaces';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { SimpleLocalProgressService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { SimpleProgressService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { TextDiffEditor } from 'vs/workbench/browser/parts/editor/textDiffEditor';
|
||||
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
|
||||
@@ -70,7 +70,7 @@ export default class DiffEditorComponent extends ComponentBase implements ICompo
|
||||
}
|
||||
|
||||
private _createEditor(): void {
|
||||
this._instantiationService = this._instantiationService.createChild(new ServiceCollection([IProgressService, new SimpleLocalProgressService()]));
|
||||
this._instantiationService = this._instantiationService.createChild(new ServiceCollection([IProgressService, new SimpleProgressService()]));
|
||||
this._editor = this._instantiationService.createInstance(TextDiffEditor);
|
||||
this._editor.reverseColoring();
|
||||
this._editor.create(this._el.nativeElement);
|
||||
|
||||
@@ -21,7 +21,7 @@ import { ComponentBase } from 'sql/workbench/electron-browser/modelComponents/co
|
||||
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/workbench/electron-browser/modelComponents/interfaces';
|
||||
import { QueryTextEditor } from 'sql/workbench/electron-browser/modelComponents/queryTextEditor';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { SimpleLocalProgressService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { SimpleProgressService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
|
||||
@Component({
|
||||
@@ -59,7 +59,7 @@ export default class EditorComponent extends ComponentBase implements IComponent
|
||||
}
|
||||
|
||||
private _createEditor(): void {
|
||||
let instantiationService = this._instantiationService.createChild(new ServiceCollection([IProgressService, new SimpleLocalProgressService()]));
|
||||
let instantiationService = this._instantiationService.createChild(new ServiceCollection([IProgressService, new SimpleProgressService()]));
|
||||
this._editor = instantiationService.createInstance(QueryTextEditor);
|
||||
this._editor.create(this._el.nativeElement);
|
||||
this._editor.setVisible(true);
|
||||
|
||||
@@ -19,8 +19,6 @@ import { ConnectionStatusbarItem } from 'sql/workbench/parts/connection/browser/
|
||||
// Register Statusbar item
|
||||
(<statusbar.IStatusbarRegistry>Registry.as(statusbar.Extensions.Statusbar)).registerStatusbarItem(new statusbar.StatusbarItemDescriptor(
|
||||
ConnectionStatusbarItem,
|
||||
'status.connection',
|
||||
localize('status.connection', "Connection"),
|
||||
StatusbarAlignment.RIGHT,
|
||||
100 /* High Priority */
|
||||
));
|
||||
|
||||
@@ -40,7 +40,7 @@ export class ConnectionStatusbarItem implements IStatusbarItem {
|
||||
this._objectExplorerService.onSelectionOrFocusChange(() => this._updateStatus())
|
||||
);
|
||||
|
||||
return combinedDisposable(...this._toDispose);
|
||||
return combinedDisposable(this._toDispose);
|
||||
}
|
||||
|
||||
// Update the connection status shown in the bar
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import { ConnectionSummary } from 'azdata';
|
||||
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
|
||||
import * as LocalizedConstants from 'sql/workbench/parts/connection/common/localizedConstants';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
||||
// Status when making connections from the viewlet
|
||||
export class ConnectionGlobalStatus {
|
||||
@@ -12,12 +12,12 @@ export class ConnectionGlobalStatus {
|
||||
private _displayTime: number = 5000; // (in ms)
|
||||
|
||||
constructor(
|
||||
@INotificationService private _notificationService: INotificationService
|
||||
@IStatusbarService private _statusBarService: IStatusbarService
|
||||
) {
|
||||
}
|
||||
|
||||
public setStatusToConnected(connectionSummary: ConnectionSummary): void {
|
||||
if (this._notificationService) {
|
||||
if (this._statusBarService) {
|
||||
let text: string;
|
||||
let connInfo: string = connectionSummary.serverName;
|
||||
if (connInfo) {
|
||||
@@ -28,13 +28,13 @@ export class ConnectionGlobalStatus {
|
||||
}
|
||||
text = LocalizedConstants.onDidConnectMessage + ' ' + connInfo;
|
||||
}
|
||||
this._notificationService.status(text, { hideAfter: this._displayTime });
|
||||
this._statusBarService.setStatusMessage(text, this._displayTime);
|
||||
}
|
||||
}
|
||||
|
||||
public setStatusToDisconnected(fileUri: string): void {
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(LocalizedConstants.onDidDisconnectMessage, { hideAfter: this._displayTime });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(LocalizedConstants.onDidDisconnectMessage, this._displayTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import { generateUuid } from 'vs/base/common/uuid';
|
||||
import { $ } from 'vs/base/browser/dom';
|
||||
import { ExecuteCommandAction } from 'vs/platform/actions/common/actions';
|
||||
import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { ILocalProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
|
||||
export class ObjectMetadataWrapper implements ObjectMetadata {
|
||||
public metadataType: MetadataType;
|
||||
@@ -111,7 +111,7 @@ export class ExplorerController extends TreeDefaults.DefaultController {
|
||||
private _contextMenuService: IContextMenuService,
|
||||
private _capabilitiesService: ICapabilitiesService,
|
||||
private _instantiationService: IInstantiationService,
|
||||
private _progressService: ILocalProgressService
|
||||
private _progressService: IProgressService
|
||||
) {
|
||||
super();
|
||||
}
|
||||
@@ -424,7 +424,7 @@ class ExplorerScriptSelectAction extends ScriptSelectAction {
|
||||
@IQueryEditorService queryEditorService: IQueryEditorService,
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IScriptingService scriptingService: IScriptingService,
|
||||
@ILocalProgressService private progressService: ILocalProgressService
|
||||
@IProgressService private progressService: IProgressService
|
||||
) {
|
||||
super(id, label, queryEditorService, connectionManagementService, scriptingService);
|
||||
}
|
||||
@@ -443,7 +443,7 @@ class ExplorerScriptCreateAction extends ScriptCreateAction {
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IScriptingService scriptingService: IScriptingService,
|
||||
@IErrorMessageService errorMessageService: IErrorMessageService,
|
||||
@ILocalProgressService private progressService: ILocalProgressService
|
||||
@IProgressService private progressService: IProgressService
|
||||
) {
|
||||
super(id, label, queryEditorService, connectionManagementService, scriptingService, errorMessageService);
|
||||
}
|
||||
@@ -462,7 +462,7 @@ class ExplorerScriptAlterAction extends ScriptAlterAction {
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IScriptingService scriptingService: IScriptingService,
|
||||
@IErrorMessageService errorMessageService: IErrorMessageService,
|
||||
@ILocalProgressService private progressService: ILocalProgressService
|
||||
@IProgressService private progressService: IProgressService
|
||||
) {
|
||||
super(id, label, queryEditorService, connectionManagementService, scriptingService, errorMessageService);
|
||||
}
|
||||
@@ -481,7 +481,7 @@ class ExplorerScriptExecuteAction extends ScriptExecuteAction {
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IScriptingService scriptingService: IScriptingService,
|
||||
@IErrorMessageService errorMessageService: IErrorMessageService,
|
||||
@ILocalProgressService private progressService: ILocalProgressService
|
||||
@IProgressService private progressService: IProgressService
|
||||
) {
|
||||
super(id, label, queryEditorService, connectionManagementService, scriptingService, errorMessageService);
|
||||
}
|
||||
@@ -498,7 +498,7 @@ class ExplorerManageAction extends ManageAction {
|
||||
id: string, label: string,
|
||||
@IConnectionManagementService connectionManagementService: IConnectionManagementService,
|
||||
@IAngularEventingService angularEventingService: IAngularEventingService,
|
||||
@ILocalProgressService private _progressService: ILocalProgressService
|
||||
@IProgressService private _progressService: IProgressService
|
||||
) {
|
||||
super(id, label, connectionManagementService, angularEventingService);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import 'vs/css!sql/media/objectTypes/objecttypes';
|
||||
import 'vs/css!sql/media/icons/common-icons';
|
||||
import 'vs/css!./media/explorerWidget';
|
||||
|
||||
import { Component, Inject, forwardRef, OnInit, ViewChild, ElementRef } from '@angular/core';
|
||||
import { Component, Inject, forwardRef, ChangeDetectorRef, OnInit, ViewChild, ElementRef } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
import { DashboardWidget, IDashboardWidget, WidgetConfig, WIDGET_CONFIG } from 'sql/workbench/parts/dashboard/common/dashboardWidget';
|
||||
@@ -26,7 +26,7 @@ import { Delayer } from 'vs/base/common/async';
|
||||
import { IContextViewService, IContextMenuService } from 'vs/platform/contextview/browser/contextView';
|
||||
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ILocalProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
||||
|
||||
@Component({
|
||||
@@ -58,6 +58,7 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
constructor(
|
||||
@Inject(forwardRef(() => CommonServiceInterface)) private _bootstrap: CommonServiceInterface,
|
||||
@Inject(forwardRef(() => Router)) private _router: Router,
|
||||
@Inject(forwardRef(() => ChangeDetectorRef)) private _changeRef: ChangeDetectorRef,
|
||||
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
|
||||
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
|
||||
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
|
||||
@@ -65,7 +66,7 @@ export class ExplorerWidget extends DashboardWidget implements IDashboardWidget,
|
||||
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
|
||||
@Inject(IContextMenuService) private contextMenuService: IContextMenuService,
|
||||
@Inject(ICapabilitiesService) private capabilitiesService: ICapabilitiesService,
|
||||
@Inject(ILocalProgressService) private progressService: ILocalProgressService
|
||||
@Inject(IProgressService) private progressService: IProgressService
|
||||
) {
|
||||
super();
|
||||
this.init();
|
||||
|
||||
@@ -128,6 +128,7 @@ export class ConnectionViewletPanel extends ViewletPanel {
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this.disposables = dispose(this.disposables);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ICustomViewDescriptor, TreeViewItemHandleArg } from 'sql/workbench/comm
|
||||
import { IQueryEditorService } from 'sql/workbench/services/queryEditor/common/queryEditorService';
|
||||
import { CommandsRegistry } from 'vs/platform/commands/common/commands';
|
||||
import { IViewsRegistry, Extensions } from 'vs/workbench/common/views';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService2 } from 'vs/platform/progress/common/progress';
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
|
||||
export const DISCONNECT_COMMAND_ID = 'dataExplorer.disconnect';
|
||||
@@ -82,7 +82,7 @@ CommandsRegistry.registerCommand({
|
||||
CommandsRegistry.registerCommand({
|
||||
id: REFRESH_COMMAND_ID,
|
||||
handler: (accessor, args: TreeViewItemHandleArg) => {
|
||||
const progressSerivce = accessor.get(IProgressService);
|
||||
const progressSerivce = accessor.get(IProgressService2);
|
||||
if (args.$treeItem) {
|
||||
const { treeView } = (<ICustomViewDescriptor>Registry.as<IViewsRegistry>(Extensions.ViewsRegistry).getView(args.$treeViewId));
|
||||
if (args.$treeContainerId) {
|
||||
|
||||
@@ -56,11 +56,12 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
this._setup = false;
|
||||
this._stopButtonEnabled = false;
|
||||
this._refreshButtonEnabled = false;
|
||||
this._toDispose = [];
|
||||
this._useQueryFilter = false;
|
||||
|
||||
// re-emit sql editor events through this editor if it exists
|
||||
if (this._sql) {
|
||||
this._register(this._sql.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
|
||||
this._toDispose.push(this._sql.onDidChangeDirty(() => this._onDidChangeDirty.fire()));
|
||||
this._sql.disableSaving();
|
||||
}
|
||||
this.disableSaving();
|
||||
@@ -73,7 +74,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
let self = this;
|
||||
|
||||
// Register callbacks for the Actions
|
||||
this._register(
|
||||
this._toDispose.push(
|
||||
this._queryModelService.onRunQueryStart(uri => {
|
||||
if (self.uri === uri) {
|
||||
self.initEditStart();
|
||||
@@ -81,7 +82,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
})
|
||||
);
|
||||
|
||||
this._register(
|
||||
this._toDispose.push(
|
||||
this._queryModelService.onEditSessionReady((result) => {
|
||||
if (self.uri === result.ownerUri) {
|
||||
self.initEditEnd(result);
|
||||
@@ -209,6 +210,7 @@ export class EditDataInput extends EditorInput implements IConnectableInput {
|
||||
this._queryModelService.disposeQuery(this.uri);
|
||||
this._sql.dispose();
|
||||
this._results.dispose();
|
||||
this._toDispose = dispose(this._toDispose);
|
||||
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import { NotebookModel } from 'sql/workbench/parts/notebook/models/notebookModel
|
||||
import { IColorTheme, IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
|
||||
import * as themeColors from 'vs/workbench/common/theme';
|
||||
import { ServiceCollection } from 'vs/platform/instantiation/common/serviceCollection';
|
||||
import { SimpleLocalProgressService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { SimpleProgressService } from 'vs/editor/standalone/browser/simpleServices';
|
||||
import { IProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ITextModel } from 'vs/editor/common/model';
|
||||
@@ -189,7 +189,7 @@ export class CodeComponent extends AngularDisposable implements OnInit, OnChange
|
||||
}
|
||||
|
||||
private async createEditor(): Promise<void> {
|
||||
let instantiationService = this._instantiationService.createChild(new ServiceCollection([IProgressService, new SimpleLocalProgressService()]));
|
||||
let instantiationService = this._instantiationService.createChild(new ServiceCollection([IProgressService, new SimpleProgressService()]));
|
||||
this._editor = instantiationService.createInstance(QueryTextEditor);
|
||||
this._editor.create(this.codeElement.nativeElement);
|
||||
this._editor.setVisible(true);
|
||||
|
||||
@@ -7,8 +7,8 @@ import 'vs/css!./notebook';
|
||||
import { registerThemingParticipant, ITheme, ICssStyleCollector } from 'vs/platform/theme/common/themeService';
|
||||
import { SIDE_BAR_BACKGROUND, SIDE_BAR_SECTION_HEADER_BACKGROUND, EDITOR_GROUP_HEADER_TABS_BACKGROUND } from 'vs/workbench/common/theme';
|
||||
import { activeContrastBorder, contrastBorder, buttonBackground, textLinkForeground, textLinkActiveForeground, textPreformatForeground, textBlockQuoteBackground, textBlockQuoteBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { IDisposable } from 'vscode-xterm';
|
||||
import { editorLineHighlight, editorLineHighlightBorder } from 'vs/editor/common/view/editorColorRegistry';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export function registerNotebookThemes(overrideEditorThemeSetting: boolean): IDisposable {
|
||||
return registerThemingParticipant((theme: ITheme, collector: ICssStyleCollector) => {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { ITree } from 'vs/base/parts/tree/browser/tree';
|
||||
import { ConnectionProfile } from 'sql/platform/connection/common/connectionProfile';
|
||||
import { IObjectExplorerService } from 'sql/workbench/services/objectExplorer/common/objectExplorerService';
|
||||
|
||||
import { IProgressService, IProgressRunner, ILocalProgressService } from 'vs/platform/progress/common/progress';
|
||||
import { IProgressService, IProgressRunner } from 'vs/platform/progress/common/progress';
|
||||
import { TreeNode } from 'sql/workbench/parts/objectExplorer/common/treeNode';
|
||||
import { TreeUpdateUtils } from 'sql/workbench/parts/objectExplorer/browser/treeUpdateUtils';
|
||||
|
||||
@@ -18,7 +18,7 @@ export class TreeSelectionHandler {
|
||||
private _clicks: number = 0;
|
||||
private _doubleClickTimeoutTimer: NodeJS.Timer = undefined;
|
||||
|
||||
constructor(@ILocalProgressService private _progressService: ILocalProgressService) {
|
||||
constructor(@IProgressService private _progressService: IProgressService) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ export class ProfilerTableEditor extends BaseEditor implements IProfilerControll
|
||||
: localize('ProfilerTableEditor.eventCount', 'Events: {0}', this._input.data.getLength());
|
||||
|
||||
this._disposeStatusbarItem();
|
||||
this._statusbarItem = this._statusbarService.addEntry({ text: message }, 'status.eventCount', localize('status.eventCount', "Event Count"), StatusbarAlignment.RIGHT);
|
||||
this._statusbarItem = this._statusbarService.addEntry({ text: message }, StatusbarAlignment.RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export class SqlFlavorStatusbarItem implements IStatusbarItem {
|
||||
this._editorService.onDidVisibleEditorsChange(() => this._onEditorsChanged()),
|
||||
this._editorService.onDidCloseEditor(event => this._onEditorClosed(event))
|
||||
);
|
||||
return combinedDisposable(...this._toDispose);
|
||||
return combinedDisposable(this._toDispose);
|
||||
}
|
||||
|
||||
private _onSelectionClick() {
|
||||
|
||||
@@ -156,7 +156,7 @@ export class QueryEditor extends BaseEditor {
|
||||
|
||||
this.setTaskbarContent();
|
||||
|
||||
this._register(this.configurationService.onDidChangeConfiguration(e => {
|
||||
this._toDispose.push(this.configurationService.onDidChangeConfiguration(e => {
|
||||
if (e.affectedKeys.includes('workbench.enablePreviewFeatures')) {
|
||||
this.setTaskbarContent();
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ export class QueryStatusbarItem implements IStatusbarItem {
|
||||
this._editorService.onDidCloseEditor(event => this._onEditorClosed(event))
|
||||
);
|
||||
|
||||
return combinedDisposable(...this._toDispose);
|
||||
return combinedDisposable(this._toDispose);
|
||||
}
|
||||
|
||||
private _onEditorClosed(event: IEditorCloseEvent): void {
|
||||
|
||||
@@ -40,7 +40,7 @@ export class RowCountStatusBarItem implements IStatusbarItem {
|
||||
|
||||
this._showStatus();
|
||||
|
||||
return combinedDisposable(...disposables);
|
||||
return combinedDisposable(disposables);
|
||||
}
|
||||
|
||||
private _onEditorsChanged() {
|
||||
|
||||
@@ -43,7 +43,7 @@ export class TimeElapsedStatusBarItem implements IStatusbarItem {
|
||||
|
||||
this._showStatus();
|
||||
|
||||
return combinedDisposable(...disposables);
|
||||
return combinedDisposable(disposables);
|
||||
}
|
||||
|
||||
private _onEditorsChanged() {
|
||||
|
||||
@@ -69,8 +69,6 @@ export class AccountManagementService implements IAccountManagementService {
|
||||
// Register status bar item
|
||||
let statusbarDescriptor = new statusbar.StatusbarItemDescriptor(
|
||||
AccountListStatusbarItem,
|
||||
'status.accountList',
|
||||
localize('status.accountList', "Account List"),
|
||||
StatusbarAlignment.LEFT,
|
||||
15000 /* Highest Priority */
|
||||
);
|
||||
|
||||
@@ -22,11 +22,11 @@ import { ICommandService } from 'vs/platform/commands/common/commands';
|
||||
import { ipcRenderer as ipc } from 'electron';
|
||||
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { IStatusbarService } from 'vs/platform/statusbar/common/statusbar';
|
||||
import { localize } from 'vs/nls';
|
||||
import { QueryInput } from 'sql/workbench/parts/query/common/queryInput';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
|
||||
export class CommandLineService implements ICommandLineProcessing {
|
||||
public _serviceBrand: any;
|
||||
@@ -40,7 +40,7 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
@IEditorService private _editorService: IEditorService,
|
||||
@ICommandService private _commandService: ICommandService,
|
||||
@IConfigurationService private _configurationService: IConfigurationService,
|
||||
@INotificationService private _notificationService: INotificationService,
|
||||
@IStatusbarService private _statusBarService: IStatusbarService,
|
||||
@ILogService private logService: ILogService
|
||||
) {
|
||||
if (ipc) {
|
||||
@@ -92,8 +92,8 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
}
|
||||
let connectedContext: azdata.ConnectedContext = undefined;
|
||||
if (profile) {
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(localize('connectingLabel', 'Connecting: {0}', profile.serverName), { hideAfter: 2500 });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(localize('connectingLabel', 'Connecting:') + profile.serverName, 2500);
|
||||
}
|
||||
try {
|
||||
await this._connectionManagementService.connectIfNotConnected(profile, 'connection', true);
|
||||
@@ -106,8 +106,8 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
}
|
||||
}
|
||||
if (commandName) {
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(localize('runningCommandLabel', 'Running command: {0}', commandName), { hideAfter: 2500 });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(localize('runningCommandLabel', 'Running command:') + commandName, 2500);
|
||||
}
|
||||
await this._commandService.executeCommand(commandName, connectedContext);
|
||||
} else if (profile) {
|
||||
@@ -119,8 +119,8 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
}
|
||||
else {
|
||||
// Default to showing new query
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(localize('openingNewQueryLabel', 'Opening new query: {0}', profile.serverName), { hideAfter: 2500 });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(localize('openingNewQueryLabel', 'Opening new query:') + profile.serverName, 2500);
|
||||
}
|
||||
try {
|
||||
await TaskUtilities.newQuery(profile,
|
||||
@@ -150,8 +150,8 @@ export class CommandLineService implements ICommandLineProcessing {
|
||||
showConnectionDialogOnError: warnOnConnectFailure,
|
||||
showFirewallRuleOnError: warnOnConnectFailure
|
||||
};
|
||||
if (this._notificationService) {
|
||||
this._notificationService.status(localize('connectingQueryLabel', 'Connecting query file'), { hideAfter: 2500 });
|
||||
if (this._statusBarService) {
|
||||
this._statusBarService.setStatusMessage(localize('connectingQueryLabel', 'Connecting query file'), 2500);
|
||||
}
|
||||
await this._connectionManagementService.connect(profile, uriString, options);
|
||||
}
|
||||
|
||||
@@ -451,6 +451,10 @@ export class ConnectionDialogWidget extends Modal {
|
||||
this.onProviderTypeSelected(displayName);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this._toDispose.forEach(obj => obj.dispose());
|
||||
}
|
||||
|
||||
public set databaseDropdownExpanded(val: boolean) {
|
||||
this._databaseDropdownExpanded = val;
|
||||
}
|
||||
|
||||
@@ -45,8 +45,7 @@ class TestEnvironmentService implements IWorkbenchEnvironmentService {
|
||||
appNameLong: string;
|
||||
appQuality?: string;
|
||||
appSettingsHome: string;
|
||||
|
||||
settingsResource: URI;
|
||||
appSettingsPath: string;
|
||||
appKeybindingsPath: string;
|
||||
settingsSearchBuildId?: number;
|
||||
settingsSearchUrl?: string;
|
||||
|
||||
@@ -12,7 +12,7 @@ import { TestRPCProtocol } from 'vs/workbench/test/electron-browser/api/testRPCP
|
||||
import { TestInstantiationService } from 'vs/platform/instantiation/test/common/instantiationServiceMock';
|
||||
import { IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier';
|
||||
import { SqlMainContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { MainThreadAccountManagement } from 'sql/workbench/api/browser/mainThreadAccountManagement';
|
||||
import { MainThreadAccountManagement } from 'sql/workbench/api/node/mainThreadAccountManagement';
|
||||
import { IAccountManagementService, AzureResource } from 'sql/platform/accounts/common/interfaces';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import { TestInstantiationService } from 'vs/platform/instantiation/test/common/
|
||||
import { ExtHostCredentialManagement } from 'sql/workbench/api/node/extHostCredentialManagement';
|
||||
import { SqlMainContext } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { IRPCProtocol } from 'vs/workbench/services/extensions/common/proxyIdentifier';
|
||||
import { MainThreadCredentialManagement } from 'sql/workbench/api/browser/mainThreadCredentialManagement';
|
||||
import { MainThreadCredentialManagement } from 'sql/workbench/api/node/mainThreadCredentialManagement';
|
||||
import { CredentialsTestProvider, CredentialsTestService } from 'sqltest/stubs/credentialsTestStubs';
|
||||
import { ICredentialsService } from 'sql/platform/credentials/common/credentialsService';
|
||||
import { Credential, CredentialProvider } from 'azdata';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { Mock, It, Times } from 'typemoq';
|
||||
import { MainThreadBackgroundTaskManagement, TaskStatus } from 'sql/workbench/api/browser/mainThreadBackgroundTaskManagement';
|
||||
import { MainThreadBackgroundTaskManagement, TaskStatus } from 'sql/workbench/api/node/mainThreadBackgroundTaskManagement';
|
||||
import { ExtHostBackgroundTaskManagementShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { ITaskService } from 'sql/platform/tasks/common/tasksService';
|
||||
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { Mock, It, Times } from 'typemoq';
|
||||
import { MainThreadModelViewDialog } from 'sql/workbench/api/browser/mainThreadModelViewDialog';
|
||||
import { MainThreadModelViewDialog } from 'sql/workbench/api/node/mainThreadModelViewDialog';
|
||||
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
import { IModelViewButtonDetails, IModelViewTabDetails, IModelViewDialogDetails, IModelViewWizardPageDetails, IModelViewWizardDetails, DialogMessage, MessageLevel } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
import { CustomDialogService } from 'sql/platform/dialog/customDialogService';
|
||||
|
||||
@@ -12,7 +12,7 @@ import { URI, UriComponents } from 'vs/base/common/uri';
|
||||
import { IExtHostContext } from 'vs/workbench/api/common/extHost.protocol';
|
||||
|
||||
import { ExtHostNotebookShape } from 'sql/workbench/api/node/sqlExtHost.protocol';
|
||||
import { MainThreadNotebook } from 'sql/workbench/api/browser/mainThreadNotebook';
|
||||
import { MainThreadNotebook } from 'sql/workbench/api/node/mainThreadNotebook';
|
||||
import { NotebookService } from 'sql/workbench/services/notebook/common/notebookServiceImpl';
|
||||
import { INotebookProvider } from 'sql/workbench/services/notebook/common/notebookService';
|
||||
import { INotebookManagerDetails, INotebookSessionDetails, INotebookKernelDetails, INotebookFutureDetails } from 'sql/workbench/api/common/sqlExtHostTypes';
|
||||
|
||||
1059
src/typings/electron.d.ts
vendored
1059
src/typings/electron.d.ts
vendored
File diff suppressed because it is too large
Load Diff
33
src/typings/onigasm-umd.d.ts
vendored
33
src/typings/onigasm-umd.d.ts
vendored
@@ -1,33 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module "onigasm-umd" {
|
||||
|
||||
function loadWASM(data: string | ArrayBuffer): Promise<void>;
|
||||
|
||||
class OnigString {
|
||||
constructor(content: string);
|
||||
readonly content: string;
|
||||
readonly dispose?: () => void;
|
||||
}
|
||||
|
||||
class OnigScanner {
|
||||
constructor(patterns: string[]);
|
||||
findNextMatchSync(string: string | OnigString, startPosition: number): IOnigMatch;
|
||||
}
|
||||
|
||||
export interface IOnigCaptureIndex {
|
||||
index: number
|
||||
start: number
|
||||
end: number
|
||||
length: number
|
||||
}
|
||||
|
||||
export interface IOnigMatch {
|
||||
index: number
|
||||
captureIndices: IOnigCaptureIndex[]
|
||||
scanner: OnigScanner
|
||||
}
|
||||
}
|
||||
7
src/typings/require.d.ts
vendored
7
src/typings/require.d.ts
vendored
@@ -17,12 +17,7 @@ declare const enum LoaderEventType {
|
||||
NodeEndEvaluatingScript = 32,
|
||||
|
||||
NodeBeginNativeRequire = 33,
|
||||
NodeEndNativeRequire = 34,
|
||||
|
||||
CachedDataFound = 60,
|
||||
CachedDataMissed = 61,
|
||||
CachedDataRejected = 62,
|
||||
CachedDataCreated = 63,
|
||||
NodeEndNativeRequire = 34
|
||||
}
|
||||
|
||||
declare class LoaderEvent {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
/// <reference lib="dom"/>
|
||||
|
||||
declare module 'xterm' {
|
||||
declare module 'vscode-xterm' {
|
||||
/**
|
||||
* A string representing text font weight.
|
||||
*/
|
||||
@@ -76,6 +76,31 @@ declare module 'xterm' {
|
||||
*/
|
||||
drawBoldTextInBrightColors?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to enable the rendering of bold text.
|
||||
*
|
||||
* @deprecated Use fontWeight and fontWeightBold instead.
|
||||
*/
|
||||
enableBold?: boolean;
|
||||
|
||||
/**
|
||||
* What character atlas implementation to use. The character atlas caches drawn characters,
|
||||
* speeding up rendering significantly. However, it can introduce some minor rendering
|
||||
* artifacts.
|
||||
*
|
||||
* - 'none': Don't use an atlas.
|
||||
* - 'static': Generate an atlas when the terminal starts or is reconfigured. This atlas will
|
||||
* only contain ASCII characters in 16 colors.
|
||||
* - 'dynamic': Generate an atlas using a LRU cache as characters are requested. Limited to
|
||||
* ASCII characters (for now), but supports 256 colors. For characters covered by the static
|
||||
* cache, it's slightly slower in comparison, since there's more overhead involved in
|
||||
* managing the cache.
|
||||
*
|
||||
* Currently defaults to 'static'. This option may be removed in the future. If it is, passed
|
||||
* parameters will be ignored.
|
||||
*/
|
||||
experimentalCharAtlas?: 'none' | 'static' | 'dynamic';
|
||||
|
||||
/**
|
||||
* The font size used to render text.
|
||||
*/
|
||||
@@ -681,6 +706,13 @@ declare module 'xterm' {
|
||||
*/
|
||||
dispose(): void;
|
||||
|
||||
/**
|
||||
* Destroys the terminal and detaches it from the DOM.
|
||||
*
|
||||
* @deprecated Use dispose() instead.
|
||||
*/
|
||||
destroy(): void;
|
||||
|
||||
/**
|
||||
* Scroll the display of the terminal
|
||||
* @param amount The number of lines to scroll down (negative scroll up).
|
||||
@@ -743,7 +775,7 @@ declare module 'xterm' {
|
||||
* Retrieves an option's value from the terminal.
|
||||
* @param key The option key.
|
||||
*/
|
||||
getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean;
|
||||
getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode'): boolean;
|
||||
/**
|
||||
* Retrieves an option's value from the terminal.
|
||||
* @param key The option key.
|
||||
@@ -794,7 +826,7 @@ declare module 'xterm' {
|
||||
* @param key The option key.
|
||||
* @param value The option value.
|
||||
*/
|
||||
setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void;
|
||||
setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'debug' | 'disableStdin' | 'enableBold' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'screenKeys' | 'useFlowControl' | 'visualBell' | 'windowsMode', value: boolean): void;
|
||||
/**
|
||||
* Sets an option on the terminal.
|
||||
* @param key The option key.
|
||||
@@ -950,7 +982,7 @@ declare module 'xterm' {
|
||||
*
|
||||
* @param x The character index to get.
|
||||
*/
|
||||
getCell(x: number): IBufferCell | undefined;
|
||||
getCell(x: number): IBufferCell;
|
||||
|
||||
/**
|
||||
* Gets the line as a string. Note that this is gets only the string for the line, not taking
|
||||
@@ -981,10 +1013,8 @@ declare module 'xterm' {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Modifications to official .d.ts below
|
||||
declare module 'xterm' {
|
||||
declare module 'vscode-xterm' {
|
||||
interface TerminalCore {
|
||||
debug: boolean;
|
||||
|
||||
@@ -1007,7 +1037,42 @@ declare module 'xterm' {
|
||||
fire(e: T): void;
|
||||
}
|
||||
|
||||
interface ISearchOptions {
|
||||
/**
|
||||
* Whether the find should be done as a regex.
|
||||
*/
|
||||
regex?: boolean;
|
||||
/**
|
||||
* Whether only whole words should match.
|
||||
*/
|
||||
wholeWord?: boolean;
|
||||
/**
|
||||
* Whether find should pay attention to case.
|
||||
*/
|
||||
caseSensitive?: boolean;
|
||||
}
|
||||
|
||||
interface Terminal {
|
||||
_core: TerminalCore;
|
||||
|
||||
webLinksInit(handler?: (event: MouseEvent, uri: string) => void, options?: ILinkMatcherOptions): void;
|
||||
|
||||
/**
|
||||
* Find the next instance of the term, then scroll to and select it. If it
|
||||
* doesn't exist, do nothing.
|
||||
* @param term The search term.
|
||||
* @param findOptions Regex, whole word, and case sensitive options.
|
||||
* @return Whether a result was found.
|
||||
*/
|
||||
findNext(term: string, findOptions: ISearchOptions): boolean;
|
||||
|
||||
/**
|
||||
* Find the previous instance of the term, then scroll to and select it. If it
|
||||
* doesn't exist, do nothing.
|
||||
* @param term The search term.
|
||||
* @param findOptions Regex, whole word, and case sensitive options.
|
||||
* @return Whether a result was found.
|
||||
*/
|
||||
findPrevious(term: string, findOptions: ISearchOptions): boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
69
src/typings/xterm-addon-search.d.ts
vendored
69
src/typings/xterm-addon-search.d.ts
vendored
@@ -1,69 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
// HACK: gulp-tsb doesn't play nice with importing from typings
|
||||
// import { Terminal, ITerminalAddon } from 'xterm';
|
||||
|
||||
declare module 'xterm-addon-search' {
|
||||
/**
|
||||
* Options for a search.
|
||||
*/
|
||||
export interface ISearchOptions {
|
||||
/**
|
||||
* Whether the search term is a regex.
|
||||
*/
|
||||
regex?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to search for a whole word, the result is only valid if it's
|
||||
* suppounded in "non-word" characters such as `_`, `(`, `)` or space.
|
||||
*/
|
||||
wholeWord?: boolean;
|
||||
|
||||
/**
|
||||
* Whether the search is case sensitive.
|
||||
*/
|
||||
caseSensitive?: boolean;
|
||||
|
||||
/**
|
||||
* Whether to do an indcremental search, this will expand the selection if it
|
||||
* still matches the term the user typed. Note that this only affects
|
||||
* `findNext`, not `findPrevious`.
|
||||
*/
|
||||
incremental?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* An xterm.js addon that provides search functionality.
|
||||
*/
|
||||
export class SearchAddon {
|
||||
/**
|
||||
* Activates the addon
|
||||
* @param terminal The terminal the addon is being loaded in.
|
||||
*/
|
||||
public activate(terminal: any): void;
|
||||
|
||||
/**
|
||||
* Disposes the addon.
|
||||
*/
|
||||
public dispose(): void;
|
||||
|
||||
/**
|
||||
* Search forwards for the next result that matches the search term and
|
||||
* options.
|
||||
* @param term The search term.
|
||||
* @param searchOptions The options for the search.
|
||||
*/
|
||||
public findNext(term: string, searchOptions?: ISearchOptions): boolean;
|
||||
|
||||
/**
|
||||
* Search backwards for the previous result that matches the search term and
|
||||
* options.
|
||||
* @param term The search term.
|
||||
* @param searchOptions The options for the search.
|
||||
*/
|
||||
public findPrevious(term: string, searchOptions?: ISearchOptions): boolean;
|
||||
}
|
||||
}
|
||||
71
src/typings/xterm-addon-web-links.d.ts
vendored
71
src/typings/xterm-addon-web-links.d.ts
vendored
@@ -1,71 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
// HACK: gulp-tsb doesn't play nice with importing from typings
|
||||
// import { Terminal, ITerminalAddon } from 'xterm';
|
||||
interface ILinkMatcherOptions {
|
||||
/**
|
||||
* The index of the link from the regex.match(text) call. This defaults to 0
|
||||
* (for regular expressions without capture groups).
|
||||
*/
|
||||
matchIndex?: number;
|
||||
|
||||
/**
|
||||
* A callback that validates whether to create an individual link, pass
|
||||
* whether the link is valid to the callback.
|
||||
*/
|
||||
validationCallback?: (uri: string, callback: (isValid: boolean) => void) => void;
|
||||
|
||||
/**
|
||||
* A callback that fires when the mouse hovers over a link for a moment.
|
||||
*/
|
||||
tooltipCallback?: (event: MouseEvent, uri: string) => boolean | void;
|
||||
|
||||
/**
|
||||
* A callback that fires when the mouse leaves a link. Note that this can
|
||||
* happen even when tooltipCallback hasn't fired for the link yet.
|
||||
*/
|
||||
leaveCallback?: () => void;
|
||||
|
||||
/**
|
||||
* The priority of the link matcher, this defines the order in which the link
|
||||
* matcher is evaluated relative to others, from highest to lowest. The
|
||||
* default value is 0.
|
||||
*/
|
||||
priority?: number;
|
||||
|
||||
/**
|
||||
* A callback that fires when the mousedown and click events occur that
|
||||
* determines whether a link will be activated upon click. This enables
|
||||
* only activating a link when a certain modifier is held down, if not the
|
||||
* mouse event will continue propagation (eg. double click to select word).
|
||||
*/
|
||||
willLinkActivate?: (event: MouseEvent, uri: string) => boolean;
|
||||
}
|
||||
|
||||
declare module 'xterm-addon-web-links' {
|
||||
/**
|
||||
* An xterm.js addon that enables web links.
|
||||
*/
|
||||
export class WebLinksAddon {
|
||||
/**
|
||||
* Creates a new web links addon.
|
||||
* @param handler The callback when the link is called.
|
||||
* @param options Options for the link matcher.
|
||||
*/
|
||||
constructor(handler?: (event: MouseEvent, uri: string) => void, options?: ILinkMatcherOptions);
|
||||
|
||||
/**
|
||||
* Activates the addon
|
||||
* @param terminal The terminal the addon is being loaded in.
|
||||
*/
|
||||
public activate(terminal: any): void;
|
||||
|
||||
/**
|
||||
* Disposes the addon.
|
||||
*/
|
||||
public dispose(): void;
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@ export class ContextSubMenu extends SubmenuAction {
|
||||
|
||||
export interface IContextMenuDelegate {
|
||||
getAnchor(): HTMLElement | { x: number; y: number; width?: number; height?: number; };
|
||||
getActions(): ReadonlyArray<IAction | ContextSubMenu>;
|
||||
getActions(): Array<IAction | ContextSubMenu>;
|
||||
getActionViewItem?(action: IAction): IActionViewItem | undefined;
|
||||
getActionsContext?(event?: IContextMenuEvent): any;
|
||||
getKeyBinding?(action: IAction): ResolvedKeybinding | undefined;
|
||||
|
||||
@@ -11,7 +11,7 @@ import { TimeoutTimer } from 'vs/base/common/async';
|
||||
import { CharCode } from 'vs/base/common/charCode';
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import { coalesce } from 'vs/base/common/arrays';
|
||||
|
||||
@@ -905,9 +905,10 @@ export const EventHelper = {
|
||||
}
|
||||
};
|
||||
|
||||
export interface IFocusTracker extends Disposable {
|
||||
export interface IFocusTracker {
|
||||
onDidFocus: Event<void>;
|
||||
onDidBlur: Event<void>;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export function saveParentsScrollTop(node: Element): number[] {
|
||||
@@ -928,20 +929,21 @@ export function restoreParentsScrollTop(node: Element, state: number[]): void {
|
||||
}
|
||||
}
|
||||
|
||||
class FocusTracker extends Disposable implements IFocusTracker {
|
||||
class FocusTracker implements IFocusTracker {
|
||||
|
||||
private readonly _onDidFocus = this._register(new Emitter<void>());
|
||||
public readonly onDidFocus: Event<void> = this._onDidFocus.event;
|
||||
private _onDidFocus = new Emitter<void>();
|
||||
readonly onDidFocus: Event<void> = this._onDidFocus.event;
|
||||
|
||||
private readonly _onDidBlur = this._register(new Emitter<void>());
|
||||
public readonly onDidBlur: Event<void> = this._onDidBlur.event;
|
||||
private _onDidBlur = new Emitter<void>();
|
||||
readonly onDidBlur: Event<void> = this._onDidBlur.event;
|
||||
|
||||
private disposables: IDisposable[] = [];
|
||||
|
||||
constructor(element: HTMLElement | Window) {
|
||||
super();
|
||||
let hasFocus = isAncestor(document.activeElement, <HTMLElement>element);
|
||||
let loosingFocus = false;
|
||||
|
||||
const onFocus = () => {
|
||||
let onFocus = () => {
|
||||
loosingFocus = false;
|
||||
if (!hasFocus) {
|
||||
hasFocus = true;
|
||||
@@ -949,7 +951,7 @@ class FocusTracker extends Disposable implements IFocusTracker {
|
||||
}
|
||||
};
|
||||
|
||||
const onBlur = () => {
|
||||
let onBlur = () => {
|
||||
if (hasFocus) {
|
||||
loosingFocus = true;
|
||||
window.setTimeout(() => {
|
||||
@@ -962,8 +964,14 @@ class FocusTracker extends Disposable implements IFocusTracker {
|
||||
}
|
||||
};
|
||||
|
||||
this._register(domEvent(element, EventType.FOCUS, true)(onFocus));
|
||||
this._register(domEvent(element, EventType.BLUR, true)(onBlur));
|
||||
domEvent(element, EventType.FOCUS, true)(onFocus, null, this.disposables);
|
||||
domEvent(element, EventType.BLUR, true)(onBlur, null, this.disposables);
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this.disposables = dispose(this.disposables);
|
||||
this._onDidFocus.dispose();
|
||||
this._onDidBlur.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
import { IframeUtils } from 'vs/base/browser/iframe';
|
||||
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
|
||||
export interface IStandardMouseMoveEventData {
|
||||
leftButton: boolean;
|
||||
@@ -36,16 +36,24 @@ export function standardMouseMoveMerger(lastEvent: IStandardMouseMoveEventData,
|
||||
};
|
||||
}
|
||||
|
||||
export class GlobalMouseMoveMonitor<R> implements IDisposable {
|
||||
export class GlobalMouseMoveMonitor<R> extends Disposable {
|
||||
|
||||
private readonly hooks = new DisposableStore();
|
||||
private mouseMoveEventMerger: IEventMerger<R> | null = null;
|
||||
private mouseMoveCallback: IMouseMoveCallback<R> | null = null;
|
||||
private onStopCallback: IOnStopCallback | null = null;
|
||||
private hooks: IDisposable[];
|
||||
private mouseMoveEventMerger: IEventMerger<R> | null;
|
||||
private mouseMoveCallback: IMouseMoveCallback<R> | null;
|
||||
private onStopCallback: IOnStopCallback | null;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.hooks = [];
|
||||
this.mouseMoveEventMerger = null;
|
||||
this.mouseMoveCallback = null;
|
||||
this.onStopCallback = null;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this.stopMonitoring(false);
|
||||
this.hooks.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
public stopMonitoring(invokeStopCallback: boolean): void {
|
||||
@@ -55,10 +63,10 @@ export class GlobalMouseMoveMonitor<R> implements IDisposable {
|
||||
}
|
||||
|
||||
// Unhook
|
||||
this.hooks.clear();
|
||||
this.hooks = dispose(this.hooks);
|
||||
this.mouseMoveEventMerger = null;
|
||||
this.mouseMoveCallback = null;
|
||||
const onStopCallback = this.onStopCallback;
|
||||
let onStopCallback = this.onStopCallback;
|
||||
this.onStopCallback = null;
|
||||
|
||||
if (invokeStopCallback && onStopCallback) {
|
||||
@@ -66,8 +74,8 @@ export class GlobalMouseMoveMonitor<R> implements IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
public isMonitoring(): boolean {
|
||||
return !!this.mouseMoveEventMerger;
|
||||
public isMonitoring() {
|
||||
return this.hooks.length > 0;
|
||||
}
|
||||
|
||||
public startMonitoring(
|
||||
@@ -85,32 +93,32 @@ export class GlobalMouseMoveMonitor<R> implements IDisposable {
|
||||
|
||||
let windowChain = IframeUtils.getSameOriginWindowChain();
|
||||
for (const element of windowChain) {
|
||||
this.hooks.add(dom.addDisposableThrottledListener(element.window.document, 'mousemove',
|
||||
this.hooks.push(dom.addDisposableThrottledListener(element.window.document, 'mousemove',
|
||||
(data: R) => this.mouseMoveCallback!(data),
|
||||
(lastEvent: R, currentEvent) => this.mouseMoveEventMerger!(lastEvent, currentEvent as MouseEvent)
|
||||
));
|
||||
this.hooks.add(dom.addDisposableListener(element.window.document, 'mouseup', (e: MouseEvent) => this.stopMonitoring(true)));
|
||||
this.hooks.push(dom.addDisposableListener(element.window.document, 'mouseup', (e: MouseEvent) => this.stopMonitoring(true)));
|
||||
}
|
||||
|
||||
if (IframeUtils.hasDifferentOriginAncestor()) {
|
||||
let lastSameOriginAncestor = windowChain[windowChain.length - 1];
|
||||
// We might miss a mouse up if it happens outside the iframe
|
||||
// This one is for Chrome
|
||||
this.hooks.add(dom.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseout', (browserEvent: MouseEvent) => {
|
||||
this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseout', (browserEvent: MouseEvent) => {
|
||||
let e = new StandardMouseEvent(browserEvent);
|
||||
if (e.target.tagName.toLowerCase() === 'html') {
|
||||
this.stopMonitoring(true);
|
||||
}
|
||||
}));
|
||||
// This one is for FF
|
||||
this.hooks.add(dom.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseover', (browserEvent: MouseEvent) => {
|
||||
this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document, 'mouseover', (browserEvent: MouseEvent) => {
|
||||
let e = new StandardMouseEvent(browserEvent);
|
||||
if (e.target.tagName.toLowerCase() === 'html') {
|
||||
this.stopMonitoring(true);
|
||||
}
|
||||
}));
|
||||
// This one is for IE
|
||||
this.hooks.add(dom.addDisposableListener(lastSameOriginAncestor.window.document.body, 'mouseleave', (browserEvent: MouseEvent) => {
|
||||
this.hooks.push(dom.addDisposableListener(lastSameOriginAncestor.window.document.body, 'mouseleave', (browserEvent: MouseEvent) => {
|
||||
this.stopMonitoring(true);
|
||||
}));
|
||||
}
|
||||
|
||||
15
src/vs/base/browser/hash.ts
Normal file
15
src/vs/base/browser/hash.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export function createSHA1(content: string): Thenable<string> {
|
||||
if (typeof require !== 'undefined') {
|
||||
const _crypto: typeof crypto = require.__$__nodeRequire('crypto');
|
||||
return Promise.resolve(_crypto['createHash']('sha1').update(content).digest('hex'));
|
||||
}
|
||||
return crypto.subtle.digest('SHA-1', new TextEncoder().encode(content)).then(buffer => {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest#Converting_a_digest_to_a_hex_string
|
||||
return Array.prototype.map.call(new Uint8Array(buffer), (value: number) => `00${value.toString(16)}`.slice(-2)).join('');
|
||||
});
|
||||
}
|
||||
@@ -17,7 +17,7 @@ import { cloneAndChange } from 'vs/base/common/objects';
|
||||
|
||||
export interface IContentActionHandler {
|
||||
callback: (content: string, event?: IMouseEvent) => void;
|
||||
readonly disposeables: IDisposable[];
|
||||
disposeables: IDisposable[];
|
||||
}
|
||||
|
||||
export interface RenderOptions {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import 'vs/css!./actionbar';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import * as nls from 'vs/nls';
|
||||
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { SelectBox, ISelectOptionItem, ISelectBoxOptions } from 'vs/base/browser/ui/selectBox/selectBox';
|
||||
import { IAction, IActionRunner, Action, IActionChangeEvent, ActionRunner, IRunEvent } from 'vs/base/common/actions';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
@@ -16,14 +16,16 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { asArray } from 'vs/base/common/arrays';
|
||||
|
||||
export interface IActionViewItem extends IDisposable {
|
||||
export interface IActionViewItem {
|
||||
actionRunner: IActionRunner;
|
||||
setActionContext(context: any): void;
|
||||
render(element: HTMLElement): void;
|
||||
isEnabled(): boolean;
|
||||
focus(fromRight?: boolean): void;
|
||||
blur(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface IBaseActionViewItemOptions {
|
||||
@@ -259,9 +261,6 @@ export class ActionViewItem extends BaseActionViewItem {
|
||||
this.label.setAttribute('role', 'menuitem');
|
||||
} else {
|
||||
this.label.setAttribute('role', 'button');
|
||||
|
||||
// TODO @misolori remove before shipping stable
|
||||
this.label.setAttribute('data-title', this._action.id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -594,8 +593,8 @@ export class ActionBar extends Disposable implements IActionRunner {
|
||||
return this.domNode;
|
||||
}
|
||||
|
||||
push(arg: IAction | ReadonlyArray<IAction>, options: IActionOptions = {}): void {
|
||||
const actions: ReadonlyArray<IAction> = Array.isArray(arg) ? arg : [arg];
|
||||
push(arg: IAction | IAction[], options: IActionOptions = {}): void {
|
||||
const actions: IAction[] = asArray(arg);
|
||||
|
||||
let index = types.isNumber(options.index) ? options.index : null;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableEle
|
||||
import { commonPrefixLength } from 'vs/base/common/arrays';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { dispose, IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { dispose, IDisposable, combinedDisposable } from 'vs/base/common/lifecycle';
|
||||
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
|
||||
import 'vs/css!./breadcrumbsWidget';
|
||||
|
||||
@@ -134,14 +134,14 @@ export class BreadcrumbsWidget {
|
||||
}
|
||||
|
||||
private _updateDimensions(dim: dom.Dimension): IDisposable {
|
||||
const disposables = new DisposableStore();
|
||||
disposables.add(dom.modify(() => {
|
||||
let disposables: IDisposable[] = [];
|
||||
disposables.push(dom.modify(() => {
|
||||
this._dimension = dim;
|
||||
this._domNode.style.width = `${dim.width}px`;
|
||||
this._domNode.style.height = `${dim.height}px`;
|
||||
disposables.add(this._updateScrollbar());
|
||||
disposables.push(this._updateScrollbar());
|
||||
}));
|
||||
return disposables;
|
||||
return combinedDisposable(disposables);
|
||||
}
|
||||
|
||||
private _updateScrollbar(): IDisposable {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { SplitView, Orientation, ISplitViewStyles, IView as ISplitViewView } fro
|
||||
import { $ } from 'vs/base/browser/dom';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { IView } from 'vs/base/browser/ui/grid/gridview';
|
||||
import { IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
|
||||
export interface CenteredViewState {
|
||||
@@ -48,7 +48,7 @@ export interface ICenteredViewStyles extends ISplitViewStyles {
|
||||
background: Color;
|
||||
}
|
||||
|
||||
export class CenteredViewLayout implements IDisposable {
|
||||
export class CenteredViewLayout {
|
||||
|
||||
private splitView?: SplitView;
|
||||
private width: number = 0;
|
||||
@@ -56,7 +56,7 @@ export class CenteredViewLayout implements IDisposable {
|
||||
private style: ICenteredViewStyles;
|
||||
private didLayout = false;
|
||||
private emptyViews: ISplitViewView[] | undefined;
|
||||
private readonly splitViewDisposables = new DisposableStore();
|
||||
private splitViewDisposables: IDisposable[] = [];
|
||||
|
||||
constructor(private container: HTMLElement, private view: IView, public readonly state: CenteredViewState = { leftMarginRatio: GOLDEN_RATIO.leftMarginRatio, rightMarginRatio: GOLDEN_RATIO.rightMarginRatio }) {
|
||||
this.container.appendChild(this.view.element);
|
||||
@@ -117,13 +117,13 @@ export class CenteredViewLayout implements IDisposable {
|
||||
styles: this.style
|
||||
});
|
||||
|
||||
this.splitViewDisposables.add(this.splitView.onDidSashChange(() => {
|
||||
this.splitViewDisposables.push(this.splitView.onDidSashChange(() => {
|
||||
if (this.splitView) {
|
||||
this.state.leftMarginRatio = this.splitView.getViewSize(0) / this.width;
|
||||
this.state.rightMarginRatio = this.splitView.getViewSize(2) / this.width;
|
||||
}
|
||||
}));
|
||||
this.splitViewDisposables.add(this.splitView.onDidSashReset(() => {
|
||||
this.splitViewDisposables.push(this.splitView.onDidSashReset(() => {
|
||||
this.state.leftMarginRatio = GOLDEN_RATIO.leftMarginRatio;
|
||||
this.state.rightMarginRatio = GOLDEN_RATIO.rightMarginRatio;
|
||||
this.resizeMargins();
|
||||
@@ -138,7 +138,7 @@ export class CenteredViewLayout implements IDisposable {
|
||||
if (this.splitView) {
|
||||
this.container.removeChild(this.splitView.el);
|
||||
}
|
||||
this.splitViewDisposables.clear();
|
||||
this.splitViewDisposables = dispose(this.splitViewDisposables);
|
||||
if (this.splitView) {
|
||||
this.splitView.dispose();
|
||||
}
|
||||
@@ -153,7 +153,7 @@ export class CenteredViewLayout implements IDisposable {
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this.splitViewDisposables.dispose();
|
||||
this.splitViewDisposables = dispose(this.splitViewDisposables);
|
||||
|
||||
if (this.splitView) {
|
||||
this.splitView.dispose();
|
||||
|
||||
@@ -12,7 +12,7 @@ import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import * as objects from 'vs/base/common/objects';
|
||||
import { BaseActionViewItem } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
|
||||
export interface ICheckboxOpts extends ICheckboxStyles {
|
||||
readonly actionClassName?: string;
|
||||
@@ -31,19 +31,19 @@ const defaultOpts = {
|
||||
export class CheckboxActionViewItem extends BaseActionViewItem {
|
||||
|
||||
private checkbox: Checkbox;
|
||||
private readonly disposables = new DisposableStore();
|
||||
private disposables: IDisposable[] = [];
|
||||
|
||||
render(container: HTMLElement): void {
|
||||
this.element = container;
|
||||
|
||||
this.disposables.clear();
|
||||
this.disposables = dispose(this.disposables);
|
||||
this.checkbox = new Checkbox({
|
||||
actionClassName: this._action.class,
|
||||
isChecked: this._action.checked,
|
||||
title: this._action.label
|
||||
});
|
||||
this.disposables.add(this.checkbox);
|
||||
this.disposables.add(this.checkbox.onChange(() => this._action.checked = this.checkbox.checked, this));
|
||||
this.disposables.push(this.checkbox);
|
||||
this.checkbox.onChange(() => this._action.checked = this.checkbox.checked, this, this.disposables);
|
||||
this.element.appendChild(this.checkbox.domNode);
|
||||
}
|
||||
|
||||
@@ -64,9 +64,10 @@ export class CheckboxActionViewItem extends BaseActionViewItem {
|
||||
}
|
||||
|
||||
dipsose(): void {
|
||||
this.disposables.dispose();
|
||||
this.disposables = dispose(this.disposables);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class Checkbox extends Widget {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import 'vs/css!./contextview';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
import { IDisposable, dispose, toDisposable, Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose, toDisposable, combinedDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { Range } from 'vs/base/common/range';
|
||||
|
||||
export interface IAnchor {
|
||||
@@ -128,21 +128,21 @@ export class ContextView extends Disposable {
|
||||
this.container = container;
|
||||
this.container.appendChild(this.view);
|
||||
|
||||
const toDisposeOnSetContainer = new DisposableStore();
|
||||
const toDisposeOnSetContainer: IDisposable[] = [];
|
||||
|
||||
ContextView.BUBBLE_UP_EVENTS.forEach(event => {
|
||||
toDisposeOnSetContainer.add(DOM.addStandardDisposableListener(this.container!, event, (e: Event) => {
|
||||
toDisposeOnSetContainer.push(DOM.addStandardDisposableListener(this.container!, event, (e: Event) => {
|
||||
this.onDOMEvent(e, false);
|
||||
}));
|
||||
});
|
||||
|
||||
ContextView.BUBBLE_DOWN_EVENTS.forEach(event => {
|
||||
toDisposeOnSetContainer.add(DOM.addStandardDisposableListener(this.container!, event, (e: Event) => {
|
||||
toDisposeOnSetContainer.push(DOM.addStandardDisposableListener(this.container!, event, (e: Event) => {
|
||||
this.onDOMEvent(e, true);
|
||||
}, true));
|
||||
});
|
||||
|
||||
this.toDisposeOnSetContainer = toDisposeOnSetContainer;
|
||||
this.toDisposeOnSetContainer = combinedDisposable(toDisposeOnSetContainer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,13 +260,12 @@ export class ContextView extends Disposable {
|
||||
}
|
||||
|
||||
hide(data?: any): void {
|
||||
const delegate = this.delegate;
|
||||
this.delegate = null;
|
||||
|
||||
if (delegate && delegate.onHide) {
|
||||
delegate.onHide(data);
|
||||
if (this.delegate && this.delegate.onHide) {
|
||||
this.delegate.onHide(data);
|
||||
}
|
||||
|
||||
this.delegate = null;
|
||||
|
||||
if (this.toDisposeOnClean) {
|
||||
this.toDisposeOnClean.dispose();
|
||||
this.toDisposeOnClean = null;
|
||||
|
||||
@@ -192,12 +192,12 @@ export interface IContextMenuProvider {
|
||||
}
|
||||
|
||||
export interface IActionProvider {
|
||||
getActions(): ReadonlyArray<IAction>;
|
||||
getActions(): IAction[];
|
||||
}
|
||||
|
||||
export interface IDropdownMenuOptions extends IBaseDropdownOptions {
|
||||
contextMenuProvider: IContextMenuProvider;
|
||||
actions?: ReadonlyArray<IAction>;
|
||||
actions?: IAction[];
|
||||
actionProvider?: IActionProvider;
|
||||
menuClassName?: string;
|
||||
}
|
||||
@@ -205,7 +205,7 @@ export interface IDropdownMenuOptions extends IBaseDropdownOptions {
|
||||
export class DropdownMenu extends BaseDropdown {
|
||||
private _contextMenuProvider: IContextMenuProvider;
|
||||
private _menuOptions: IMenuOptions;
|
||||
private _actions: ReadonlyArray<IAction>;
|
||||
private _actions: IAction[];
|
||||
private actionProvider?: IActionProvider;
|
||||
private menuClassName: string;
|
||||
|
||||
@@ -226,7 +226,7 @@ export class DropdownMenu extends BaseDropdown {
|
||||
return this._menuOptions;
|
||||
}
|
||||
|
||||
private get actions(): ReadonlyArray<IAction> {
|
||||
private get actions(): IAction[] {
|
||||
if (this.actionProvider) {
|
||||
return this.actionProvider.getActions();
|
||||
}
|
||||
@@ -234,7 +234,7 @@ export class DropdownMenu extends BaseDropdown {
|
||||
return this._actions;
|
||||
}
|
||||
|
||||
private set actions(actions: ReadonlyArray<IAction>) {
|
||||
private set actions(actions: IAction[]) {
|
||||
this._actions = actions;
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ export class DropdownMenuActionViewItem extends BaseActionViewItem {
|
||||
private clazz: string | undefined;
|
||||
private anchorAlignmentProvider: (() => AnchorAlignment) | undefined;
|
||||
|
||||
constructor(action: IAction, menuActions: ReadonlyArray<IAction>, contextMenuProvider: IContextMenuProvider, actionViewItemProvider: IActionViewItemProvider | undefined, actionRunner: IActionRunner, keybindings: ((action: IAction) => ResolvedKeybinding | undefined) | undefined, clazz: string | undefined, anchorAlignmentProvider?: () => AnchorAlignment);
|
||||
constructor(action: IAction, menuActions: IAction[], contextMenuProvider: IContextMenuProvider, actionViewItemProvider: IActionViewItemProvider | undefined, actionRunner: IActionRunner, keybindings: ((action: IAction) => ResolvedKeybinding | undefined) | undefined, clazz: string | undefined, anchorAlignmentProvider?: () => AnchorAlignment);
|
||||
constructor(action: IAction, actionProvider: IActionProvider, contextMenuProvider: IContextMenuProvider, actionViewItemProvider: IActionViewItemProvider | undefined, actionRunner: IActionRunner, keybindings: ((action: IAction) => ResolvedKeybinding) | undefined, clazz: string | undefined, anchorAlignmentProvider?: () => AnchorAlignment);
|
||||
constructor(action: IAction, menuActionsOrProvider: any, contextMenuProvider: IContextMenuProvider, actionViewItemProvider: IActionViewItemProvider | undefined, actionRunner: IActionRunner, keybindings: ((action: IAction) => ResolvedKeybinding | undefined) | undefined, clazz: string | undefined, anchorAlignmentProvider?: () => AnchorAlignment) {
|
||||
super(null, action);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import 'vs/css!./gridview';
|
||||
import { Orientation } from 'vs/base/browser/ui/sash/sash';
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { tail2 as tail, equals } from 'vs/base/common/arrays';
|
||||
import { orthogonal, IView, GridView, Sizing as GridViewSizing, Box, IGridViewStyles } from './gridview';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
@@ -191,10 +191,12 @@ export interface IGridOptions {
|
||||
proportionalLayout?: boolean;
|
||||
}
|
||||
|
||||
export class Grid<T extends IView> extends Disposable {
|
||||
export class Grid<T extends IView> implements IDisposable {
|
||||
|
||||
protected gridview: GridView;
|
||||
private views = new Map<T, HTMLElement>();
|
||||
private disposables: IDisposable[] = [];
|
||||
|
||||
get orientation(): Orientation { return this.gridview.orientation; }
|
||||
set orientation(orientation: Orientation) { this.gridview.orientation = orientation; }
|
||||
|
||||
@@ -212,11 +214,10 @@ export class Grid<T extends IView> extends Disposable {
|
||||
sashResetSizing: Sizing = Sizing.Distribute;
|
||||
|
||||
constructor(view: T, options: IGridOptions = {}) {
|
||||
super();
|
||||
this.gridview = new GridView(options);
|
||||
this._register(this.gridview);
|
||||
this.disposables.push(this.gridview);
|
||||
|
||||
this._register(this.gridview.onDidSashReset(this.doResetViewSize, this));
|
||||
this.gridview.onDidSashReset(this.doResetViewSize, this, this.disposables);
|
||||
|
||||
this._addView(view, 0, [0]);
|
||||
}
|
||||
@@ -374,6 +375,10 @@ export class Grid<T extends IView> extends Disposable {
|
||||
this.gridview.distributeViewSizes(parentLocation);
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this.disposables = dispose(this.disposables);
|
||||
}
|
||||
}
|
||||
|
||||
export interface ISerializableView extends IView {
|
||||
|
||||
@@ -28,8 +28,7 @@ export interface IInputOptions extends IInputBoxStyles {
|
||||
readonly type?: string;
|
||||
readonly validationOptions?: IInputValidationOptions;
|
||||
readonly flexibleHeight?: boolean;
|
||||
readonly actions?: ReadonlyArray<IAction>;
|
||||
|
||||
readonly actions?: IAction[];
|
||||
|
||||
// {{SQL CARBON EDIT}} Candidate for addition to vscode
|
||||
readonly min?: string;
|
||||
@@ -100,7 +99,7 @@ export class InputBox extends Widget {
|
||||
private placeholder: string;
|
||||
private ariaLabel: string;
|
||||
private validation?: IInputValidator;
|
||||
private state: 'idle' | 'open' | 'closed' = 'idle';
|
||||
private state: string | null = 'idle';
|
||||
private cachedHeight: number | null;
|
||||
|
||||
// {{SQL CARBON EDIT}} - Add showValidationMessage and set inputBackground, inputForeground, and inputBorder as protected
|
||||
@@ -423,6 +422,8 @@ export class InputBox extends Widget {
|
||||
let div: HTMLElement;
|
||||
let layout = () => div.style.width = dom.getTotalWidth(this.element) + 'px';
|
||||
|
||||
this.state = 'open';
|
||||
|
||||
this.contextViewProvider.showContextView({
|
||||
getAnchor: () => this.element,
|
||||
anchorAlignment: AnchorAlignment.RIGHT,
|
||||
@@ -453,25 +454,18 @@ export class InputBox extends Widget {
|
||||
|
||||
return null;
|
||||
},
|
||||
onHide: () => {
|
||||
this.state = 'closed';
|
||||
},
|
||||
layout: layout
|
||||
});
|
||||
|
||||
this.state = 'open';
|
||||
}
|
||||
|
||||
private _hideMessage(): void {
|
||||
if (!this.contextViewProvider) {
|
||||
if (!this.contextViewProvider || this.state !== 'open') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.state === 'open') {
|
||||
this.contextViewProvider.hideContextView();
|
||||
}
|
||||
|
||||
this.state = 'idle';
|
||||
|
||||
this.contextViewProvider.hideContextView();
|
||||
}
|
||||
|
||||
private onValueChange(): void {
|
||||
@@ -561,7 +555,7 @@ export class InputBox extends Widget {
|
||||
this.contextViewProvider = undefined;
|
||||
this.message = null;
|
||||
this.validation = undefined;
|
||||
this.state = null!; // StrictNullOverride: nulling out ok in dispose
|
||||
this.state = null;
|
||||
this.actionbar = undefined;
|
||||
|
||||
super.dispose();
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
}
|
||||
|
||||
.monaco-menu .monaco-action-bar.vertical .action-item {
|
||||
border: thin solid transparent; /* prevents jumping behaviour on hover or focus */
|
||||
border: 1px solid transparent; /* prevents jumping behaviour on hover or focus */
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import { ResolvedKeybinding, KeyCode } from 'vs/base/common/keyCodes';
|
||||
import { addClass, EventType, EventHelper, EventLike, removeTabIndexAndUpdateFocus, isAncestor, hasClass, addDisposableListener, removeClass, append, $, addClasses, removeClasses } from 'vs/base/browser/dom';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { Color } from 'vs/base/common/color';
|
||||
import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement';
|
||||
import { ScrollbarVisibility, ScrollEvent } from 'vs/base/common/scrollable';
|
||||
@@ -59,7 +59,7 @@ export interface IMenuStyles {
|
||||
}
|
||||
|
||||
export class SubmenuAction extends Action {
|
||||
constructor(label: string, public entries: ReadonlyArray<SubmenuAction | IAction>, cssClass?: string) {
|
||||
constructor(label: string, public entries: Array<SubmenuAction | IAction>, cssClass?: string) {
|
||||
super(!!cssClass ? cssClass : 'submenu', label, '', true);
|
||||
}
|
||||
}
|
||||
@@ -71,14 +71,15 @@ interface ISubMenuData {
|
||||
|
||||
export class Menu extends ActionBar {
|
||||
private mnemonics: Map<string, Array<BaseMenuActionViewItem>>;
|
||||
private readonly menuDisposables: DisposableStore;
|
||||
private menuDisposables: IDisposable[];
|
||||
private scrollableElement: DomScrollableElement;
|
||||
private menuElement: HTMLElement;
|
||||
private scrollTopHold: number | undefined;
|
||||
|
||||
private readonly _onScroll: Emitter<void>;
|
||||
|
||||
constructor(container: HTMLElement, actions: ReadonlyArray<IAction>, options: IMenuOptions = {}) {
|
||||
constructor(container: HTMLElement, actions: IAction[], options: IMenuOptions = {}) {
|
||||
|
||||
addClass(container, 'monaco-menu-container');
|
||||
container.setAttribute('role', 'presentation');
|
||||
const menuElement = document.createElement('div');
|
||||
@@ -102,7 +103,7 @@ export class Menu extends ActionBar {
|
||||
|
||||
this.actionsList.tabIndex = 0;
|
||||
|
||||
this.menuDisposables = this._register(new DisposableStore());
|
||||
this.menuDisposables = [];
|
||||
|
||||
addDisposableListener(menuElement, EventType.KEY_DOWN, (e) => {
|
||||
const event = new StandardKeyboardEvent(e);
|
||||
@@ -114,7 +115,7 @@ export class Menu extends ActionBar {
|
||||
});
|
||||
|
||||
if (options.enableMnemonics) {
|
||||
this.menuDisposables.add(addDisposableListener(menuElement, EventType.KEY_DOWN, (e) => {
|
||||
this.menuDisposables.push(addDisposableListener(menuElement, EventType.KEY_DOWN, (e) => {
|
||||
const key = e.key.toLocaleLowerCase();
|
||||
if (this.mnemonics.has(key)) {
|
||||
EventHelper.stop(e, true);
|
||||
@@ -216,9 +217,9 @@ export class Menu extends ActionBar {
|
||||
|
||||
menuElement.style.maxHeight = `${Math.max(10, window.innerHeight - container.getBoundingClientRect().top - 30)}px`;
|
||||
|
||||
this.menuDisposables.add(this.scrollableElement.onScroll(() => {
|
||||
this.scrollableElement.onScroll(() => {
|
||||
this._onScroll.fire();
|
||||
}, this));
|
||||
}, this, this.menuDisposables);
|
||||
|
||||
this._register(addDisposableListener(this.menuElement, EventType.SCROLL, (e: ScrollEvent) => {
|
||||
if (this.scrollTopHold !== undefined) {
|
||||
@@ -556,7 +557,7 @@ class BaseMenuActionViewItem extends BaseActionViewItem {
|
||||
const isSelected = this.element && hasClass(this.element, 'focused');
|
||||
const fgColor = isSelected && this.menuStyle.selectionForegroundColor ? this.menuStyle.selectionForegroundColor : this.menuStyle.foregroundColor;
|
||||
const bgColor = isSelected && this.menuStyle.selectionBackgroundColor ? this.menuStyle.selectionBackgroundColor : this.menuStyle.backgroundColor;
|
||||
const border = isSelected && this.menuStyle.selectionBorderColor ? `thin solid ${this.menuStyle.selectionBorderColor}` : null;
|
||||
const border = isSelected && this.menuStyle.selectionBorderColor ? `1px solid ${this.menuStyle.selectionBorderColor}` : null;
|
||||
|
||||
this.item.style.color = fgColor ? `${fgColor}` : null;
|
||||
this.check.style.backgroundColor = fgColor ? `${fgColor}` : null;
|
||||
@@ -574,14 +575,14 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
private mysubmenu: Menu | null;
|
||||
private submenuContainer: HTMLElement | undefined;
|
||||
private submenuIndicator: HTMLElement;
|
||||
private readonly submenuDisposables = this._register(new DisposableStore());
|
||||
private submenuDisposables: IDisposable[] = [];
|
||||
private mouseOver: boolean;
|
||||
private showScheduler: RunOnceScheduler;
|
||||
private hideScheduler: RunOnceScheduler;
|
||||
|
||||
constructor(
|
||||
action: IAction,
|
||||
private submenuActions: ReadonlyArray<IAction>,
|
||||
private submenuActions: IAction[],
|
||||
private parentData: ISubMenuData,
|
||||
private submenuOptions?: IMenuOptions
|
||||
) {
|
||||
@@ -674,7 +675,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
this.parentData.submenu = undefined;
|
||||
|
||||
if (this.submenuContainer) {
|
||||
this.submenuDisposables.clear();
|
||||
this.submenuDisposables = dispose(this.submenuDisposables);
|
||||
this.submenuContainer = undefined;
|
||||
}
|
||||
}
|
||||
@@ -707,7 +708,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
this.submenuContainer.style.top = `${this.element.offsetTop - this.parentData.parent.scrollOffset - paddingTop}px`;
|
||||
}
|
||||
|
||||
this.submenuDisposables.add(addDisposableListener(this.submenuContainer, EventType.KEY_UP, e => {
|
||||
this.submenuDisposables.push(addDisposableListener(this.submenuContainer, EventType.KEY_UP, e => {
|
||||
let event = new StandardKeyboardEvent(e);
|
||||
if (event.equals(KeyCode.LeftArrow)) {
|
||||
EventHelper.stop(e, true);
|
||||
@@ -719,12 +720,12 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
this.parentData.submenu = undefined;
|
||||
}
|
||||
|
||||
this.submenuDisposables.clear();
|
||||
this.submenuDisposables = dispose(this.submenuDisposables);
|
||||
this.submenuContainer = undefined;
|
||||
}
|
||||
}));
|
||||
|
||||
this.submenuDisposables.add(addDisposableListener(this.submenuContainer, EventType.KEY_DOWN, e => {
|
||||
this.submenuDisposables.push(addDisposableListener(this.submenuContainer, EventType.KEY_DOWN, e => {
|
||||
let event = new StandardKeyboardEvent(e);
|
||||
if (event.equals(KeyCode.LeftArrow)) {
|
||||
EventHelper.stop(e, true);
|
||||
@@ -732,7 +733,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
}));
|
||||
|
||||
|
||||
this.submenuDisposables.add(this.parentData.submenu.onDidCancel(() => {
|
||||
this.submenuDisposables.push(this.parentData.submenu.onDidCancel(() => {
|
||||
this.parentData.parent.focus();
|
||||
|
||||
if (this.parentData.submenu) {
|
||||
@@ -740,7 +741,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
this.parentData.submenu = undefined;
|
||||
}
|
||||
|
||||
this.submenuDisposables.clear();
|
||||
this.submenuDisposables = dispose(this.submenuDisposables);
|
||||
this.submenuContainer = undefined;
|
||||
}));
|
||||
|
||||
@@ -780,6 +781,7 @@ class SubmenuMenuActionViewItem extends BaseMenuActionViewItem {
|
||||
}
|
||||
|
||||
if (this.submenuContainer) {
|
||||
this.submenuDisposables = dispose(this.submenuDisposables);
|
||||
this.submenuContainer = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import { ActionRunner, IAction, IActionRunner } from 'vs/base/common/actions';
|
||||
import { RunOnceScheduler } from 'vs/base/common/async';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { KeyCode, ResolvedKeybinding } from 'vs/base/common/keyCodes';
|
||||
import { Disposable, dispose, IDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { withNullAsUndefined } from 'vs/base/common/types';
|
||||
import { asArray } from 'vs/base/common/arrays';
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface IMenuBarOptions {
|
||||
}
|
||||
|
||||
export interface MenuBarMenu {
|
||||
actions: ReadonlyArray<IAction>;
|
||||
actions: IAction[];
|
||||
label: string;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ export class MenuBar extends Disposable {
|
||||
buttonElement: HTMLElement;
|
||||
titleElement: HTMLElement;
|
||||
label: string;
|
||||
actions?: ReadonlyArray<IAction>;
|
||||
actions?: IAction[];
|
||||
}[];
|
||||
|
||||
private overflowMenu: {
|
||||
@@ -896,7 +896,7 @@ interface IModifierKeyStatus {
|
||||
|
||||
class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
|
||||
private readonly _subscriptions = new DisposableStore();
|
||||
private _subscriptions: IDisposable[] = [];
|
||||
private _keyStatus: IModifierKeyStatus;
|
||||
private static instance: ModifierKeyEmitter;
|
||||
|
||||
@@ -909,7 +909,7 @@ class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
ctrlKey: false
|
||||
};
|
||||
|
||||
this._subscriptions.add(domEvent(document.body, 'keydown', true)(e => {
|
||||
this._subscriptions.push(domEvent(document.body, 'keydown', true)(e => {
|
||||
const event = new StandardKeyboardEvent(e);
|
||||
|
||||
if (e.altKey && !this._keyStatus.altKey) {
|
||||
@@ -933,7 +933,7 @@ class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
}
|
||||
}));
|
||||
|
||||
this._subscriptions.add(domEvent(document.body, 'keyup', true)(e => {
|
||||
this._subscriptions.push(domEvent(document.body, 'keyup', true)(e => {
|
||||
if (!e.altKey && this._keyStatus.altKey) {
|
||||
this._keyStatus.lastKeyReleased = 'alt';
|
||||
} else if (!e.ctrlKey && this._keyStatus.ctrlKey) {
|
||||
@@ -957,21 +957,21 @@ class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
}
|
||||
}));
|
||||
|
||||
this._subscriptions.add(domEvent(document.body, 'mousedown', true)(e => {
|
||||
this._subscriptions.push(domEvent(document.body, 'mousedown', true)(e => {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}));
|
||||
|
||||
this._subscriptions.add(domEvent(document.body, 'mouseup', true)(e => {
|
||||
this._subscriptions.push(domEvent(document.body, 'mouseup', true)(e => {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}));
|
||||
|
||||
this._subscriptions.add(domEvent(document.body, 'mousemove', true)(e => {
|
||||
this._subscriptions.push(domEvent(document.body, 'mousemove', true)(e => {
|
||||
if (e.buttons) {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
}
|
||||
}));
|
||||
|
||||
this._subscriptions.add(domEvent(window, 'blur')(e => {
|
||||
this._subscriptions.push(domEvent(window, 'blur')(e => {
|
||||
this._keyStatus.lastKeyPressed = undefined;
|
||||
this._keyStatus.lastKeyReleased = undefined;
|
||||
this._keyStatus.altKey = false;
|
||||
@@ -992,6 +992,6 @@ class ModifierKeyEmitter extends Emitter<IModifierKeyStatus> {
|
||||
|
||||
dispose() {
|
||||
super.dispose();
|
||||
this._subscriptions.dispose();
|
||||
this._subscriptions = dispose(this._subscriptions);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@font-face {
|
||||
font-family: "octicons";
|
||||
src: url("./octicons.ttf?1b0f2a9535896866c74dd24eedeb4374") format("truetype"),
|
||||
url("./octicons.svg?1b0f2a9535896866c74dd24eedeb4374#octicons") format("svg");
|
||||
src: url("./octicons.ttf?91284a5a76ea88faeb754359b7f7cd03") format("truetype"),
|
||||
url("./octicons.svg?91284a5a76ea88faeb754359b7f7cd03#octicons") format("svg");
|
||||
}
|
||||
|
||||
.octicon, .mega-octicon {
|
||||
@@ -235,14 +235,10 @@ url("./octicons.svg?1b0f2a9535896866c74dd24eedeb4374#octicons") format("svg");
|
||||
.octicon-zap:before { content: "\26a1" }
|
||||
.octicon-archive:before { content: "\f101" }
|
||||
.octicon-arrow-both:before { content: "\f102" }
|
||||
.octicon-error:before { content: "\f103" }
|
||||
.octicon-eye-closed:before { content: "\f104" }
|
||||
.octicon-fold-down:before { content: "\f105" }
|
||||
.octicon-fold-up:before { content: "\f106" }
|
||||
.octicon-github-action:before { content: "\f107" }
|
||||
.octicon-info-outline:before { content: "\f108" }
|
||||
.octicon-play:before { content: "\f109" }
|
||||
.octicon-remote:before { content: "\f10a" }
|
||||
.octicon-request-changes:before { content: "\f10b" }
|
||||
.octicon-smiley-outline:before { content: "\f10c" }
|
||||
.octicon-warning:before { content: "\f10d" }
|
||||
.octicon-eye-closed:before { content: "\f103" }
|
||||
.octicon-fold-down:before { content: "\f104" }
|
||||
.octicon-fold-up:before { content: "\f105" }
|
||||
.octicon-github-action:before { content: "\f106" }
|
||||
.octicon-play:before { content: "\f107" }
|
||||
.octicon-remote:before { content: "\f108" }
|
||||
.octicon-request-changes:before { content: "\f109" }
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
horiz-adv-x="625" d=" M312.5 632.5L0 257.5H187.5V7.5H437.5V257.5H625L312.5 632.5z" />
|
||||
<glyph glyph-name="beaker"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M881.8625 -40.39375L697.0187500000001 374.6875V593.4375H751.7062500000001V648.125H259.51625V593.4375H314.20375V374.6875L129.906875 -40.39375C113.500625 -76.4874999999999 140.2975 -117.5 179.6725 -117.5H832.6437500000001C872.01875 -117.5 898.26875 -76.4874999999999 882.40625 -40.39375H881.8625zM300.531875 210.625L368.89125 374.6875V593.4375H642.3312500000001V374.6875L710.6875 210.625H300.531875V210.625zM532.95375 320H587.64125V265.3125H532.95375V320V320zM478.26625 374.6875H423.57875V429.375H478.26625V374.6875V374.6875zM478.26625 538.75H532.95375V484.0625H478.26625V538.75V538.75zM478.26625 702.8125H423.57875V757.5H478.26625V702.8125V702.8125z" />
|
||||
horiz-adv-x="1000" d=" M898.75 -91.875L687.5 382.5V632.5H750V695H187.5V632.5H250V382.5L39.375 -91.875A62.5 62.5 0 0 1 96.25 -180H842.5C887.5000000000001 -180 917.5 -133.125 899.375 -91.875H898.75zM234.375 195L312.5 382.5V632.5H625V382.5L703.125 195H234.375zM500 320H562.5V257.5H500V320zM437.5 382.5H375V445H437.5V382.5zM437.5 570H500V507.5H437.5V570zM437.5 757.5H375V820H437.5V757.5z" />
|
||||
<glyph glyph-name="bell"
|
||||
unicode=""
|
||||
horiz-adv-x="875" d=" M816.66875 115.83125V57.5H0V115.83125L42.5833125 149.6687499999999C87.5 194.58125 89.833125 298.416875 112 407.5C156.916875 627.416875 350 699.166875 350 699.166875C350 731.25 376.25 757.5 408.333125 757.5C440.416875 757.5 466.666875 731.25 466.666875 699.166875C466.666875 699.166875 664.4187499999999 627.416875 709.33125 407.5C731.5 297.833125 733.8312500000001 194 778.75 149.6687499999999L817.25 115.83125H816.66875zM408.333125 -117.5C473.083125 -117.5 525 -65.5812499999999 525 -0.8312500000001H291.666875C291.666875 -65.5812499999999 343.583125 -117.5 408.333125 -117.5V-117.5z" />
|
||||
horiz-adv-x="937.5" d=" M875 70V7.5H0V70L45.625 106.25C93.75 154.375 96.25 265.6249999999999 120 382.5C168.125 618.125 375 695 375 695C375 729.375 403.125 757.5 437.5 757.5S500 729.375 500 695C500 695 711.875 618.125 760 382.5C783.7500000000001 265.0000000000001 786.25 153.75 834.375 106.25L875.625 70H875zM437.5 -180C506.8749999999999 -180 562.5 -124.375 562.5 -55H312.5C312.5 -124.375 368.125 -180 437.5 -180z" />
|
||||
<glyph glyph-name="bold"
|
||||
unicode=""
|
||||
horiz-adv-x="625" d=" M62.5 695H301.875C456.8750000000001 695 570.6249999999999 648.125 570.6249999999999 510.625C570.6249999999999 439.375 531.2499999999999 371.25 466.2499999999999 347.5V343.75C549.375 325 609.9999999999999 266.875 609.9999999999999 165C609.9999999999999 15.6249999999999 486.8749999999999 -55 321.8749999999999 -55H62.5V695zM291.25 385.625C395.625 385.625 440 426.875 440 491.25C440 564.375 391.25 591.875 293.75 591.875H195.625V385.6250000000001H291.25zM308.125 48.75C418.75 48.75 480 88.75 480 172.5C480 251.875 420.625 285.6250000000001 308.125 285.6250000000001H195.625V48.1250000000001H308.125V48.7500000000001z" />
|
||||
@@ -166,11 +166,8 @@
|
||||
<glyph glyph-name="ellipsis"
|
||||
unicode=""
|
||||
horiz-adv-x="750" d=" M687.5 507.5H62.5C28.125 507.5 0 479.375 0 445V195C0 160.625 28.125 132.5 62.5 132.5H687.5C721.875 132.5 750 160.625 750 195V445C750 479.375 721.875 507.5 687.5 507.5zM250 257.5H125V382.5H250V257.5zM437.5 257.5H312.5V382.5H437.5V257.5zM625 257.5H500V382.5H625V257.5z" />
|
||||
<glyph glyph-name="error"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M500 757.5C258.365625 757.5 62.5 561.6343750000001 62.5 320C62.5 78.3625000000001 258.365625 -117.5 500 -117.5C741.6374999999999 -117.5 937.5 78.3625000000001 937.5 320C937.5 561.6343750000001 741.6374999999999 757.5 500 757.5zM762.5 145L675 57.5L500 232.5L325 57.5L237.5 145L412.5 322.355625L237.5 495L325 582.5L500 407.5L675 582.5L762.5 495L587.5 322.355625L762.5 145z" />
|
||||
<glyph glyph-name="eye-closed"
|
||||
unicode=""
|
||||
unicode=""
|
||||
horiz-adv-x="1142.857142857143" d=" M1057.142857142857 812.8571428571429C1042.857142857143 827.1428571428571 1021.4285714285716 827.1428571428571 1007.1428571428572 812.8571428571429L857.1428571428573 655.7142857142857C778.5714285714288 712.8571428571429 685.7142857142858 748.5714285714286 578.5714285714287 748.5714285714286C214.2857142857144 755.7142857142857 1e-13 327.1428571428571 1e-13 327.1428571428571S85.7142857142858 162.8571428571429 235.7142857142859 34.2857142857142L85.7142857142858 -115.7142857142857C71.4285714285716 -130 71.4285714285716 -151.4285714285714 85.7142857142858 -165.7142857142857S121.4285714285716 -179.9999999999999 135.7142857142858 -165.7142857142857L1057.1428571428573 755.7142857142858C1071.4285714285716 770.0000000000001 1071.4285714285716 798.5714285714287 1057.1428571428573 812.857142857143zM642.8571428571429 448.5714285714286C621.4285714285714 462.8571428571429 600 470 571.4285714285714 470C492.8571428571429 470 428.5714285714286 405.7142857142857 428.5714285714286 327.1428571428572C428.5714285714286 298.5714285714286 435.7142857142857 277.1428571428571 450 255.7142857142858L350.0000000000001 148.5714285714287C307.1428571428572 198.5714285714286 285.7142857142857 255.7142857142858 285.7142857142857 327.1428571428572C285.7142857142857 484.2857142857144 414.2857142857143 612.8571428571429 571.4285714285714 612.8571428571429C635.7142857142858 612.8571428571429 700.0000000000001 591.4285714285716 750 548.5714285714287z M992.8571428571428 541.4285714285714L850 398.5714285714286C857.1428571428571 377.1428571428571 857.1428571428571 348.5714285714285 857.1428571428571 327.1428571428571C857.1428571428571 169.9999999999999 728.5714285714286 41.4285714285713 571.4285714285714 41.4285714285713C542.8571428571429 41.4285714285713 521.4285714285714 41.4285714285713 500 48.5714285714286L385.7142857142857 -65.7142857142858C442.8571428571429 -94.2857142857143 507.1428571428572 -108.5714285714285 578.5714285714287 -108.5714285714285C928.5714285714286 -108.5714285714285 1142.857142857143 320 1142.857142857143 320C1100 405.7142857142857 1050 477.1428571428572 992.8571428571428 541.4285714285714z" />
|
||||
<glyph glyph-name="eye"
|
||||
unicode=""
|
||||
@@ -209,10 +206,10 @@
|
||||
unicode=""
|
||||
horiz-adv-x="750" d=" M315.625 800.625C366.25 665 341.25 589.375 283.125 531.25C221.875 465.625 123.75 416.875 56.25 321.25C-34.375 193.1249999999999 -50 -86.8750000000001 276.875 -160C139.375 -87.5 110 122.5 258.125 253.125C220 126.25 291.25 45 379.375 74.375C466.25 103.7500000000001 523.1250000000001 41.2500000000001 521.25 -30C520 -78.7499999999999 501.8749999999999 -120 450.625 -143.125C664.3749999999999 -106.25 749.375 70.625 749.375 204.3749999999999C749.375 381.8749999999999 591.25 405.625 671.25 555C576.25 546.875 544.375 484.3749999999999 553.125 383.125C558.75 315.625 489.375 270.6249999999999 436.875 300C395 325.625 395.625 374.375 433.125 411.25C511.25 488.125 542.5 666.875 315.625 800L314.375 801.25L315.625 800.625z" />
|
||||
<glyph glyph-name="fold-down"
|
||||
unicode=""
|
||||
unicode=""
|
||||
horiz-adv-x="875" d=" M250 132.5L437.5 -55L625 132.5H500V507.5H375V132.5H250zM0 132.5C0 98.125 28.125 70 62.5 70H218.75L156.25 132.5H93.75L218.75 257.5H312.5V320H218.75L93.75 445H312.5V507.5H62.5C28.125 507.5 0 479.375 0 445L156.25 288.75L0 132.5zM656.25 257.5H562.5V320H656.25L781.25 445H562.5V507.5H812.5C846.875 507.5 875 479.375 875 445L718.75 288.75L875 132.5C875 98.125 846.875 70 812.5 70H656.25L718.75 132.5H781.25L656.25 257.5z" />
|
||||
<glyph glyph-name="fold-up"
|
||||
unicode=""
|
||||
unicode=""
|
||||
horiz-adv-x="875" d=" M625 445L437.5 632.5L250 445H375V70H500V445H625zM875 445C875 479.375 846.875 507.5 812.5 507.5H656.25L718.75 445H781.25L656.25 320H562.5V257.5H656.25L781.25 132.5H562.5V70H812.5C846.875 70 875 98.125 875 132.5L718.75 288.75L875 445zM218.75 320H312.5V257.5H218.75L93.75 132.5H312.5V70H62.5C28.125 70 0 98.125 0 132.5L156.25 288.75L0 445C0 479.375 28.125 507.5 62.5 507.5H218.75L156.25 445H93.75L218.75 320z" />
|
||||
<glyph glyph-name="fold"
|
||||
unicode=""
|
||||
@@ -245,7 +242,7 @@
|
||||
unicode=""
|
||||
horiz-adv-x="750" d=" M687.5 115V507.5C685.625 556.25 666.25 599.375 628.75 636.25C591.25 673.125 548.75 693.125 500 695H437.5V820L250 632.5L437.5 445V570H500C516.875 568.75 530 563.125 543.125 550.625C556.25 538.125 561.875 524.375 562.5 507.5V114.9999999999999A124.56250000000001 124.56250000000001 0 0 1 625 -117.5A124.56250000000001 124.56250000000001 0 0 1 687.5 115zM625 -67.5C583.75 -67.5 550 -33.1249999999999 550 7.5C550 48.125 584.3750000000001 82.5 625 82.5C665.625 82.5 700 48.1249999999999 700 7.5C700 -33.125 665.6249999999999 -67.5 625 -67.5zM250 632.5C250 701.875 194.375 757.5 125 757.5A124.56250000000001 124.56250000000001 0 0 1 62.5 525V114.9999999999999A124.56250000000001 124.56250000000001 0 0 1 125 -117.5A124.56250000000001 124.56250000000001 0 0 1 187.5 115V525C224.375 546.25 250 586.25 250 632.5zM200 7.5C200 -33.75 165.625 -67.5 125 -67.5C84.375 -67.5 50 -33.1249999999999 50 7.5C50 48.125 84.375 82.5 125 82.5C165.625 82.5 200 48.1249999999999 200 7.5zM125 557.5C83.75 557.5 50 591.875 50 632.5C50 673.125 84.375 707.5 125 707.5C165.625 707.5 200 673.125 200 632.5C200 591.875 165.625 557.5 125 557.5z" />
|
||||
<glyph glyph-name="github-action"
|
||||
unicode=""
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M687.5 476.25C687.5 424.4733047033631 729.4733047033632 382.5 781.25 382.5C833.0266952966368 382.5 875 424.4733047033631 875 476.25C875 528.026695296637 833.0266952966368 570 781.25 570C729.4733047033632 570 687.5 528.026695296637 687.5 476.25z M937.5 695H562.5C562.5 732.5 537.5 757.5 500 757.5S437.5 732.5 437.5 695H62.5C31.25 695 0 663.75 0 632.5V7.5C0 -23.75 31.25 -55 62.5 -55H437.5C437.5 -92.5 462.5 -117.5 500 -117.5S562.5 -92.5 562.5 -55H937.5C968.75 -55 1000 -23.75 1000 7.5V632.5C1000 663.75 968.75 695 937.5 695zM937.5 7.5H62.5V632.5H937.5z" />
|
||||
<glyph glyph-name="globe"
|
||||
unicode=""
|
||||
@@ -274,12 +271,9 @@
|
||||
<glyph glyph-name="inbox"
|
||||
unicode=""
|
||||
horiz-adv-x="875" d=" M875 257.5L804.3750000000001 703.75C799.3750000000001 733.75 773.1250000000001 757.5 741.8750000000001 757.5H133.125C101.875 757.5 75.625 733.75 70.625 703.75L0 257.5V-55C0 -89.375 28.125 -117.5 62.5 -117.5H812.5C846.875 -117.5 875 -89.375 875 -55V257.5zM670 223.125L642.5000000000001 167.4999999999999C631.8750000000001 146.2499999999999 610.0000000000001 132.4999999999999 585.6250000000001 132.4999999999999H288.125C264.375 132.4999999999999 243.1250000000001 146.2499999999999 232.5 166.8749999999999L205 223.7499999999999C194.375 244.375 172.5 258.125 149.375 258.125H62.5L125 695.625H750L812.5 258.125H726.2500000000001C701.875 258.125 680.625 244.375 669.375 223.7499999999999L670 223.125z" />
|
||||
<glyph glyph-name="info-outline"
|
||||
unicode=""
|
||||
horiz-adv-x="875" d=" M393.75 464.37625C381.875 476.25125 376.25 490.62625 376.25 508.12625C376.25 525.62625 381.875 540.62625 393.75 551.87625C405.625 563.12625 420 569.37625 437.5 569.37625C455 569.37625 470 563.75125 481.25 551.87625C492.5 540.00125 498.75 525.62625 498.75 508.12625C498.75 490.62625 493.125 475.62625 481.25 464.37625C469.375 453.12625 455 445.62625 437.5 445.62625C420 445.62625 405 452.50125 393.75 464.37625zM500 320.6268750000001C498.75 336.2518750000001 493.125 350.626875 480.625 363.751875C468.125 375.6268750000001 454.375 382.5012500000001 437.5 383.1268750000001H375C358.125 381.876875 345 375.0012500000001 331.875 363.751875C319.375 351.2512500000001 313.125 336.2518750000001 312.5 320.6268750000001H375V133.125C376.25 116.25 381.875 101.875 394.375 90C406.875 77.5 420.625 70.625 437.5 70.625H500C516.875 70.625 530 77.5 543.125 90C555.625 101.875 561.875 116.25 562.5 133.125H500V321.2518750000001V320.6268750000001zM437.5 676.25125C241.25 676.25125 81.25 517.50125 81.25 321.25125C81.25 125 241.25 -35 437.5 -35C633.75 -35 793.75 124.375 793.75 321.25125C793.75 518.12625 633.75 676.87625 437.5 676.87625V676.25125zM437.5 758.75125C678.75 758.75125 875 562.50125 875 321.25125C875 80 678.75 -116.25 437.5 -116.25C196.25 -116.25 0 78.75 0 321.25125C0 563.75125 196.25 758.75125 437.5 758.75125z" />
|
||||
<glyph glyph-name="info"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M500 757.5C257.6925 757.5 62.5 562.3075 62.5 320C62.5 77.69375 257.6925 -117.5 500 -117.5C742.30625 -117.5 937.5 77.69375 937.5 320C937.5 562.3075 742.30625 757.5 500 757.5zM560.57625 10.3812499999999H432.6925V447.884375H560.57625V10.3812499999999zM560.57625 508.460625H432.6925V636.346875H560.57625V508.460625z" />
|
||||
horiz-adv-x="875" d=" M393.75 464.375A58.875 58.875 0 0 0 376.25 508.125C376.25 525.625 381.875 540.625 393.75 551.875C405.625 563.125 420 569.375 437.5 569.375C455 569.375 470 563.75 481.25 551.875C492.5 540 498.75 525.625 498.75 508.125C498.75 490.6249999999999 493.1250000000001 475.625 481.25 464.375A62.5 62.5 0 0 0 437.5 445.625C420 445.625 405 452.5 393.75 464.375zM500 320.625C498.75 336.25 493.125 350.625 480.625 363.75C468.125 375.625 454.3750000000001 382.5 437.5 383.125H375C358.125 381.875 345 375 331.8750000000001 363.75C319.375 351.25 313.1250000000001 336.25 312.5000000000001 320.625H375.0000000000001V133.125C376.2500000000001 116.25 381.8750000000001 101.875 394.3750000000001 90C406.8750000000001 77.5000000000001 420.625 70.625 437.5 70.625H500C516.875 70.625 530 77.5 543.125 90C555.6249999999999 101.875 561.875 116.25 562.5 133.125H500V321.25V320.625zM437.5 676.25C241.25 676.25 81.25 517.5 81.25 321.2500000000001C81.25 125 241.25 -35 437.5 -35S793.75 124.3750000000001 793.75 321.2500000000001C793.75 518.125 633.7499999999999 676.875 437.5 676.875V676.25zM437.5 758.75C678.75 758.75 875 562.5 875 321.25S678.75 -116.25 437.5 -116.25S0 78.75 0 321.25S196.25 758.75 437.5 758.75z" />
|
||||
<glyph glyph-name="issue-closed"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M437.5 195H562.5V70H437.5V195zM562.5 570H437.5V257.5H562.5V570zM656.25 476.25L593.75 413.75L750 257.5L1000 538.75L937.5 601.25L750 382.5L656.25 476.25zM500 -36.25A356.87500000000006 356.87500000000006 0 0 0 143.75 320C143.75 516.25 303.75 676.25 500 676.25C614.375 676.25 715.625 621.25 781.25 538.75L838.75 596.25A434.18749999999994 434.18749999999994 0 0 1 500 757.5C258.75 757.5 62.5 561.25 62.5 320S258.7500000000001 -117.5 500 -117.5S937.5 78.75 937.5 320L842.5 225C801.25 74.375 663.7500000000001 -36.875 500 -36.875V-36.2500000000001z" />
|
||||
@@ -398,7 +392,7 @@
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M625 745V695L656.25 632.5L375 445H137.5C110 445 95.625 411.875 116.25 391.25L312.5 195L62.5 -117.5L375 132.5L571.25 -63.75A31.25 31.25 0 0 1 625 -42.5V195L812.5 476.25L875 445H925C952.5 445 966.875 478.125 946.25 498.75L678.75 766.25A31.25 31.25 0 0 1 625 745z" />
|
||||
<glyph glyph-name="play"
|
||||
unicode=""
|
||||
unicode=""
|
||||
horiz-adv-x="875" d=" M875 320A437.49999999999994 437.49999999999994 0 1 0 0 320A437.49999999999994 437.49999999999994 0 0 0 875 320zM361.0625 102.375L648.5 294A31.25 31.25 0 0 1 648.5 346L361.0625 537.625A31.25 31.25 0 0 1 312.5 511.625V128.3750000000001A31.25 31.25 0 0 1 361.0625 102.375z" />
|
||||
<glyph glyph-name="plug"
|
||||
unicode=""
|
||||
@@ -414,7 +408,7 @@
|
||||
horiz-adv-x="500" d=" M500 70H0V570H500V70z" />
|
||||
<glyph glyph-name="project"
|
||||
unicode=""
|
||||
horiz-adv-x="937.5" d=" M605.46875 101.25H769.53125V648.125H605.46875V101.25V101.25zM386.71875 210.625H550.78125V648.125H386.71875V210.625V210.625zM167.96875 -8.125H332.03125V648.125H167.96875V-8.125V-8.125zM113.28125 -62.8125H824.21875V702.8125H113.28125V-62.8125V-62.8125zM824.21875 757.5H113.28125C83.09375 757.5 58.59375 733 58.59375 702.8125V-62.8125C58.59375 -93 83.09375 -117.5 113.28125 -117.5H824.21875C854.40625 -117.5 878.90625 -93 878.90625 -62.8125V702.8125C878.90625 733 854.40625 757.5 824.21875 757.5V757.5V757.5z" />
|
||||
horiz-adv-x="937.5" d=" M375 695H562.5V195H375z M125 695H312.5V-55H125z M625 695H812.5V70H625z M875 820H62.5C25 820 0 795 0 757.5V-117.5C0 -155 25 -180 62.5 -180H875C912.5 -180 937.5 -155 937.5 -117.5V757.5C937.5 795 912.5 820 875 820zM875 -117.5H62.5V757.5H875z" />
|
||||
<glyph glyph-name="pulse"
|
||||
unicode=""
|
||||
horiz-adv-x="875" d=" M718.75 320L550 482.5L412.5 288.75L343.75 720L148.75 320H0V195H225L281.25 307.5L337.5 -30L562.5 288.75L662.5 195H875V320H718.75z" />
|
||||
@@ -428,7 +422,7 @@
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M299.375 438.125C315 453.75 315 480 299.375 495.625C279.375 516.25 269.3750000000001 543.125 269.3750000000001 570C269.3750000000001 596.875 279.3750000000001 623.75 299.3750000000001 644.375C315.0000000000001 660.625 315.0000000000001 686.25 299.3750000000001 701.875A38.3125 38.3125 0 0 1 271.2500000000001 713.75C261.2500000000001 713.75 250.6250000000001 710 243.1250000000001 701.875C207.5000000000001 665.625 190 617.5 190 570C190 522.5 208.125 474.375 243.1250000000001 438.1250000000001C258.7500000000001 422.5000000000001 284.3750000000001 422.5000000000001 299.3750000000001 438.1250000000001zM145.625 787.5A40.6875 40.6875 0 0 1 88.125 787.5C30 727.5 0.625 648.75 0.625 570.625C0.625 491.875 30 413.125 88.125 353.125C103.75 336.875 129.375 336.875 145 353.125S160.625 395.625 145 411.875C102.5 455.6249999999999 81.25 513.125 81.25 570.625C81.25 628.1249999999999 102.5 685.6249999999999 145 729.3749999999999A41.25 41.25 0 0 1 145.625 787.4999999999999zM501.25 468.7500000000001A101.25 101.25 0 1 1 400 570C399.3750000000001 514.375 445 468.75 501.25 468.75zM911.875 786.875A39.25 39.25 0 0 1 855 786.875C839.375 770.625 839.375 744.375 855 728.125C897.5 684.375 918.75 626.875 918.75 569.375C918.75 511.875 897.5 455 855 410.625C839.375 394.375 839.375 368.1250000000001 855 351.875A40.6875 40.6875 0 0 1 912.5 351.875C970.625 411.875 1000 490.625 1000 569.375A315.5 315.5 0 0 1 911.875 786.875zM501.25 387.5C475.6249999999999 387.5 449.375 393.75 426.25 406.25L229.375 -116.8749999999999H322.5L376.25 -54.3749999999999H626.25L678.75 -116.8749999999999H771.875L575.625 406.25C551.875 393.75 526.8750000000001 387.5 501.2500000000001 387.5zM500.625 357.5L563.75 132.5H438.75L500.625 357.5zM376.25 8.125L438.75 70.625H563.75L626.25 8.125H376.25zM700.625 701.875C685 686.25 685 660 700.625 644.375C720.6250000000001 623.75 730.6250000000001 596.875 730.6250000000001 570C730.6250000000001 543.125 720.6250000000001 516.25 700.625 495.6250000000001C685 479.3750000000001 685 453.7500000000001 700.625 438.1250000000001A39.375 39.375 0 0 1 756.8750000000001 438.1250000000001C792.5000000000001 474.3750000000001 810 522.5 810 570C810 617.5 792.5000000000001 665.625 756.8750000000001 701.875A39.625 39.625 0 0 1 700.625 701.875z" />
|
||||
<glyph glyph-name="remote"
|
||||
unicode=""
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M524.97125 425.9231250000001L794.09375 156.8L875 237.615625L686.69375 425.9231250000001L875 614.184375L794.09375 695L524.97125 425.9231250000001zM313.3075 225.89875L125 414.20625L205.9075 495.02125L474.984375 225.89875L205.9075 -43.2687500000001L125 37.59375L313.3075 225.89875z" />
|
||||
<glyph glyph-name="reply"
|
||||
unicode=""
|
||||
@@ -455,7 +449,7 @@
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M437.5 320H562.5V195H437.5z M437.5 632.5H562.5V382.5H437.5z M937.5 757.5H62.5C25 757.5 0 732.5 0 695V132.5C0 95 25 70 62.5 70H187.5V-180L437.5 70H937.5C975 70 1000 95 1000 132.5V695C1000 732.5 975 757.5 937.5 757.5zM937.5 132.5H406.25L250 -23.75V132.5H62.5V695H937.5z" />
|
||||
<glyph glyph-name="request-changes"
|
||||
unicode=""
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M0 757.5A62.5 62.5 0 0 0 62.5 820H937.5A62.5 62.5 0 0 0 1000 757.5V132.5A62.5 62.5 0 0 0 937.5 70H468.75L250 -148.75V70H62.5A62.5 62.5 0 0 0 0 132.5V757.5zM62.5 757.5V132.5H312.5V7.5L437.5 132.5H937.5V757.5H62.5zM531.25 570H656.25V507.5H531.25V382.5H468.75V507.5H343.75V570H468.75V695H531.25V570zM656.25 257.5H343.75V320H656.25V257.5z" />
|
||||
<glyph glyph-name="rocket"
|
||||
unicode=""
|
||||
@@ -490,12 +484,9 @@
|
||||
<glyph glyph-name="sign-out"
|
||||
unicode=""
|
||||
horiz-adv-x="941.1764705882352" d=" M705.8823529411765 290.5882352941177V408.2352941176471H470.5882352941176V525.8823529411765H705.8823529411765V643.5294117647059L941.1764705882352 467.0588235294118L705.8823529411765 290.5882352941177zM588.2352941176471 114.1176470588235H352.9411764705883V643.5294117647059L117.6470588235294 761.1764705882352H588.2352941176471V584.7058823529412H647.0588235294117V761.1764705882352C647.0588235294117 793.5294117647059 620.5882352941177 820 588.2352941176471 820H58.8235294117647C26.4705882352941 820 0 793.5294117647059 0 761.1764705882352V91.7647058823529C0 68.8235294117646 12.9411764705882 48.8235294117646 32.3529411764706 38.2352941176471L352.9411764705883 -121.764705882353V55.2941176470589H588.2352941176471C620.5882352941177 55.2941176470589 647.0588235294117 81.7647058823529 647.0588235294117 114.1176470588235V349.4117647058824H588.2352941176471V114.1176470588235z" />
|
||||
<glyph glyph-name="smiley-outline"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M500 820C223.75 820 0 596.25 0 320C0 43.75 223.75 -180 500 -180C776.25 -180 1000 43.75 1000 320C1000 596.25 776.25 820 500 820zM800.625 19.375C761.25 -20 715.625 -50 665 -71.25C613.125 -93.75 557.5 -104.375 500 -104.375C442.5 -104.375 386.875 -93.75 335 -71.25C284.375 -50 238.125 -19.375 199.375 19.375C160.625 58.125 130 104.375 108.75 155C86.25 206.875 75.625 262.5 75.625 320C75.625 377.5 86.25 433.125 108.75 485C130 535.625 160.625 581.875 199.375 620.625C238.125 659.375 284.375 690 335 711.25C386.875 733.75 442.5 744.375 500 744.375C557.5 744.375 613.125 733.75 665 711.25C715.625 690 761.875 659.375 800.625 620.625C839.375 581.875 870 535.625 891.25 485C913.75 433.125 924.375 377.5 924.375 320C924.375 262.5 913.75 206.875 891.25 155C870 104.375 839.375 58.125 800.625 19.375zM250 395V431.875C250 473.125 283.125 506.25 325 506.25H361.875C403.125 506.25 436.25 473.125 436.25 431.875V395C436.25 353.125 403.125 320 361.875 320H325C283.125 320 250 353.125 250 395zM562.5 395V431.875C562.5 473.125 595.625 506.25 637.5 506.25H674.375C715.625 506.25 748.75 473.125 748.75 431.875V395C748.75 353.125 715.625 320 674.375 320H637.5C595.625 320 562.5 353.125 562.5 395zM812.5 195C767.5 77.5 630.625 7.5 500 7.5C369.375 7.5 232.5 78.125 187.5 195C178.75 219.375 201.875 257.5 228.75 257.5H765.625C791.25 257.5 821.25 219.375 812.5 195z" />
|
||||
<glyph glyph-name="smiley"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M500 757.5C258.375 757.5 62.5 561.625 62.5 320C62.5 78.375 258.375 -117.5 500 -117.5C741.625 -117.5 937.5 78.375 937.5 320C937.5 561.625 741.625 757.5 500 757.5zM653.125 582.5C689.375 582.5 718.75 543.3125 718.75 495C718.75 446.6875 689.375 407.5 653.125 407.5C616.875 407.5 587.5 446.6875 587.5 495C587.5 543.3125 616.875 582.5 653.125 582.5zM346.875 582.5C383.125 582.5 412.5 543.3125 412.5 495C412.5 446.6875 383.125 407.5 346.875 407.5C310.625 407.5 281.25 446.6875 281.25 495C281.25 543.3125 310.625 582.5 346.875 582.5zM778.1875 221.5625C736.4375 103.8125 624.6875 24.6875 500 24.6875C375.3125 24.6875 263.5 103.8125 221.8125 221.5C215.75 238.5625 224.6875 257.3125 241.75 263.375C258.9375 269.4375 277.625 260.4375 283.625 243.375C316.0625 151.8125 403 90.25 499.9375 90.25C596.875 90.25 683.75 151.75 716.25 243.375C722.3125 260.4375 741.25 269.4375 758.125 263.375C775.25 257.375 784.25 238.625 778.1875 221.5625z" />
|
||||
horiz-adv-x="1000" d=" M500 820C223.75 820 0 596.25 0 320S223.75 -180 500 -180S1000 43.75 1000 320S776.25 820 500 820zM800.6249999999999 19.375A419.99999999999994 419.99999999999994 0 0 0 664.9999999999999 -71.25C613.1249999999999 -93.75 557.4999999999999 -104.375 499.9999999999999 -104.375C442.4999999999999 -104.375 386.8749999999999 -93.75 334.9999999999999 -71.25C284.3749999999999 -50 238.1249999999999 -19.375 199.3749999999999 19.375A423.31249999999994 423.31249999999994 0 0 0 108.7499999999999 155A411.875 411.875 0 0 0 75.625 320C75.625 377.5 86.25 433.1250000000001 108.75 485.0000000000001C130 535.625 160.625 581.875 199.375 620.625C238.125 659.375 284.375 690 335 711.25A411.875 411.875 0 0 0 500 744.375C557.5 744.375 613.125 733.75 665 711.25C715.6250000000001 690 761.8750000000001 659.375 800.625 620.625C839.375 581.875 870 535.625 891.25 485.0000000000001C913.75 433.1250000000001 924.375 377.5000000000001 924.375 320C924.375 262.5 913.75 206.875 891.25 155C870 104.3749999999999 839.375 58.1249999999999 800.625 19.375zM250 395V431.875C250 473.125 283.125 506.25 325 506.25H361.875C403.125 506.25 436.25 473.125 436.25 431.8750000000001V395.0000000000001C436.25 353.1250000000001 403.125 320.0000000000001 361.8750000000001 320.0000000000001H325C283.125 320 250 353.125 250 395zM562.5 395V431.875C562.5 473.125 595.625 506.25 637.5 506.25H674.375C715.625 506.25 748.7499999999999 473.125 748.7499999999999 431.8750000000001V395.0000000000001C748.7499999999999 353.1250000000001 715.625 320.0000000000001 674.375 320.0000000000001H637.5C595.625 320 562.5 353.125 562.5 395zM812.5 195C767.5 77.5000000000001 630.625 7.5 500 7.5S232.5 78.1249999999999 187.5 195C178.75 219.375 201.875 257.5 228.75 257.5H765.625C791.25 257.5 821.25 219.375 812.5 195z" />
|
||||
<glyph glyph-name="squirrel"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M750 757.5C611.875 757.5 500 675.625 500 575C500 453.7500000000001 531.25 385.6250000000001 500 195C500 476.25 326.875 591.25 250 591.25C253.125 622.5 220 632.5 220 632.5S206.25 625.625 201.25 611.25C184.375 630.625 166.25 628.125 166.25 628.125L158.125 591.875S43.75 551.875 42.5 390.625C55 370 138.125 353.125 196.875 363.75C252.5 360.625 238.7500000000001 314.375 226.25 301.875C173.75 249.375 125 320 62.5 320S0 257.5 62.5 257.5S125 195 250 195C56.875 120 250 -55 250 -55H187.5C125 -55 125 -117.5 125 -117.5H500C687.5 -117.5 812.5 -55 812.5 99.375C812.5 152.5 785.625 211.2500000000001 750 257.5C680.625 348.75 764.375 425 812.5 382.5C860.625 340 1000 320 1000 507.5C1000 645.625 888.125 757.5 750 757.5zM156.25 445C138.75 445 125 458.75 125 476.25S138.75 507.5 156.25 507.5S187.5 493.75 187.5 476.25S173.75 445 156.25 445z" />
|
||||
@@ -534,7 +525,7 @@
|
||||
horiz-adv-x="1000" d=" M998.75 309.375L938.125 -62.5000000000001C927.5 -148.75 820.625 -180 750 -180H355.625C343.125 -180 331.8750000000001 -176.875 322.5 -171.25L232.5 -117.5H125C58.75 -117.5 0 -58.75 0 7.5V257.5C0 323.7500000000001 58.75 383.75 125 382.5H250C306.875 382.5 336.875 410.625 399.3750000000001 479.375C456.2500000000001 541.875 454.3750000000001 591.875 438.7500000000001 683.75C433.75 715 442.5 746.25 465 772.5C489.375 801.875 526.25 820 562.5 820C676.875 820 750 588.125 750 506.875L748.75 445.625H876.25C948.75 445.625 998.1249999999998 395.625 1000 322.5C1000 315.625 998.75 309.375 998.75 309.375zM875.625 383.75H751.25C707.5 383.75 686.875 401.25 686.875 444.375L688.75 508.75C688.75 588.125 615.625 758.75 563.75 758.75C532.5 758.75 496.2499999999999 727.5 501.25 696.25C516.875 597.5 522.5 522.5 445.625 437.5C381.875 366.875 335 320 250 320V-55L354.375 -117.5H750C795.625 -117.5 871.875 -98.125 875 -55L876.25 -53.75L938.75 321.25C936.875 361.25 914.9999999999998 383.75 876.25 383.75H875.625z" />
|
||||
<glyph glyph-name="tools"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M307.5 359.920625C321.71875 345.701875 377.5 287.18625 377.5 287.18625L408.125 318.9050000000001L360 368.6706250000001L452.421875 467.108125C452.421875 467.108125 410.859375 507.576875 428.90625 491.7175C446.40625 556.795625 430.546875 628.983125 381.328125 679.8425C332.109375 730.155 262.65625 746.56125 200.3125 729.608125L305.859375 620.233125L277.96875 513.045625L174.609375 484.608125L69.0625 593.983125C52.1095625 529.451875 67.96875 457.81125 117.1875 407.4987500000001C168.59375 353.9050000000001 242.421875 338.5925000000001 307.5 359.920625V359.920625zM659.6875 253.826875L532.265625 128.0437499999999L742.2687500000001 -89.6125000000001C759.21875 -107.65625 782.1875 -116.40625 804.6125 -116.40625C827.03125 -116.40625 849.4562500000001 -107.65625 866.95625 -89.6125000000001C901.40625 -54.0625 901.40625 3.35625 866.95625 38.90625L659.6875 253.826875V253.826875zM937.5 619.140625L803.51875 757.5L408.671875 349.53125L456.796875 299.765625L221.09375 55.8625L166.953125 26.875L90.9375 -97.2687499999999L110.078125 -117.5L230.390625 -38.75L258.28125 17.03125L494.53125 260.9375L542.65625 211.171875L937.5 619.140625V619.140625z" />
|
||||
horiz-adv-x="1000" d=" M280 365.625C296.25 349.3750000000001 360.0000000000001 282.5 360.0000000000001 282.5L395 318.75L340 375.6250000000001L445.6250000000001 488.125S398.1250000000001 534.375 418.7500000000001 516.25C438.7500000000001 590.625 420.6250000000001 673.125 364.3750000000001 731.25C308.125 788.75 228.75 807.5 157.5 788.125L278.125 663.125L246.2500000000001 540.625L128.1250000000001 508.125L7.5 633.125C-11.875 559.375 6.25 477.5 62.5 420C121.25 358.75 205.625 341.25 280 365.625zM682.5000000000001 244.3750000000001L536.8750000000001 100.6250000000001L776.8750000000001 -148.1249999999999C796.2500000000001 -168.7499999999999 822.5000000000001 -178.7499999999999 848.1250000000001 -178.7499999999999C873.7500000000001 -178.7499999999999 899.3750000000001 -168.7499999999999 919.3750000000002 -148.1249999999999C958.7500000000002 -107.4999999999999 958.7500000000002 -41.875 919.3750000000002 -1.2499999999999L682.5000000000001 244.3750000000001zM1000 661.875L846.875 820L395.625 353.75L450.625 296.875L181.25 18.1250000000001L119.375 -14.9999999999999L32.5 -156.8749999999998L54.375 -179.9999999999998L191.8750000000001 -89.9999999999998L223.7500000000001 -26.2499999999999L493.75 252.5L548.7500000000001 195.625L1000 661.875z" />
|
||||
<glyph glyph-name="trashcan"
|
||||
unicode=""
|
||||
horiz-adv-x="750" d=" M687.5 695H562.5C562.5 729.375 534.375 757.5 500 757.5H312.5C278.125 757.5 250 729.375 250 695H125C90.625 695 62.5 666.875 62.5 632.5V570C62.5 535.625 90.625 507.5 125 507.5V-55C125 -89.375 153.125 -117.5 187.5 -117.5H625C659.375 -117.5 687.5 -89.375 687.5 -55V507.5C721.875 507.5 750 535.625 750 570V632.5C750 666.875 721.875 695 687.5 695zM625 -55H187.5V507.5H250V7.5H312.5V507.5H375V7.5H437.5V507.5H500V7.5H562.5V507.5H625V-55zM687.5 570H125V632.5H687.5V570z" />
|
||||
@@ -565,9 +556,6 @@
|
||||
<glyph glyph-name="versions"
|
||||
unicode=""
|
||||
horiz-adv-x="875" d=" M812.5 632.5H437.5C403.125 632.5 375 604.375 375 570V70C375 35.625 403.125 7.5 437.5 7.5H812.5C846.875 7.5 875 35.625 875 70V570C875 604.375 846.875 632.5 812.5 632.5zM750 132.5H500V507.5H750V132.5zM250 570H312.5V507.5H250V132.5H312.5V70H250C215.625 70 187.5 98.125 187.5 132.5V507.5C187.5 541.875 215.625 570 250 570zM62.5 507.5H125V445H62.5V195H125V132.5H62.5C28.125 132.5 0 160.625 0 195V445C0 479.375 28.125 507.5 62.5 507.5z" />
|
||||
<glyph glyph-name="warning"
|
||||
unicode=""
|
||||
horiz-adv-x="1000" d=" M543.75 757.5H456.25L62.5 -30L150 -117.5H850L937.5 -30L543.75 757.5zM543.75 -30H456.25V57.5H543.75V-30zM543.75 145H456.25V495H543.75V145z" />
|
||||
<glyph glyph-name="watch"
|
||||
unicode=""
|
||||
horiz-adv-x="750" d=" M375 320H500V257.5H312.5V507.5H375V320zM750 320C750 181.25 675 60 562.5 -4.3750000000001V-117.5C562.5 -151.875 534.375 -180 500 -180H250C215.625 -180 187.5 -151.875 187.5 -117.5V-4.375C75 60 0 181.25 0 320S75 580 187.5 644.375V757.5C187.5 791.875 215.625 820 250 820H500C534.375 820 562.5 791.875 562.5 757.5V644.375C675 580 750 458.75 750 320zM687.5 320C687.5 493.125 548.125 632.5 375 632.5S62.5 493.125 62.5 320S201.875 7.5 375 7.5S687.5 146.875 687.5 320z" />
|
||||
|
||||
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 127 KiB |
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./sash';
|
||||
import { IDisposable, dispose, Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { isIPad } from 'vs/base/browser/browser';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import * as types from 'vs/base/common/types';
|
||||
@@ -95,14 +95,14 @@ export class Sash extends Disposable {
|
||||
|
||||
linkedSash: Sash | undefined = undefined;
|
||||
|
||||
private readonly orthogonalStartSashDisposables = this._register(new DisposableStore());
|
||||
private orthogonalStartSashDisposables: IDisposable[] = [];
|
||||
private _orthogonalStartSash: Sash | undefined;
|
||||
get orthogonalStartSash(): Sash | undefined { return this._orthogonalStartSash; }
|
||||
set orthogonalStartSash(sash: Sash | undefined) {
|
||||
this.orthogonalStartSashDisposables.clear();
|
||||
this.orthogonalStartSashDisposables = dispose(this.orthogonalStartSashDisposables);
|
||||
|
||||
if (sash) {
|
||||
this.orthogonalStartSashDisposables.add(sash.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange, this));
|
||||
sash.onDidEnablementChange(this.onOrthogonalStartSashEnablementChange, this, this.orthogonalStartSashDisposables);
|
||||
this.onOrthogonalStartSashEnablementChange(sash.state);
|
||||
} else {
|
||||
this.onOrthogonalStartSashEnablementChange(SashState.Disabled);
|
||||
@@ -111,14 +111,14 @@ export class Sash extends Disposable {
|
||||
this._orthogonalStartSash = sash;
|
||||
}
|
||||
|
||||
private readonly orthogonalEndSashDisposables = this._register(new DisposableStore());
|
||||
private orthogonalEndSashDisposables: IDisposable[] = [];
|
||||
private _orthogonalEndSash: Sash | undefined;
|
||||
get orthogonalEndSash(): Sash | undefined { return this._orthogonalEndSash; }
|
||||
set orthogonalEndSash(sash: Sash | undefined) {
|
||||
this.orthogonalEndSashDisposables.clear();
|
||||
this.orthogonalEndSashDisposables = dispose(this.orthogonalEndSashDisposables);
|
||||
|
||||
if (sash) {
|
||||
this.orthogonalEndSashDisposables.add(sash.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange, this));
|
||||
sash.onDidEnablementChange(this.onOrthogonalEndSashEnablementChange, this, this.orthogonalEndSashDisposables);
|
||||
this.onOrthogonalEndSashEnablementChange(sash.state);
|
||||
} else {
|
||||
this.onOrthogonalEndSashEnablementChange(SashState.Disabled);
|
||||
@@ -384,6 +384,9 @@ export class Sash extends Disposable {
|
||||
dispose(): void {
|
||||
super.dispose();
|
||||
|
||||
this.orthogonalStartSashDisposables = dispose(this.orthogonalStartSashDisposables);
|
||||
this.orthogonalEndSashDisposables = dispose(this.orthogonalEndSashDisposables);
|
||||
|
||||
if (this.el && this.el.parentElement) {
|
||||
this.el.parentElement.removeChild(this.el);
|
||||
}
|
||||
|
||||
@@ -108,12 +108,6 @@ export abstract class AbstractScrollbar extends Widget {
|
||||
this._sliderMouseDown(e, () => { /*nothing to do*/ });
|
||||
}
|
||||
});
|
||||
|
||||
this.onclick(this.slider.domNode, e => {
|
||||
if (e.leftButton) {
|
||||
e.stopPropagation();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// ----------------- Update state
|
||||
|
||||
@@ -14,12 +14,11 @@ import { IListStyles } from 'vs/base/browser/ui/list/listWidget';
|
||||
import { SelectBoxNative } from 'vs/base/browser/ui/selectBox/selectBoxNative';
|
||||
import { SelectBoxList } from 'vs/base/browser/ui/selectBox/selectBoxCustom';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
|
||||
// Public SelectBox interface - Calls routed to appropriate select implementation class
|
||||
|
||||
export interface ISelectBoxDelegate extends IDisposable {
|
||||
export interface ISelectBoxDelegate {
|
||||
|
||||
// Public SelectBox Interface
|
||||
readonly onDidSelect: Event<ISelectData>;
|
||||
@@ -28,6 +27,7 @@ export interface ISelectBoxDelegate extends IDisposable {
|
||||
setAriaLabel(label: string): void;
|
||||
focus(): void;
|
||||
blur(): void;
|
||||
dispose(): void;
|
||||
|
||||
// Delegated Widget interface
|
||||
render(container: HTMLElement): void;
|
||||
@@ -147,4 +147,5 @@ export class SelectBox extends Widget implements ISelectBoxDelegate {
|
||||
|
||||
return option;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import 'vs/css!./selectBoxCustom';
|
||||
|
||||
import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { KeyCode, KeyCodeUtils } from 'vs/base/common/keyCodes';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
@@ -85,7 +85,7 @@ class SelectListRenderer implements IListRenderer<ISelectOptionItem, ISelectList
|
||||
}
|
||||
}
|
||||
|
||||
export class SelectBoxList extends Disposable implements ISelectBoxDelegate, IListVirtualDelegate<ISelectOptionItem> {
|
||||
export class SelectBoxList implements ISelectBoxDelegate, IListVirtualDelegate<ISelectOptionItem> {
|
||||
|
||||
private static readonly DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN = 32;
|
||||
private static readonly DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN = 2;
|
||||
@@ -98,6 +98,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
private options: ISelectOptionItem[];
|
||||
private selected: number;
|
||||
private readonly _onDidSelect: Emitter<ISelectData>;
|
||||
private toDispose: IDisposable[];
|
||||
private styles: ISelectBoxStyles;
|
||||
private listRenderer: SelectListRenderer;
|
||||
private contextViewProvider: IContextViewProvider;
|
||||
@@ -116,7 +117,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
|
||||
constructor(options: ISelectOptionItem[], selected: number, contextViewProvider: IContextViewProvider, styles: ISelectBoxStyles, selectBoxOptions?: ISelectBoxOptions) {
|
||||
|
||||
super();
|
||||
this.toDispose = [];
|
||||
this._isVisible = false;
|
||||
this.selectBoxOptions = selectBoxOptions || Object.create(null);
|
||||
|
||||
@@ -136,7 +137,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
}
|
||||
|
||||
this._onDidSelect = new Emitter<ISelectData>();
|
||||
this._register(this._onDidSelect);
|
||||
this.toDispose.push(this._onDidSelect);
|
||||
|
||||
this.styles = styles;
|
||||
|
||||
@@ -190,21 +191,18 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
|
||||
// Parent native select keyboard listeners
|
||||
|
||||
this._register(dom.addStandardDisposableListener(this.selectElement, 'change', (e) => {
|
||||
this.toDispose.push(dom.addStandardDisposableListener(this.selectElement, 'change', (e) => {
|
||||
this.selected = e.target.selectedIndex;
|
||||
this._onDidSelect.fire({
|
||||
index: e.target.selectedIndex,
|
||||
selected: e.target.value
|
||||
});
|
||||
if (!!this.options[this.selected] && !!this.options[this.selected].text) {
|
||||
this.selectElement.title = this.options[this.selected].text;
|
||||
}
|
||||
}));
|
||||
|
||||
// Have to implement both keyboard and mouse controllers to handle disabled options
|
||||
// Intercept mouse events to override normal select actions on parents
|
||||
|
||||
this._register(dom.addDisposableListener(this.selectElement, dom.EventType.CLICK, (e) => {
|
||||
this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.CLICK, (e) => {
|
||||
dom.EventHelper.stop(e);
|
||||
|
||||
if (this._isVisible) {
|
||||
@@ -214,13 +212,13 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
}
|
||||
}));
|
||||
|
||||
this._register(dom.addDisposableListener(this.selectElement, dom.EventType.MOUSE_DOWN, (e) => {
|
||||
this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.MOUSE_DOWN, (e) => {
|
||||
dom.EventHelper.stop(e);
|
||||
}));
|
||||
|
||||
// Intercept keyboard handling
|
||||
|
||||
this._register(dom.addDisposableListener(this.selectElement, dom.EventType.KEY_DOWN, (e: KeyboardEvent) => {
|
||||
this.toDispose.push(dom.addDisposableListener(this.selectElement, dom.EventType.KEY_DOWN, (e: KeyboardEvent) => {
|
||||
const event = new StandardKeyboardEvent(e);
|
||||
let showDropDown = false;
|
||||
|
||||
@@ -290,9 +288,6 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
}
|
||||
|
||||
this.selectElement.selectedIndex = this.selected;
|
||||
if (!!this.options[this.selected] && !!this.options[this.selected].text) {
|
||||
this.selectElement.title = this.options[this.selected].text;
|
||||
}
|
||||
}
|
||||
|
||||
public setAriaLabel(label: string): void {
|
||||
@@ -415,7 +410,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
let listBackground = this.styles.selectListBackground ? this.styles.selectListBackground.toString() : background;
|
||||
this.selectDropDownListContainer.style.backgroundColor = listBackground;
|
||||
this.selectionDetailsPane.style.backgroundColor = listBackground;
|
||||
const optionsBorder = this.styles.focusBorder ? this.styles.focusBorder.toString() : '';
|
||||
const optionsBorder = this.styles.focusBorder ? this.styles.focusBorder.toString() : null;
|
||||
this.selectDropDownContainer.style.outlineColor = optionsBorder;
|
||||
this.selectDropDownContainer.style.outlineOffset = '-1px';
|
||||
}
|
||||
@@ -749,26 +744,27 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
.filter(() => this.selectList.length > 0)
|
||||
.map(e => new StandardKeyboardEvent(e));
|
||||
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Enter).on(e => this.onEnter(e), this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Escape).on(e => this.onEscape(e), this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.UpArrow).on(this.onUpArrow, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.DownArrow).on(this.onDownArrow, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.PageDown).on(this.onPageDown, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.PageUp).on(this.onPageUp, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Home).on(this.onHome, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.End).on(this.onEnd, this));
|
||||
this._register(onSelectDropDownKeyDown.filter(e => (e.keyCode >= KeyCode.KEY_0 && e.keyCode <= KeyCode.KEY_Z) || (e.keyCode >= KeyCode.US_SEMICOLON && e.keyCode <= KeyCode.NUMPAD_DIVIDE)).on(this.onCharacter, this));
|
||||
onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Enter).on(e => this.onEnter(e), this, this.toDispose);
|
||||
onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Escape).on(e => this.onEscape(e), this, this.toDispose);
|
||||
onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.UpArrow).on(this.onUpArrow, this, this.toDispose);
|
||||
onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.DownArrow).on(this.onDownArrow, this, this.toDispose);
|
||||
onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.PageDown).on(this.onPageDown, this, this.toDispose);
|
||||
onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.PageUp).on(this.onPageUp, this, this.toDispose);
|
||||
onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.Home).on(this.onHome, this, this.toDispose);
|
||||
onSelectDropDownKeyDown.filter(e => e.keyCode === KeyCode.End).on(this.onEnd, this, this.toDispose);
|
||||
onSelectDropDownKeyDown.filter(e => (e.keyCode >= KeyCode.KEY_0 && e.keyCode <= KeyCode.KEY_Z) || (e.keyCode >= KeyCode.US_SEMICOLON && e.keyCode <= KeyCode.NUMPAD_DIVIDE)).on(this.onCharacter, this, this.toDispose);
|
||||
|
||||
// SetUp list mouse controller - control navigation, disabled items, focus
|
||||
|
||||
this._register(Event.chain(domEvent(this.selectList.getHTMLElement(), 'mouseup'))
|
||||
Event.chain(domEvent(this.selectList.getHTMLElement(), 'mouseup'))
|
||||
.filter(() => this.selectList.length > 0)
|
||||
.on(e => this.onMouseUp(e), this));
|
||||
.on(e => this.onMouseUp(e), this, this.toDispose);
|
||||
|
||||
|
||||
this._register(this.selectList.onDidBlur(_ => this.onListBlur()));
|
||||
this._register(this.selectList.onMouseOver(e => typeof e.index !== 'undefined' && this.selectList.setFocus([e.index])));
|
||||
this._register(this.selectList.onFocusChange(e => this.onListFocus(e)));
|
||||
this.toDispose.push(
|
||||
this.selectList.onDidBlur(_ => this.onListBlur()),
|
||||
this.selectList.onMouseOver(e => typeof e.index !== 'undefined' && this.selectList.setFocus([e.index])),
|
||||
this.selectList.onFocusChange(e => this.onListFocus(e))
|
||||
);
|
||||
|
||||
this.selectList.getHTMLElement().setAttribute('aria-label', this.selectBoxOptions.ariaLabel || '');
|
||||
this.selectList.getHTMLElement().setAttribute('aria-expanded', 'true');
|
||||
@@ -820,11 +816,7 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
this._onDidSelect.fire({
|
||||
index: this.selectElement.selectedIndex,
|
||||
selected: this.options[this.selected].text
|
||||
|
||||
});
|
||||
if (!!this.options[this.selected] && !!this.options[this.selected].text) {
|
||||
this.selectElement.title = this.options[this.selected].text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -915,9 +907,6 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
index: this.selectElement.selectedIndex,
|
||||
selected: this.options[this.selected].text
|
||||
});
|
||||
if (!!this.options[this.selected] && !!this.options[this.selected].text) {
|
||||
this.selectElement.title = this.options[this.selected].text;
|
||||
}
|
||||
}
|
||||
|
||||
this.hideSelectDropDown(true);
|
||||
@@ -1048,6 +1037,6 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
|
||||
|
||||
public dispose(): void {
|
||||
this.hideSelectDropDown(false);
|
||||
super.dispose();
|
||||
this.toDispose = dispose(this.toDispose);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { KeyCode } from 'vs/base/common/keyCodes';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
@@ -11,7 +11,7 @@ import * as arrays from 'vs/base/common/arrays';
|
||||
import { ISelectBoxDelegate, ISelectOptionItem, ISelectBoxOptions, ISelectBoxStyles, ISelectData } from 'vs/base/browser/ui/selectBox/selectBox';
|
||||
import { isMacintosh } from 'vs/base/common/platform';
|
||||
|
||||
export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
|
||||
export class SelectBoxNative implements ISelectBoxDelegate {
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
public selectElement: HTMLSelectElement;
|
||||
@@ -19,10 +19,11 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
|
||||
private options: ISelectOptionItem[];
|
||||
private selected: number;
|
||||
private readonly _onDidSelect: Emitter<ISelectData>;
|
||||
private toDispose: IDisposable[];
|
||||
private styles: ISelectBoxStyles;
|
||||
|
||||
constructor(options: ISelectOptionItem[], selected: number, styles: ISelectBoxStyles, selectBoxOptions?: ISelectBoxOptions) {
|
||||
super();
|
||||
this.toDispose = [];
|
||||
this.selectBoxOptions = selectBoxOptions || Object.create(null);
|
||||
|
||||
this.options = [];
|
||||
@@ -35,7 +36,8 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
|
||||
this.selectElement.setAttribute('aria-label', this.selectBoxOptions.ariaLabel);
|
||||
}
|
||||
|
||||
this._onDidSelect = this._register(new Emitter<ISelectData>());
|
||||
this._onDidSelect = new Emitter<ISelectData>();
|
||||
this.toDispose.push(this._onDidSelect);
|
||||
|
||||
this.styles = styles;
|
||||
|
||||
@@ -45,7 +47,7 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
|
||||
|
||||
private registerListeners() {
|
||||
|
||||
this._register(dom.addStandardDisposableListener(this.selectElement, 'change', (e) => {
|
||||
this.toDispose.push(dom.addStandardDisposableListener(this.selectElement, 'change', (e) => {
|
||||
this.selectElement.title = e.target.value;
|
||||
this._onDidSelect.fire({
|
||||
index: e.target.selectedIndex,
|
||||
@@ -53,7 +55,7 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
|
||||
});
|
||||
}));
|
||||
|
||||
this._register(dom.addStandardDisposableListener(this.selectElement, 'keydown', (e) => {
|
||||
this.toDispose.push(dom.addStandardDisposableListener(this.selectElement, 'keydown', (e) => {
|
||||
let showSelect = false;
|
||||
|
||||
if (isMacintosh) {
|
||||
@@ -167,4 +169,8 @@ export class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
|
||||
|
||||
return option;
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
this.toDispose = dispose(this.toDispose);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./panelview';
|
||||
import { IDisposable, Disposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, dispose, combinedDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { domEvent } from 'vs/base/browser/event';
|
||||
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
@@ -37,7 +37,7 @@ export interface IPanelStyles {
|
||||
* Subclasses wouldn't be able to set own properties
|
||||
* before the `render()` call, thus forbiding their use.
|
||||
*/
|
||||
export abstract class Panel extends Disposable implements IView {
|
||||
export abstract class Panel implements IView {
|
||||
|
||||
private static readonly HEADER_SIZE = 22;
|
||||
|
||||
@@ -55,9 +55,11 @@ export abstract class Panel extends Disposable implements IView {
|
||||
private styles: IPanelStyles = {};
|
||||
private animationTimer: number | undefined = undefined;
|
||||
|
||||
private readonly _onDidChange = this._register(new Emitter<number | undefined>());
|
||||
private _onDidChange = new Emitter<number | undefined>();
|
||||
readonly onDidChange: Event<number | undefined> = this._onDidChange.event;
|
||||
|
||||
protected disposables: IDisposable[] = [];
|
||||
|
||||
get draggableElement(): HTMLElement {
|
||||
return this.header;
|
||||
}
|
||||
@@ -112,7 +114,6 @@ export abstract class Panel extends Disposable implements IView {
|
||||
width: number;
|
||||
|
||||
constructor(options: IPanelOptions = {}) {
|
||||
super();
|
||||
this._expanded = typeof options.expanded === 'undefined' ? true : !!options.expanded;
|
||||
this.ariaHeaderLabel = options.ariaHeaderLabel || '';
|
||||
this._minimumBodySize = typeof options.minimumBodySize === 'number' ? options.minimumBodySize : 120;
|
||||
@@ -171,26 +172,26 @@ export abstract class Panel extends Disposable implements IView {
|
||||
this.renderHeader(this.header);
|
||||
|
||||
const focusTracker = trackFocus(this.header);
|
||||
this._register(focusTracker);
|
||||
this._register(focusTracker.onDidFocus(() => addClass(this.header, 'focused'), null));
|
||||
this._register(focusTracker.onDidBlur(() => removeClass(this.header, 'focused'), null));
|
||||
this.disposables.push(focusTracker);
|
||||
focusTracker.onDidFocus(() => addClass(this.header, 'focused'), null, this.disposables);
|
||||
focusTracker.onDidBlur(() => removeClass(this.header, 'focused'), null, this.disposables);
|
||||
|
||||
this.updateHeader();
|
||||
|
||||
const onHeaderKeyDown = Event.chain(domEvent(this.header, 'keydown'))
|
||||
.map(e => new StandardKeyboardEvent(e));
|
||||
|
||||
this._register(onHeaderKeyDown.filter(e => e.keyCode === KeyCode.Enter || e.keyCode === KeyCode.Space)
|
||||
.event(() => this.setExpanded(!this.isExpanded()), null));
|
||||
onHeaderKeyDown.filter(e => e.keyCode === KeyCode.Enter || e.keyCode === KeyCode.Space)
|
||||
.event(() => this.setExpanded(!this.isExpanded()), null, this.disposables);
|
||||
|
||||
this._register(onHeaderKeyDown.filter(e => e.keyCode === KeyCode.LeftArrow)
|
||||
.event(() => this.setExpanded(false), null));
|
||||
onHeaderKeyDown.filter(e => e.keyCode === KeyCode.LeftArrow)
|
||||
.event(() => this.setExpanded(false), null, this.disposables);
|
||||
|
||||
this._register(onHeaderKeyDown.filter(e => e.keyCode === KeyCode.RightArrow)
|
||||
.event(() => this.setExpanded(true), null));
|
||||
onHeaderKeyDown.filter(e => e.keyCode === KeyCode.RightArrow)
|
||||
.event(() => this.setExpanded(true), null, this.disposables);
|
||||
|
||||
this._register(domEvent(this.header, 'click')
|
||||
(() => this.setExpanded(!this.isExpanded()), null));
|
||||
domEvent(this.header, 'click')
|
||||
(() => this.setExpanded(!this.isExpanded()), null, this.disposables);
|
||||
|
||||
this.body = append(this.element, $('.panel-body'));
|
||||
this.renderBody(this.body);
|
||||
@@ -233,6 +234,12 @@ export abstract class Panel extends Disposable implements IView {
|
||||
protected abstract renderHeader(container: HTMLElement): void;
|
||||
protected abstract renderBody(container: HTMLElement): void;
|
||||
protected abstract layoutBody(height: number, width: number): void;
|
||||
|
||||
dispose(): void {
|
||||
this.disposables = dispose(this.disposables);
|
||||
|
||||
this._onDidChange.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
interface IDndContext {
|
||||
@@ -390,24 +397,24 @@ export class PanelView extends Disposable {
|
||||
}
|
||||
|
||||
addPanel(panel: Panel, size: number, index = this.splitview.length): void {
|
||||
const disposables = new DisposableStore();
|
||||
const disposables: IDisposable[] = [];
|
||||
|
||||
// https://github.com/Microsoft/vscode/issues/59950
|
||||
let shouldAnimate = false;
|
||||
disposables.add(scheduleAtNextAnimationFrame(() => shouldAnimate = true));
|
||||
disposables.push(scheduleAtNextAnimationFrame(() => shouldAnimate = true));
|
||||
|
||||
disposables.add(Event.filter(panel.onDidChange, () => shouldAnimate)
|
||||
(this.setupAnimation, this));
|
||||
Event.filter(panel.onDidChange, () => shouldAnimate)
|
||||
(this.setupAnimation, this, disposables);
|
||||
|
||||
const panelItem = { panel, disposable: disposables };
|
||||
const panelItem = { panel, disposable: combinedDisposable(disposables) };
|
||||
this.panelItems.splice(index, 0, panelItem);
|
||||
panel.width = this.width;
|
||||
this.splitview.addView(panel, size, index);
|
||||
|
||||
if (this.dnd) {
|
||||
const draggable = new PanelDraggable(panel, this.dnd, this.dndContext);
|
||||
disposables.add(draggable);
|
||||
disposables.add(draggable.onDidDrop(this._onDidDrop.fire, this._onDidDrop));
|
||||
disposables.push(draggable);
|
||||
draggable.onDidDrop(this._onDidDrop.fire, this._onDidDrop, disposables);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./splitview';
|
||||
import { IDisposable, toDisposable, Disposable, combinedDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, combinedDisposable, toDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import * as types from 'vs/base/common/types';
|
||||
import * as dom from 'vs/base/browser/dom';
|
||||
@@ -199,7 +199,7 @@ export class SplitView extends Disposable {
|
||||
|
||||
const onChangeDisposable = view.onDidChange(size => this.onViewChange(item, size));
|
||||
const containerDisposable = toDisposable(() => this.viewContainer.removeChild(container));
|
||||
const disposable = combinedDisposable(onChangeDisposable, containerDisposable);
|
||||
const disposable = combinedDisposable([onChangeDisposable, containerDisposable]);
|
||||
|
||||
const layoutContainer = this.orientation === Orientation.VERTICAL
|
||||
? () => item.container.style.height = `${item.size}px`
|
||||
@@ -245,7 +245,7 @@ export class SplitView extends Disposable {
|
||||
const onEndDisposable = onEnd(this.onSashEnd, this);
|
||||
const onDidResetDisposable = sash.onDidReset(() => this._onDidSashReset.fire(firstIndex(this.sashItems, item => item.sash === sash)));
|
||||
|
||||
const disposable = combinedDisposable(onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash);
|
||||
const disposable = combinedDisposable([onStartDisposable, onChangeDisposable, onEndDisposable, onDidResetDisposable, sash]);
|
||||
const sashItem: ISashItem = { sash, disposable };
|
||||
|
||||
this.sashItems.splice(index - 1, 0, sashItem);
|
||||
@@ -369,10 +369,10 @@ export class SplitView extends Disposable {
|
||||
const index = firstIndex(this.sashItems, item => item.sash === sash);
|
||||
|
||||
// This way, we can press Alt while we resize a sash, macOS style!
|
||||
const disposable = combinedDisposable(
|
||||
const disposable = combinedDisposable([
|
||||
domEvent(document.body, 'keydown')(e => resetSashDragState(this.sashDragState.current, e.altKey)),
|
||||
domEvent(document.body, 'keyup')(() => resetSashDragState(this.sashDragState.current, false))
|
||||
);
|
||||
]);
|
||||
|
||||
const resetSashDragState = (start: number, alt: boolean) => {
|
||||
const sizes = this.viewItems.map(i => i.size);
|
||||
|
||||
@@ -114,7 +114,7 @@ export class ToolBar extends Disposable {
|
||||
this.actionBar.setAriaLabel(label);
|
||||
}
|
||||
|
||||
setActions(primaryActions: ReadonlyArray<IAction>, secondaryActions?: ReadonlyArray<IAction>): () => void {
|
||||
setActions(primaryActions: IAction[], secondaryActions?: IAction[]): () => void {
|
||||
return () => {
|
||||
let primaryActionsToSet = primaryActions ? primaryActions.slice(0) : [];
|
||||
|
||||
@@ -169,7 +169,7 @@ class ToggleMenuAction extends Action {
|
||||
|
||||
static readonly ID = 'toolbar.toggle.more';
|
||||
|
||||
private _menuActions: ReadonlyArray<IAction>;
|
||||
private _menuActions: IAction[];
|
||||
private toggleDropdownMenu: () => void;
|
||||
|
||||
constructor(toggleDropdownMenu: () => void, title?: string) {
|
||||
@@ -185,11 +185,11 @@ class ToggleMenuAction extends Action {
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
|
||||
get menuActions(): ReadonlyArray<IAction> {
|
||||
get menuActions() {
|
||||
return this._menuActions;
|
||||
}
|
||||
|
||||
set menuActions(actions: ReadonlyArray<IAction>) {
|
||||
set menuActions(actions: IAction[]) {
|
||||
this._menuActions = actions;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { IDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { IDisposable, combinedDisposable, Disposable } from 'vs/base/common/lifecycle';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
|
||||
export interface ITelemetryData {
|
||||
@@ -29,13 +29,14 @@ export interface IActionRunner extends IDisposable {
|
||||
onDidBeforeRun: Event<IRunEvent>;
|
||||
}
|
||||
|
||||
export interface IActionViewItem extends IDisposable {
|
||||
export interface IActionViewItem {
|
||||
actionRunner: IActionRunner;
|
||||
setActionContext(context: any): void;
|
||||
render(element: any /* HTMLElement */): void;
|
||||
isEnabled(): boolean;
|
||||
focus(): void;
|
||||
blur(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface IActionChangeEvent {
|
||||
@@ -47,9 +48,9 @@ export interface IActionChangeEvent {
|
||||
radio?: boolean;
|
||||
}
|
||||
|
||||
export class Action extends Disposable implements IAction {
|
||||
export class Action implements IAction {
|
||||
|
||||
protected _onDidChange = this._register(new Emitter<IActionChangeEvent>());
|
||||
protected _onDidChange = new Emitter<IActionChangeEvent>();
|
||||
readonly onDidChange: Event<IActionChangeEvent> = this._onDidChange.event;
|
||||
|
||||
protected _id: string;
|
||||
@@ -62,7 +63,6 @@ export class Action extends Disposable implements IAction {
|
||||
protected _actionCallback?: (event?: any) => Promise<any>;
|
||||
|
||||
constructor(id: string, label: string = '', cssClass: string = '', enabled: boolean = true, actionCallback?: (event?: any) => Promise<any>) {
|
||||
super();
|
||||
this._id = id;
|
||||
this._label = label;
|
||||
this._cssClass = cssClass;
|
||||
@@ -171,6 +171,10 @@ export class Action extends Disposable implements IAction {
|
||||
|
||||
return Promise.resolve(true);
|
||||
}
|
||||
|
||||
dispose() {
|
||||
this._onDidChange.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
export interface IRunEvent {
|
||||
@@ -213,8 +217,8 @@ export class RadioGroup extends Disposable {
|
||||
constructor(readonly actions: Action[]) {
|
||||
super();
|
||||
|
||||
for (const action of actions) {
|
||||
this._register(action.onDidChange(e => {
|
||||
this._register(combinedDisposable(actions.map(action => {
|
||||
return action.onDidChange(e => {
|
||||
if (e.checked && action.checked) {
|
||||
for (const candidate of actions) {
|
||||
if (candidate !== action) {
|
||||
@@ -222,7 +226,7 @@ export class RadioGroup extends Disposable {
|
||||
}
|
||||
}
|
||||
}
|
||||
}));
|
||||
}
|
||||
});
|
||||
})));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
import * as errors from 'vs/base/common/errors';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
|
||||
export function isThenable<T>(obj: any): obj is Promise<T> {
|
||||
@@ -415,11 +415,11 @@ export class Limiter<T> {
|
||||
this._onFinished = new Emitter<void>();
|
||||
}
|
||||
|
||||
get onFinished(): Event<void> {
|
||||
public get onFinished(): Event<void> {
|
||||
return this._onFinished.event;
|
||||
}
|
||||
|
||||
get size(): number {
|
||||
public get size(): number {
|
||||
return this._size;
|
||||
// return this.runningPromises + this.outstandingPromises.length;
|
||||
}
|
||||
@@ -455,7 +455,7 @@ export class Limiter<T> {
|
||||
}
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
public dispose(): void {
|
||||
this._onFinished.dispose();
|
||||
}
|
||||
}
|
||||
@@ -475,30 +475,35 @@ export class Queue<T> extends Limiter<T> {
|
||||
* by disposing them once the queue is empty.
|
||||
*/
|
||||
export class ResourceQueue {
|
||||
private queues: Map<string, Queue<void>> = new Map();
|
||||
private queues: { [path: string]: Queue<void> };
|
||||
|
||||
queueFor(resource: URI): Queue<void> {
|
||||
constructor() {
|
||||
this.queues = Object.create(null);
|
||||
}
|
||||
|
||||
public queueFor(resource: URI): Queue<void> {
|
||||
const key = resource.toString();
|
||||
if (!this.queues.has(key)) {
|
||||
if (!this.queues[key]) {
|
||||
const queue = new Queue<void>();
|
||||
queue.onFinished(() => {
|
||||
queue.dispose();
|
||||
this.queues.delete(key);
|
||||
delete this.queues[key];
|
||||
});
|
||||
|
||||
this.queues.set(key, queue);
|
||||
this.queues[key] = queue;
|
||||
}
|
||||
|
||||
return this.queues.get(key)!;
|
||||
return this.queues[key];
|
||||
}
|
||||
}
|
||||
|
||||
export class TimeoutTimer implements IDisposable {
|
||||
export class TimeoutTimer extends Disposable {
|
||||
private _token: any;
|
||||
|
||||
constructor();
|
||||
constructor(runner: () => void, timeout: number);
|
||||
constructor(runner?: () => void, timeout?: number) {
|
||||
super();
|
||||
this._token = -1;
|
||||
|
||||
if (typeof runner === 'function' && typeof timeout === 'number') {
|
||||
@@ -508,6 +513,7 @@ export class TimeoutTimer implements IDisposable {
|
||||
|
||||
dispose(): void {
|
||||
this.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
cancel(): void {
|
||||
@@ -537,16 +543,18 @@ export class TimeoutTimer implements IDisposable {
|
||||
}
|
||||
}
|
||||
|
||||
export class IntervalTimer implements IDisposable {
|
||||
export class IntervalTimer extends Disposable {
|
||||
|
||||
private _token: any;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this._token = -1;
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
cancel(): void {
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { CancellationToken, CancellationTokenSource } from 'vs/base/common/cancellation';
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
|
||||
export interface CacheResult<T> extends IDisposable {
|
||||
export interface CacheResult<T> {
|
||||
promise: Promise<T>;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export class Cache<T> {
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
import { IAction } from 'vs/base/common/actions';
|
||||
|
||||
export interface IErrorOptions {
|
||||
actions?: ReadonlyArray<IAction>;
|
||||
actions?: IAction[];
|
||||
}
|
||||
|
||||
export interface IErrorWithActions {
|
||||
actions?: ReadonlyArray<IAction>;
|
||||
actions?: IAction[];
|
||||
}
|
||||
|
||||
export function isErrorWithActions(obj: any): obj is IErrorWithActions {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { once as onceFn } from 'vs/base/common/functional';
|
||||
import { Disposable, IDisposable, toDisposable, combinedDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { combinedDisposable, Disposable, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { LinkedList } from 'vs/base/common/linkedList';
|
||||
|
||||
/**
|
||||
@@ -13,11 +13,12 @@ import { LinkedList } from 'vs/base/common/linkedList';
|
||||
* can be subscribed. The event is the subscriber function itself.
|
||||
*/
|
||||
export interface Event<T> {
|
||||
(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore): IDisposable;
|
||||
(listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]): IDisposable;
|
||||
}
|
||||
|
||||
export namespace Event {
|
||||
export const None: Event<any> = () => Disposable.None;
|
||||
const _disposable = { dispose() { } };
|
||||
export const None: Event<any> = function () { return _disposable; };
|
||||
|
||||
/**
|
||||
* Given an event, returns another event which only fires once.
|
||||
@@ -85,7 +86,7 @@ export namespace Event {
|
||||
* whenever any of the provided events emit.
|
||||
*/
|
||||
export function any<T>(...events: Event<T>[]): Event<T> {
|
||||
return (listener, thisArgs = null, disposables?) => combinedDisposable(...events.map(event => event(e => listener.call(thisArgs, e), null, disposables)));
|
||||
return (listener, thisArgs = null, disposables?) => combinedDisposable(events.map(event => event(e => listener.call(thisArgs, e), null, disposables)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -476,7 +477,7 @@ export class Emitter<T> {
|
||||
*/
|
||||
get event(): Event<T> {
|
||||
if (!this._event) {
|
||||
this._event = (listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[] | DisposableStore) => {
|
||||
this._event = (listener: (e: T) => any, thisArgs?: any, disposables?: IDisposable[]) => {
|
||||
if (!this._listeners) {
|
||||
this._listeners = new LinkedList();
|
||||
}
|
||||
@@ -521,9 +522,7 @@ export class Emitter<T> {
|
||||
}
|
||||
}
|
||||
};
|
||||
if (disposables instanceof DisposableStore) {
|
||||
disposables.add(result);
|
||||
} else if (Array.isArray(disposables)) {
|
||||
if (Array.isArray(disposables)) {
|
||||
disposables.push(result);
|
||||
}
|
||||
|
||||
|
||||
@@ -458,14 +458,14 @@ export function parse(arg1: string | IExpression | IRelativePattern, options: IG
|
||||
if (parsedPattern === NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
const resultPattern: ParsedPattern & { allBasenames?: string[]; allPaths?: string[]; } = function (path: string, basename: string) {
|
||||
const resultPattern = function (path: string, basename: string) {
|
||||
return !!parsedPattern(path, basename);
|
||||
};
|
||||
if (parsedPattern.allBasenames) {
|
||||
resultPattern.allBasenames = parsedPattern.allBasenames;
|
||||
(<ParsedStringPattern><any>resultPattern).allBasenames = parsedPattern.allBasenames;
|
||||
}
|
||||
if (parsedPattern.allPaths) {
|
||||
resultPattern.allPaths = parsedPattern.allPaths;
|
||||
(<ParsedStringPattern><any>resultPattern).allPaths = parsedPattern.allPaths;
|
||||
}
|
||||
return resultPattern;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user