mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
Render messages
This commit is contained in:
@@ -124,6 +124,8 @@ export function createApiFactory(
|
||||
|
||||
return function (extension: IExtensionDescription): typeof vscode {
|
||||
|
||||
const EXTENSION_ID = extension.id;
|
||||
|
||||
if (extension.enableProposedApi && !extension.isBuiltin) {
|
||||
|
||||
if (
|
||||
@@ -386,6 +388,7 @@ export function createApiFactory(
|
||||
// namespace: workspace
|
||||
const workspace: typeof vscode.workspace = {
|
||||
get rootPath() {
|
||||
extensionService.addMessage(EXTENSION_ID, Severity.Warning, 'workspace.rootPath is deprecated');
|
||||
return extHostWorkspace.getPath();
|
||||
},
|
||||
set rootPath(value) {
|
||||
|
||||
@@ -352,6 +352,7 @@ export interface MainThreadExtensionServiceShape extends IDisposable {
|
||||
$localShowMessage(severity: Severity, msg: string): void;
|
||||
$onExtensionActivated(extensionId: string, startup: boolean, codeLoadingTime: number, activateCallTime: number, activateResolvedTime: number, activationEvent: string): void;
|
||||
$onExtensionActivationFailed(extensionId: string): void;
|
||||
$addMessage(extensionId: string, severity: Severity, message: string): void;
|
||||
}
|
||||
|
||||
export interface SCMProviderFeatures {
|
||||
|
||||
@@ -273,6 +273,10 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
return result;
|
||||
}
|
||||
|
||||
public addMessage(extensionId: string, severity: Severity, message: string): void {
|
||||
this._proxy.$addMessage(extensionId, severity, message);
|
||||
}
|
||||
|
||||
// --- impl
|
||||
|
||||
private _activateExtension(extensionDescription: IExtensionDescription, reason: ExtensionActivationReason): TPromise<ActivatedExtension> {
|
||||
|
||||
Reference in New Issue
Block a user