| Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
|
| index 8f39d886e0eac9dcde3761cf3a684657bf9c0547..72e031fbda79974c6f0b4a0d65c19c6354448a87 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
|
| @@ -26,10 +26,8 @@ Sources.SourcesView = class extends UI.VBox {
|
| /** @type {!Map.<!Workspace.UISourceCode, !UI.Widget>} */
|
| this._sourceViewByUISourceCode = new Map();
|
|
|
| - var tabbedEditorPlaceholderText =
|
| - Host.isMac() ? Common.UIString('Hit \u2318+P to open a file') : Common.UIString('Hit Ctrl+P to open a file');
|
| this._editorContainer = new Sources.TabbedEditorContainer(
|
| - this, Common.settings.createLocalSetting('previouslyViewedFiles', []), tabbedEditorPlaceholderText);
|
| + this, Common.settings.createLocalSetting('previouslyViewedFiles', []), this.placeholderElement());
|
| this._editorContainer.show(this._searchableView.element);
|
| this._editorContainer.addEventListener(
|
| Sources.TabbedEditorContainer.Events.EditorSelected, this._editorSelected, this);
|
| @@ -92,6 +90,35 @@ Sources.SourcesView = class extends UI.VBox {
|
| this.element.addEventListener('keydown', this._handleKeyDown.bind(this), false);
|
| }
|
|
|
| + placeholderElement() {
|
| + var shortcuts = [
|
| + {
|
| + defaultShortcut: Common.UIString('Ctrl+P'),
|
| + macShortcut: Common.UIString('\u2318+P'),
|
| + description: Common.UIString('Open a file')
|
| + },
|
| + {
|
| + defaultShortcut: Common.UIString('Ctrl+Shift+P'),
|
| + macShortcut: Common.UIString('\u2318+Shift+P'),
|
| + description: Common.UIString('Run command')
|
| + },
|
| + {
|
| + defaultShortcut: Common.UIString('Esc'),
|
| + macShortcut: Common.UIString('Esc'),
|
| + description: Common.UIString('Toggle console drawer')
|
| + },
|
| + ];
|
| + var placeholderElement = createElementWithClass('span', 'sources-placeholder');
|
| + for (var shortcut of shortcuts) {
|
| + var row = placeholderElement.createChild('div', 'sources-placeholder-row');
|
| + row.createChild('div', 'sources-placeholder-key')
|
| + .createTextChild(Host.isMac() ? shortcut.macShortcut : shortcut.defaultShortcut);
|
| + row.createChild('div', 'sources-placeholder-value').createTextChild(shortcut.description);
|
| + }
|
| +
|
| + return placeholderElement;
|
| + }
|
| +
|
| /**
|
| * @param {function(!Array.<!UI.KeyboardShortcut.Descriptor>, function(!Event=):boolean)} registerShortcutDelegate
|
| */
|
|
|