提交 37043bc9 编写于 作者: J Johannes Rieken

deco - tooltip -> title

上级 81cab911
......@@ -192,7 +192,7 @@ export class ResourceLabel extends IconLabel {
}
if (deco && deco.badgeClassName && this.options.fileDecorations.badges) {
iconLabelOptions.badge = {
title: deco.tooltip,
title: deco.title,
className: deco.badgeClassName,
};
}
......
......@@ -44,7 +44,7 @@ class MarkersDecorationsProvider implements IDecorationsProvider {
return {
weight: 100 * first.severity,
tooltip: markers.length === 1 ? localize('tooltip.1', "1 problem in this file") : localize('tooltip.N', "{0} problems in this file", markers.length),
title: markers.length === 1 ? localize('tooltip.1', "1 problem in this file") : localize('tooltip.N', "{0} problems in this file", markers.length),
letter: markers.length.toString(),
color: first.severity === Severity.Error ? editorErrorForeground : editorWarningForeground,
};
......
......@@ -67,7 +67,7 @@ class SCMDecorationsProvider implements IDecorationsProvider {
}
return {
weight: 100 - resource.decorations.tooltip.charAt(0).toLowerCase().charCodeAt(0),
tooltip: localize('tooltip', "{0}, {1}", resource.decorations.tooltip, this._provider.label),
title: localize('tooltip', "{0}, {1}", resource.decorations.tooltip, this._provider.label),
color: resource.decorations.color,
letter: resource.decorations.tooltip.charAt(0)
};
......
......@@ -17,13 +17,13 @@ export interface IDecorationData {
readonly color?: ColorIdentifier;
readonly opacity?: number;
readonly letter?: string;
readonly tooltip?: string;
readonly title?: string;
}
export interface IDecoration {
readonly _decoBrand: undefined;
readonly weight?: number;
readonly tooltip?: string;
readonly title?: string;
readonly labelClassName?: string;
readonly badgeClassName?: string;
}
......
......@@ -93,10 +93,10 @@ class ResourceDecoration implements IDecoration {
let result = new ResourceDecoration(data);
if (Array.isArray(data)) {
result.weight = data[0].weight;
result.tooltip = data.map(d => d.tooltip).join(', ');
result.title = data.map(d => d.title).join(', ');
} else {
result.weight = data.weight;
result.tooltip = data.tooltip;
result.title = data.title;
}
return result;
}
......@@ -105,7 +105,7 @@ class ResourceDecoration implements IDecoration {
_data: IDecorationData | IDecorationData[];
weight?: number;
tooltip?: string;
title?: string;
labelClassName?: string;
badgeClassName?: string;
......
......@@ -36,7 +36,7 @@ suite('DecorationsService', function () {
return new Promise<IDecorationData>(resolve => {
setTimeout(() => resolve({
color: 'someBlue',
tooltip: 'T'
title: 'T'
}));
});
}
......@@ -51,7 +51,7 @@ suite('DecorationsService', function () {
assert.equal(e.affectsResource(uri), true);
// sync result
assert.deepEqual(service.getDecoration(uri, false).tooltip, 'T');
assert.deepEqual(service.getDecoration(uri, false).title, 'T');
assert.equal(callCounter, 1);
});
});
......@@ -71,7 +71,7 @@ suite('DecorationsService', function () {
});
// trigger -> sync
assert.deepEqual(service.getDecoration(uri, false).tooltip, 'Z');
assert.deepEqual(service.getDecoration(uri, false).title, 'Z');
assert.equal(callCounter, 1);
});
......@@ -89,7 +89,7 @@ suite('DecorationsService', function () {
});
// trigger -> sync
assert.deepEqual(service.getDecoration(uri, false).tooltip, 'J');
assert.deepEqual(service.getDecoration(uri, false).title, 'J');
assert.equal(callCounter, 1);
// un-register -> ensure good event
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册