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

Unified Diff: Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 1165263002: DevTools: Add 'continue to here' to the editor context menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/sources/JavaScriptSourceFrame.js
diff --git a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
index d4c3ddda6ef123cf6a78c78440d1f6e8b9c6e90a..a64f2d74ac34abb47061f240c254f5923f10053f 100644
--- a/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
+++ b/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
@@ -256,7 +256,8 @@ WebInspector.JavaScriptSourceFrame.prototype = {
populateLineGutterContextMenu: function(contextMenu, lineNumber)
{
- contextMenu.appendItem(WebInspector.UIString.capitalize("Continue to ^here"), this._continueToLine.bind(this, lineNumber));
+ var uiLocation = new WebInspector.UILocation(this._uiSourceCode, lineNumber, 0);
+ this._scriptsPanel.appendUILocationItems(contextMenu, uiLocation);
var breakpoint = this._breakpointManager.findBreakpointOnLine(this._uiSourceCode, lineNumber);
if (!breakpoint) {
// This row doesn't have a breakpoint: We want to show Add Breakpoint and Add and Edit Breakpoint.
@@ -273,7 +274,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
}
},
- populateTextAreaContextMenu: function(contextMenu, lineNumber)
+ populateTextAreaContextMenu: function(contextMenu, lineNumber, columnNumber)
{
var textSelection = this.textEditor.selection();
if (textSelection && !textSelection.isEmpty()) {
@@ -305,7 +306,7 @@ WebInspector.JavaScriptSourceFrame.prototype = {
scriptFile.addSourceMapURL(url);
}
- WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu.call(this, contextMenu, lineNumber);
+ WebInspector.UISourceCodeFrame.prototype.populateTextAreaContextMenu.call(this, contextMenu, lineNumber, columnNumber);
if (this._uiSourceCode.project().type() === WebInspector.projectTypes.Network && WebInspector.moduleSetting("jsSourceMapsEnabled").get()) {
if (this._scriptFileForTarget.size) {
@@ -1104,20 +1105,6 @@ WebInspector.JavaScriptSourceFrame.prototype = {
this._breakpointManager.setBreakpoint(this._uiSourceCode, lineNumber, columnNumber, condition, enabled);
},
- /**
- * @param {number} lineNumber
- */
- _continueToLine: function(lineNumber)
- {
- var executionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
- if (!executionContext)
- return;
- var rawLocation = WebInspector.debuggerWorkspaceBinding.uiLocationToRawLocation(executionContext.target(), this._uiSourceCode, lineNumber, 0);
- if (!rawLocation)
- return;
- this._scriptsPanel.continueToLocation(rawLocation);
- },
-
dispose: function()
{
this._breakpointManager.removeEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded, this);
« no previous file with comments | « Source/devtools/front_end/sources/CallStackSidebarPane.js ('k') | Source/devtools/front_end/sources/SourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698