提交 5fd7ffd0 编写于 作者: S Sandeep Somavarapu

Fix focus and action ids

上级 2e449867
......@@ -526,7 +526,7 @@ export class VSCodeMenu {
let output = this.createMenuItem(nls.localize({ key: 'miToggleOutput', comment: ['&& denotes a mnemonic'] }, "&&Output"), 'workbench.action.output.toggleOutput');
let debugConsole = this.createMenuItem(nls.localize({ key: 'miToggleDebugConsole', comment: ['&& denotes a mnemonic'] }, "De&&bug Console"), 'workbench.debug.action.toggleRepl');
let integratedTerminal = this.createMenuItem(nls.localize({ key: 'miToggleIntegratedTerminal', comment: ['&& denotes a mnemonic'] }, "&&Integrated Terminal"), 'workbench.action.terminal.toggleTerminal');
let problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.action.markers.panel.toggle');
let problems = this.createMenuItem(nls.localize({ key: 'miMarker', comment: ['&& denotes a mnemonic'] }, "&&Problems"), 'workbench.actions.view.problems');
let viewsMenu = new Menu();
[
......
......@@ -108,7 +108,10 @@ export class MarkersPanel extends Panel {
if (this.markersModel.hasFilteredResources()) {
this.tree.DOMFocus();
this.revealProblemsForCurrentActiveEditor(true);
if (this.tree.getSelection().length === 0) {
this.tree.focusFirst();
}
this.autoReveal(true);
} else {
this.messageBox.focus();
}
......@@ -242,10 +245,10 @@ export class MarkersPanel extends Panel {
});
}
private autoReveal(): void {
private autoReveal(focus: boolean= false): void {
let conf = this.configurationService.getConfiguration<IProblemsConfiguration>();
if (conf && conf.problems && conf.problems.autoReveal) {
this.revealProblemsForCurrentActiveEditor();
this.revealProblemsForCurrentActiveEditor(focus);
}
}
......@@ -293,7 +296,7 @@ export class MarkersPanel extends Panel {
}
public getActionItem(action: Action): IActionItem {
if (action.id === 'workbench.markers.panel.action.filter') {
if (action.id === FilterAction.ID) {
return this.instantiationService.createInstance(FilterInputBoxActionItem, this, action);
}
return super.getActionItem(action);
......
......@@ -63,8 +63,10 @@ export class CollapseAllAction extends TreeCollapseAction {
export class FilterAction extends Action {
public static ID:string = 'workbench.actions.problems.filter';
constructor(private markersPanel: MarkersPanel) {
super('workbench.actions.problems.filter', Messages.MARKERS_PANEL_ACTION_TOOLTIP_FILTER, 'markers-panel-action-filter', true);
super(FilterAction.ID, Messages.MARKERS_PANEL_ACTION_TOOLTIP_FILTER, 'markers-panel-action-filter', true);
}
}
......
......@@ -145,17 +145,8 @@ export class Renderer implements IRenderer {
dom.toggleClass(templateData.source.element, 'marker-source', !!marker.source);
templateData.source.set(marker.source, element.sourceMatches);
if (marker.source) {
let title= Messages.MARKERS_PANEL_TITLE_SOURCE(marker.source);
templateData.source.element.title= title;
templateData.source.element.setAttribute('aria-label', title);
}
templateData.lnCol.textContent= Messages.MARKERS_PANEL_AT_LINE_COL_NUMBER(marker.startLineNumber, marker.startColumn);
let title= Messages.MARKERS_PANEL_TITLE_AT_LINE_COL_NUMBER(marker.startLineNumber, marker.startColumn);
templateData.lnCol.title= title;
templateData.lnCol.setAttribute('aria-label', title);
}
private static iconClassNameFor(element: IMarker): string {
......
......@@ -37,8 +37,6 @@ export default class Messages {
public static MARKERS_PANEL_MULTIPLE_UNKNOWNS_LABEL=(noOfUnknowns: number):string=>{return nls.localize('markers.panel.multiple.unknowns.label', "{0} Unknowns", ''+noOfUnknowns);};
public static MARKERS_PANEL_AT_LINE_COL_NUMBER= (ln: number, col: number):string=>{return nls.localize('markers.panel.at.ln.col.number', "({0}, {1})", '' + ln, '' + col);}
public static MARKERS_PANEL_TITLE_AT_LINE_COL_NUMBER= (ln: number, col: number):string=>{return nls.localize('markers.panel.title.at.ln.col.number', "At line {0}, column {1}", '' + ln, '' + col);}
public static MARKERS_PANEL_TITLE_SOURCE= (source: string):string=>{return nls.localize('markers.panel.title.source', "Built by {0}", source);}
public static PROBLEMS_TREE_ARIA_LABEL_RESOURCE= (fileName, noOfProblems):string => {return nls.localize('problems.tree.aria.label.resource', "{0} with {1} problems", fileName, noOfProblems);}
public static PROBLEMS_TREE_ARIA_LABEL_MARKER= (marker: IMarker):string => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册