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

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

Issue 2537223003: [DevTools] Introduce Project.isServiceProject method. (Closed)
Patch Set: rebased Created 4 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 /** 4 /**
5 * @implements {Bindings.DebuggerSourceMapping} 5 * @implements {Bindings.DebuggerSourceMapping}
6 * @unrestricted 6 * @unrestricted
7 */ 7 */
8 Sources.FormatterScriptMapping = class { 8 Sources.FormatterScriptMapping = class {
9 /** 9 /**
10 * @param {!SDK.DebuggerModel} debuggerModel 10 * @param {!SDK.DebuggerModel} debuggerModel
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 /** 98 /**
99 * @implements {Sources.SourcesView.EditorAction} 99 * @implements {Sources.SourcesView.EditorAction}
100 * @implements {SDK.TargetManager.Observer} 100 * @implements {SDK.TargetManager.Observer}
101 * @unrestricted 101 * @unrestricted
102 */ 102 */
103 Sources.ScriptFormatterEditorAction = class { 103 Sources.ScriptFormatterEditorAction = class {
104 constructor() { 104 constructor() {
105 this._projectId = 'formatter:'; 105 this._projectId = 'formatter:';
106 this._project = new Bindings.ContentProviderBasedProject( 106 this._project = new Bindings.ContentProviderBasedProject(
107 Workspace.workspace, this._projectId, Workspace.projectTypes.Formatter, 'formatter'); 107 Workspace.workspace, this._projectId, Workspace.projectTypes.Formatter, 'formatter',
108 true /* isServiceProject */);
108 109
109 /** @type {!Map.<!SDK.Script, !Workspace.UISourceCode>} */ 110 /** @type {!Map.<!SDK.Script, !Workspace.UISourceCode>} */
110 this._uiSourceCodes = new Map(); 111 this._uiSourceCodes = new Map();
111 /** @type {!Map.<string, string>} */ 112 /** @type {!Map.<string, string>} */
112 this._formattedPaths = new Map(); 113 this._formattedPaths = new Map();
113 /** @type {!Map.<!Workspace.UISourceCode, !Sources.FormatterScriptMapping.Fo rmatData>} */ 114 /** @type {!Map.<!Workspace.UISourceCode, !Sources.FormatterScriptMapping.Fo rmatData>} */
114 this._formatData = new Map(); 115 this._formatData = new Map();
115 116
116 /** @type {!Set.<string>} */ 117 /** @type {!Set.<string>} */
117 this._pathsToFormatOnLoad = new Set(); 118 this._pathsToFormatOnLoad = new Set();
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 var targets = SDK.targetManager.targets(); 378 var targets = SDK.targetManager.targets();
378 for (var i = 0; i < targets.length; ++i) { 379 for (var i = 0; i < targets.length; ++i) {
379 var scriptMapping = 380 var scriptMapping =
380 /** @type {!Sources.FormatterScriptMapping} */ (this._scriptMappingB yTarget.get(targets[i])); 381 /** @type {!Sources.FormatterScriptMapping} */ (this._scriptMappingB yTarget.get(targets[i]));
381 Bindings.debuggerWorkspaceBinding.setSourceMapping(targets[i], formatted UISourceCode, scriptMapping); 382 Bindings.debuggerWorkspaceBinding.setSourceMapping(targets[i], formatted UISourceCode, scriptMapping);
382 } 383 }
383 this._showIfNeeded(uiSourceCode, formattedUISourceCode, formatterMapping); 384 this._showIfNeeded(uiSourceCode, formattedUISourceCode, formatterMapping);
384 } 385 }
385 } 386 }
386 }; 387 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698