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

Unified Diff: Source/devtools/front_end/InplaceFormatterEditorAction.js

Issue 211003002: DevTools: rename SourceEditor to SourceView, make entire SourcesPanel a drop target. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: For landing Created 6 years, 9 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/InplaceFormatterEditorAction.js
diff --git a/Source/devtools/front_end/InplaceFormatterEditorAction.js b/Source/devtools/front_end/InplaceFormatterEditorAction.js
index 8f80a6ee4cab7cc28ccff4c9e88f2a23bc8fa92c..37d93b3c06e882228ec5c36e34345b5f50190395 100644
--- a/Source/devtools/front_end/InplaceFormatterEditorAction.js
+++ b/Source/devtools/front_end/InplaceFormatterEditorAction.js
@@ -5,7 +5,7 @@
/**
* @constructor
- * @implements {WebInspector.SourcesEditor.EditorAction}
+ * @implements {WebInspector.SourcesView.EditorAction}
*/
WebInspector.InplaceFormatterEditorAction = function()
{
@@ -40,17 +40,17 @@ WebInspector.InplaceFormatterEditorAction.prototype = {
},
/**
- * @param {!WebInspector.SourcesEditor} sourcesEditor
+ * @param {!WebInspector.SourcesView} sourcesView
* @return {!Element}
*/
- button: function(sourcesEditor)
+ button: function(sourcesView)
{
if (this._button)
return this._button.element;
- this._sourcesEditor = sourcesEditor;
- this._sourcesEditor.addEventListener(WebInspector.SourcesEditor.Events.EditorSelected, this._editorSelected.bind(this));
- this._sourcesEditor.addEventListener(WebInspector.SourcesEditor.Events.EditorClosed, this._editorClosed.bind(this));
+ this._sourcesView = sourcesView;
+ this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSelected, this._editorSelected.bind(this));
+ this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClosed, this._editorClosed.bind(this));
this._button = new WebInspector.StatusBarButton(WebInspector.UIString("Format"), "sources-toggle-pretty-print-status-bar-item");
this._button.toggled = false;
@@ -74,7 +74,7 @@ WebInspector.InplaceFormatterEditorAction.prototype = {
_formatSourceInPlace: function()
{
- var uiSourceCode = this._sourcesEditor.currentUISourceCode();
+ var uiSourceCode = this._sourcesView.currentUISourceCode();
if (!this._isFormattable(uiSourceCode))
return;
@@ -102,14 +102,14 @@ WebInspector.InplaceFormatterEditorAction.prototype = {
{
if (uiSourceCode.workingCopy() === formattedContent)
return;
- var sourceFrame = this._sourcesEditor.viewForFile(uiSourceCode);
+ var sourceFrame = this._sourcesView.viewForFile(uiSourceCode);
var start = [0, 0];
if (sourceFrame) {
var selection = sourceFrame.selection();
start = formatterMapping.originalToFormatted(selection.startLine, selection.startColumn);
}
uiSourceCode.setWorkingCopy(formattedContent);
- this._sourcesEditor.showSourceLocation(uiSourceCode, start[0], start[1]);
+ this._sourcesView.showSourceLocation(uiSourceCode, start[0], start[1]);
}
},
}
« no previous file with comments | « Source/devtools/front_end/FilteredItemSelectionDialog.js ('k') | Source/devtools/front_end/ScriptFormatterEditorAction.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698