mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Extensibility: Context menu support in Object Explorer (#1883)
- Fixes #1867 context menu should be extensible - Added context keys to support "when" conditions on the new extensions - Fixes issue where actions like New Query, scripting show up even if these are not valid for the provider type or object type - Fixed node expansion bug where rapid connect / expand / disconnect could break the app (fix in ObjectExplorerService.onNodeExpanded) - Major change to how internal actions work. These cannot assume the context has non-serializable objects. Opened up some APIs to make this easier to handle. - Fixed a number of existing bugs in internal actions. - Notably, DisconnectAction was adding a listener on each right-click on an active connection and never getting it disposed. This wasn't needed at all due to design changes. - Another bug fix is that the Manage action now correctly navigates to the DB dashboard for database-level connections. Before this it went to the server-level dashboard. * Define API for context info
This commit is contained in:
27
src/sql/sqlops.proposed.d.ts
vendored
27
src/sql/sqlops.proposed.d.ts
vendored
@@ -973,4 +973,31 @@ declare module 'sqlops' {
|
||||
*/
|
||||
export function getProvidersByType<T extends DataProvider>(providerType: DataProviderType): T[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Context object passed as an argument to command callbacks.
|
||||
* Defines the key properties required to identify a node in the object
|
||||
* explorer tree and take action against it.
|
||||
*/
|
||||
export interface ObjectExplorerContext {
|
||||
|
||||
/**
|
||||
* The connection information for the selected object.
|
||||
* Note that the connection is not guaranteed to be in a connected
|
||||
* state on click.
|
||||
*/
|
||||
connectionProfile: IConnectionProfile;
|
||||
/**
|
||||
* Defines whether this is a Connection-level object.
|
||||
* If not, the object is expected to be a child object underneath
|
||||
* one of the connections.
|
||||
*/
|
||||
isConnectionNode: boolean;
|
||||
/**
|
||||
* Node info for objects below a specific connection. This
|
||||
* may be null for a Connection-level object
|
||||
*/
|
||||
nodeInfo: NodeInfo;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user