mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
joh/issue152834 (#153298)
* update sample * dynamically alias `ms-vscode.references-view` onto `vscode.references-view`
This commit is contained in:
parent
1df4b3ceb8
commit
9b1c6cb3ff
|
@ -12,7 +12,7 @@ import * as vscode from 'vscode';
|
|||
*
|
||||
* ```ts
|
||||
* // get references viewlet API
|
||||
* const api = await vscode.extensions.getExtension<SymbolTree>('ms-vscode.references-view').activate();
|
||||
* const api = await vscode.extensions.getExtension<SymbolTree>('vscode.references-view').activate();
|
||||
*
|
||||
* // instantiate and set input which updates the view
|
||||
* const myInput: SymbolTreeInput<MyItems> = ...
|
||||
|
|
|
@ -92,6 +92,7 @@ import { ExtHostInteractive } from 'vs/workbench/api/common/extHostInteractive';
|
|||
import { combinedDisposable } from 'vs/base/common/lifecycle';
|
||||
import { checkProposedApiEnabled, ExtensionIdentifierSet, isProposedApiEnabled } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { DebugConfigurationProviderTriggerKind } from 'vs/workbench/contrib/debug/common/debug';
|
||||
import { equalsIgnoreCase } from 'vs/base/common/strings';
|
||||
|
||||
export interface IExtensionRegistries {
|
||||
mine: ExtensionDescriptionRegistry;
|
||||
|
@ -392,6 +393,11 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I
|
|||
|
||||
const extensions: typeof vscode.extensions = {
|
||||
getExtension(extensionId: string, includeFromDifferentExtensionHosts?: boolean): vscode.Extension<any> | undefined {
|
||||
if (equalsIgnoreCase(extensionId, 'ms-vscode.references-view')) {
|
||||
extHostApiDeprecation.report(`The extension 'ms-vscode.references-view' has been renamed.`, extension, `Use 'vscode.references-view' instead.`);
|
||||
extensionId = 'vscode.references-view';
|
||||
}
|
||||
|
||||
if (!isProposedApiEnabled(extension, 'extensionsAny')) {
|
||||
includeFromDifferentExtensionHosts = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue