mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 11:38:51 +01:00
make vscode.revealTestInExplorer an api command
This commit is contained in:
@@ -422,6 +422,12 @@ const newCommands: ApiCommand[] = [
|
||||
[ApiCommandArgument.TypeHierarchyItem],
|
||||
new ApiCommandResult<ITypeHierarchyItemDto[], types.TypeHierarchyItem[]>('A TypeHierarchyItem or undefined', v => v.map(typeConverters.TypeHierarchyItem.to))
|
||||
),
|
||||
// --- testing
|
||||
new ApiCommand(
|
||||
'vscode.revealTestInExplorer', '_revealTestInExplorer', 'Reveals a test instance in the explorer',
|
||||
[ApiCommandArgument.TestItem],
|
||||
ApiCommandResult.Void
|
||||
)
|
||||
];
|
||||
|
||||
//#endregion
|
||||
|
||||
@@ -21,6 +21,7 @@ import { DisposableStore, toDisposable } from 'vs/base/common/lifecycle';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService';
|
||||
import { ISelection } from 'vs/editor/common/core/selection';
|
||||
import { TestItemImpl } from 'vs/workbench/api/common/extHostTestingPrivateApi';
|
||||
|
||||
interface CommandHandler {
|
||||
callback: Function;
|
||||
@@ -371,6 +372,7 @@ export class ApiCommandArgument<V, O = V> {
|
||||
|
||||
static readonly CallHierarchyItem = new ApiCommandArgument('item', 'A call hierarchy item', v => v instanceof extHostTypes.CallHierarchyItem, extHostTypeConverter.CallHierarchyItem.from);
|
||||
static readonly TypeHierarchyItem = new ApiCommandArgument('item', 'A type hierarchy item', v => v instanceof extHostTypes.TypeHierarchyItem, extHostTypeConverter.TypeHierarchyItem.from);
|
||||
static readonly TestItem = new ApiCommandArgument('testItem', 'A VS Code TestItem', v => v instanceof TestItemImpl, extHostTypeConverter.TestItem.from);
|
||||
|
||||
constructor(
|
||||
readonly name: string,
|
||||
|
||||
Reference in New Issue
Block a user