mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-19 03:21:36 -04:00
SQL Operations Studio Public Preview 1 (0.23) release source code
This commit is contained in:
23
src/sql/base/browser/ui/editableDropdown/actions.ts
Normal file
23
src/sql/base/browser/ui/editableDropdown/actions.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Action } from 'vs/base/common/actions';
|
||||
import { TPromise } from 'vs/base/common/winjs.base';
|
||||
import * as nls from 'vs/nls';
|
||||
|
||||
export class ToggleDropdownAction extends Action {
|
||||
private static readonly ID = 'dropdownAction.toggle';
|
||||
private static readonly LABEL = nls.localize('dropdownAction.toggle', "Toggle dropdown");
|
||||
private static readonly ICON = 'dropdown-arrow';
|
||||
|
||||
constructor(private _fn: () => any) {
|
||||
super(ToggleDropdownAction.ID, ToggleDropdownAction.LABEL, ToggleDropdownAction.ICON);
|
||||
}
|
||||
|
||||
public run(): TPromise<boolean> {
|
||||
this._fn();
|
||||
return TPromise.as(true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user