Index: Source/devtools/front_end/sources/NavigatorView.js |
diff --git a/Source/devtools/front_end/sources/NavigatorView.js b/Source/devtools/front_end/sources/NavigatorView.js |
index 88af5224e8e984341a975f383c40c752db2df307..22c41c01a9bbf8a04c09acf7ee1d97f471d59b79 100644 |
--- a/Source/devtools/front_end/sources/NavigatorView.js |
+++ b/Source/devtools/front_end/sources/NavigatorView.js |
@@ -316,6 +316,14 @@ WebInspector.NavigatorView.prototype = { |
}, |
/** |
+ * @param {!WebInspector.UISourceCode} uiSourceCode |
+ */ |
+ _handleContextMenuRename: function(uiSourceCode) |
+ { |
+ this.rename(uiSourceCode, false); |
+ }, |
+ |
+ /** |
* @param {!WebInspector.Project} project |
* @param {string} path |
*/ |
@@ -350,12 +358,14 @@ WebInspector.NavigatorView.prototype = { |
contextMenu.appendSeparator(); |
var project = uiSourceCode.project(); |
- var path = uiSourceCode.parentPath(); |
- contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Refresh parent" : "Refresh Parent"), this._handleContextMenuRefresh.bind(this, project, path)); |
- contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Duplicate file" : "Duplicate File"), this._handleContextMenuCreate.bind(this, project, path, uiSourceCode)); |
- contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Exclude parent folder" : "Exclude Parent Folder"), this._handleContextMenuExclude.bind(this, project, path)); |
- contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Delete file" : "Delete File"), this._handleContextMenuDelete.bind(this, uiSourceCode)); |
- contextMenu.appendSeparator(); |
+ if (project.type() === WebInspector.projectTypes.FileSystem) { |
+ var path = uiSourceCode.parentPath(); |
+ contextMenu.appendItem(WebInspector.UIString("Rename\u2026"), this._handleContextMenuRename.bind(this, uiSourceCode)); |
+ contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Make a copy\u2026" : "Make a Copy\u2026"), this._handleContextMenuCreate.bind(this, project, path, uiSourceCode)); |
+ contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Delete" : "Delete"), this._handleContextMenuDelete.bind(this, uiSourceCode)); |
lushnikov
2014/06/06 16:26:19
WebInspector.useLowerCaseMenuTitles() ? "Delete" :
|
+ contextMenu.appendSeparator(); |
+ } |
+ |
this._appendAddFolderItem(contextMenu); |
contextMenu.show(); |
}, |