提交 0a914e0e 编写于 作者: J Johannes Rieken

remove priority all togther, maybe add something like severity in the future,...

remove priority all togther, maybe add something like severity in the future, https://github.com/microsoft/vscode/issues/54938
上级 8932f62a
...@@ -13,7 +13,7 @@ import { GitErrorCodes, Status } from './api/git'; ...@@ -13,7 +13,7 @@ import { GitErrorCodes, Status } from './api/git';
class GitIgnoreDecorationProvider implements FileDecorationProvider { class GitIgnoreDecorationProvider implements FileDecorationProvider {
private static Decoration: FileDecoration = { priority: 3, color: new ThemeColor('gitDecoration.ignoredResourceForeground') }; private static Decoration: FileDecoration = { color: new ThemeColor('gitDecoration.ignoredResourceForeground') };
readonly onDidChange: Event<Uri[]>; readonly onDidChange: Event<Uri[]>;
private queue = new Map<string, { repository: Repository; queue: Map<string, PromiseSource<FileDecoration | undefined>>; }>(); private queue = new Map<string, { repository: Repository; queue: Map<string, PromiseSource<FileDecoration | undefined>>; }>();
......
...@@ -717,7 +717,7 @@ declare module 'vscode' { ...@@ -717,7 +717,7 @@ declare module 'vscode' {
//#region file-decorations: https://github.com/microsoft/vscode/issues/54938 //#region file-decorations: https://github.com/microsoft/vscode/issues/54938
// TODO@jrieken priority -> DecorationSeverity.INFO,WARN,ERROR
export class FileDecoration { export class FileDecoration {
/** /**
...@@ -735,11 +735,6 @@ declare module 'vscode' { ...@@ -735,11 +735,6 @@ declare module 'vscode' {
*/ */
color?: ThemeColor; color?: ThemeColor;
/**
* The priority of this decoration.
*/
priority?: number;
/** /**
* A flag expressing that this decoration should be * A flag expressing that this decoration should be
* propagated to its parents. * propagated to its parents.
......
...@@ -92,9 +92,9 @@ export class MainThreadDecorations implements MainThreadDecorationsShape { ...@@ -92,9 +92,9 @@ export class MainThreadDecorations implements MainThreadDecorationsShape {
if (!data) { if (!data) {
return undefined; return undefined;
} }
const [weight, bubble, tooltip, letter, themeColor] = data; const [bubble, tooltip, letter, themeColor] = data;
return <IDecorationData>{ return <IDecorationData>{
weight: weight ?? 0, weight: 10,
bubble: bubble ?? false, bubble: bubble ?? false,
color: themeColor?.id, color: themeColor?.id,
tooltip, tooltip,
......
...@@ -1605,7 +1605,7 @@ export interface DecorationRequest { ...@@ -1605,7 +1605,7 @@ export interface DecorationRequest {
readonly uri: UriComponents; readonly uri: UriComponents;
} }
export type DecorationData = [number, boolean, string, string, ThemeColor]; export type DecorationData = [boolean, string, string, ThemeColor];
export type DecorationReply = { [id: number]: DecorationData; }; export type DecorationReply = { [id: number]: DecorationData; };
export interface ExtHostDecorationsShape { export interface ExtHostDecorationsShape {
......
...@@ -71,7 +71,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape { ...@@ -71,7 +71,7 @@ export class ExtHostDecorations implements ExtHostDecorationsShape {
} }
try { try {
FileDecoration.validate(data); FileDecoration.validate(data);
result[id] = <DecorationData>[data.priority, data.propagte, data.tooltip, data.badge, data.color]; result[id] = <DecorationData>[data.propagte, data.tooltip, data.badge, data.color];
} catch (e) { } catch (e) {
this._logService.warn(`INVALID decoration from extension '${extensionId.value}': ${e}`); this._logService.warn(`INVALID decoration from extension '${extensionId.value}': ${e}`);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册