mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
color - jsdoc and tiny tweaks for color provider api
This commit is contained in:
@@ -145,10 +145,10 @@ export function activate(context: ExtensionContext) {
|
||||
});
|
||||
});
|
||||
},
|
||||
provideColorPresentations(document: TextDocument, colorInfo: ColorInformation): Thenable<ColorPresentation[]> {
|
||||
provideColorPresentations(color: Color, context): Thenable<ColorPresentation[]> {
|
||||
let params: ColorPresentationParams = {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),
|
||||
colorInfo: { range: client.code2ProtocolConverter.asRange(colorInfo.range), color: colorInfo.color }
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(context.document),
|
||||
colorInfo: { range: client.code2ProtocolConverter.asRange(context.range), color }
|
||||
};
|
||||
return client.sendRequest(ColorPresentationRequest.type, params).then(presentations => {
|
||||
return presentations.map(p => {
|
||||
@@ -288,4 +288,4 @@ function getPackageInfo(context: ExtensionContext): IPackageInfo {
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user