提交 43fb41f2 编写于 作者: B Benjamin Pasero

Can't read full InputBox validation error message if it is too long. (fixes #33181)

上级 2f5aba68
......@@ -116,6 +116,13 @@ export class QuickOpenEntry {
return null;
}
/**
* A tooltip to show when hovering over the entry.
*/
public getTooltip(): string {
return null;
}
/**
* An optional keybinding to show for an entry.
*/
......@@ -454,6 +461,7 @@ class Renderer implements IRenderer<QuickOpenEntry> {
// Label
const options: IIconLabelOptions = entry.getLabelOptions() || Object.create(null);
options.matches = labelHighlights || [];
options.title = entry.getTooltip() || void 0;
options.descriptionMatches = descriptionHighlights || [];
data.label.setValue(entry.getLabel(), entry.getDescription(), options);
......
......@@ -27,6 +27,7 @@ export interface IPickOpenEntry {
label: string;
description?: string;
detail?: string;
tooltip?: string;
separator?: ISeparator;
alwaysShow?: boolean;
run?: (context: IEntryRunContext) => void;
......
......@@ -180,7 +180,7 @@ export class QuickOpenController extends Component implements IQuickOpenService
// open quick pick with just one choice. we will recurse whenever
// the validation/success message changes
this.doPick(TPromise.as([{ label: currentPick }]), {
this.doPick(TPromise.as([{ label: currentPick, tooltip: currentPick /* make sure message/validation can be read through the hover */ }]), {
ignoreFocusLost: options.ignoreFocusLost,
autoFocus: { autoFocusFirstEntry: true },
password: options.password,
......@@ -1024,6 +1024,7 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem {
private _shouldRunWithContext: IEntryRunContext;
private description: string;
private detail: string;
private tooltip: string;
private hasSeparator: boolean;
private separatorLabel: string;
private alwaysShow: boolean;
......@@ -1045,6 +1046,7 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem {
this.description = item.description;
this.detail = item.detail;
this.tooltip = item.tooltip;
this.hasSeparator = item.separator && item.separator.border;
this.separatorLabel = item.separator && item.separator.label;
this.alwaysShow = item.alwaysShow;
......@@ -1097,6 +1099,10 @@ class PickOpenEntry extends PlaceholderQuickOpenEntry implements IPickOpenItem {
return this.detail;
}
public getTooltip(): string {
return this.tooltip;
}
public showBorder(): boolean {
return this.hasSeparator;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册