mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
deco - allow to derive new decoration from existing decoration, add IDecorationData#source
This commit is contained in:
@@ -378,8 +378,8 @@ export function createApiFactory(
|
||||
sampleFunction: proposedApiFunction(extension, () => {
|
||||
return extHostMessageService.showMessage(extension, Severity.Info, 'Hello Proposed Api!', {}, []);
|
||||
}),
|
||||
registerDecorationProvider: proposedApiFunction(extension, (provider: vscode.DecorationProvider) => {
|
||||
return extHostDecorations.registerDecorationProvider(provider, extension.id);
|
||||
registerDecorationProvider: proposedApiFunction(extension, (provider: vscode.DecorationProvider, source) => {
|
||||
return extHostDecorations.registerDecorationProvider(provider, source);
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
@@ -625,7 +625,7 @@ export interface ExtHostDebugServiceShape {
|
||||
}
|
||||
|
||||
|
||||
export type DecorationData = [number, boolean, string, string, ThemeColor];
|
||||
export type DecorationData = [number, boolean, string, string, ThemeColor, string];
|
||||
|
||||
export interface ExtHostDecorationsShape {
|
||||
$providerDecorations(handle: number, uri: URI): TPromise<DecorationData>;
|
||||
|
||||
@@ -41,7 +41,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape {
|
||||
$providerDecorations(handle: number, uri: URI): TPromise<DecorationData> {
|
||||
const provider = this._provider.get(handle);
|
||||
return asWinJsPromise(token => provider.provideDecoration(uri, token)).then(data => {
|
||||
return data && <DecorationData>[data.priority, data.bubble, data.title, data.abbreviation, data.color];
|
||||
return data && <DecorationData>[data.priority, data.bubble, data.title, data.abbreviation, data.color, data.source];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user