Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js

Issue 2219613002: DevTools: show "add new file" context item when clicking on workspace root folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 10 *
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 var path = node._folderPath; 599 var path = node._folderPath;
600 var project = node._project; 600 var project = node._project;
601 601
602 var contextMenu = new WebInspector.ContextMenu(event); 602 var contextMenu = new WebInspector.ContextMenu(event);
603 603
604 WebInspector.NavigatorView.appendSearchItem(contextMenu, path); 604 WebInspector.NavigatorView.appendSearchItem(contextMenu, path);
605 contextMenu.appendSeparator(); 605 contextMenu.appendSeparator();
606 606
607 if (project && project.type() === WebInspector.projectTypes.FileSystem) { 607 if (project && project.type() === WebInspector.projectTypes.FileSystem) {
608 contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"), this._handleContextMenuRefresh.bind(this, project, path)); 608 contextMenu.appendItem(WebInspector.UIString.capitalize("Refresh"), this._handleContextMenuRefresh.bind(this, project, path));
609 if (node instanceof WebInspector.NavigatorFolderTreeNode) { 609 contextMenu.appendItem(WebInspector.UIString.capitalize("New ^file") , this._handleContextMenuCreate.bind(this, project, path));
610 contextMenu.appendItem(WebInspector.UIString.capitalize("New ^fi le"), this._handleContextMenuCreate.bind(this, project, path)); 610 if (node instanceof WebInspector.NavigatorFolderTreeNode)
611 contextMenu.appendItem(WebInspector.UIString.capitalize("Exclude ^folder"), this._handleContextMenuExclude.bind(this, project, path)); 611 contextMenu.appendItem(WebInspector.UIString.capitalize("Exclude ^folder"), this._handleContextMenuExclude.bind(this, project, path));
612 }
613 } 612 }
614 contextMenu.appendSeparator(); 613 contextMenu.appendSeparator();
615 WebInspector.NavigatorView.appendAddFolderItem(contextMenu); 614 WebInspector.NavigatorView.appendAddFolderItem(contextMenu);
616 615
617 function removeFolder() 616 function removeFolder()
618 { 617 {
619 var shouldRemove = window.confirm(WebInspector.UIString("Are you sur e you want to remove this folder?")); 618 var shouldRemove = window.confirm(WebInspector.UIString("Are you sur e you want to remove this folder?"));
620 if (shouldRemove) 619 if (shouldRemove)
621 project.remove(); 620 project.remove();
622 } 621 }
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 { 1565 {
1567 if (this._treeElement) 1566 if (this._treeElement)
1568 return this._treeElement; 1567 return this._treeElement;
1569 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na vigatorView, this._type, this._title, this._hoverCallback); 1568 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na vigatorView, this._type, this._title, this._hoverCallback);
1570 this._treeElement.setNode(this); 1569 this._treeElement.setNode(this);
1571 return this._treeElement; 1570 return this._treeElement;
1572 }, 1571 },
1573 1572
1574 __proto__: WebInspector.NavigatorTreeNode.prototype 1573 __proto__: WebInspector.NavigatorTreeNode.prototype
1575 } 1574 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698