deco - move scm decorations to git extension

This commit is contained in:
Johannes Rieken
2017-10-17 12:47:39 +02:00
parent 015901f14b
commit 41f0ff15d7
13 changed files with 128 additions and 189 deletions

View File

@@ -362,8 +362,7 @@ export type SCMRawResource = [
string[] /*icons: light, dark*/,
string /*tooltip*/,
boolean /*strike through*/,
boolean /*faded*/,
{ id: string } /*ThemeColor*/
boolean /*faded*/
];
export type SCMRawResourceSplice = [
@@ -603,7 +602,7 @@ export interface ExtHostDebugServiceShape {
}
export type DecorationData = [number, string, string, number, ThemeColor];
export type DecorationData = [number, boolean, string, string, number, ThemeColor];
export interface ExtHostDecorationsShape {
$providerDecorations(handle: number, uri: URI): TPromise<DecorationData>;

View File

@@ -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 <DecorationData>[data.priority, data.title, data.abbreviation, data.opacity, data.color];
return data && <DecorationData>[data.priority, data.bubble, data.title, data.abbreviation, data.opacity, data.color];
});
}
}

View File

@@ -243,9 +243,8 @@ class ExtHostSourceControlResourceGroup implements vscode.SourceControlResourceG
const tooltip = (r.decorations && r.decorations.tooltip) || '';
const strikeThrough = r.decorations && !!r.decorations.strikeThrough;
const faded = r.decorations && !!r.decorations.faded;
const color = r.decorations && r.decorations.color;
return [handle, sourceUri, icons, tooltip, strikeThrough, faded, color] as SCMRawResource;
return [handle, sourceUri, icons, tooltip, strikeThrough, faded] as SCMRawResource;
});
handlesToDelete.push(...this._handlesSnapshot.splice(start, deleteCount, ...handles));