Index: Source/devtools/front_end/sources/SourcesPanel.js |
diff --git a/Source/devtools/front_end/sources/SourcesPanel.js b/Source/devtools/front_end/sources/SourcesPanel.js |
index ccbaa3a1ee8f0c5f8955142eae6c568adab35a67..3588c810a79531e99503bc85e22f07fab1c4fb0d 100644 |
--- a/Source/devtools/front_end/sources/SourcesPanel.js |
+++ b/Source/devtools/front_end/sources/SourcesPanel.js |
@@ -1369,6 +1369,44 @@ WebInspector.SourcesPanel.DebuggerPausedDetailsRevealer.prototype = { |
} |
} |
+ |
+/** |
+ * @constructor |
+ * @implements {WebInspector.Revealer} |
+ */ |
+WebInspector.SourcesPanel.LineMessageRevealer = function() |
+{ |
+} |
+ |
+WebInspector.SourcesPanel.LineMessageRevealer.prototype = { |
+ /** |
+ * @override |
+ * @param {!Object} object |
+ * @return {!Promise} |
+ */ |
+ reveal: function(object) |
+ { |
+ var container = /** @type {!WebInspector.UISourceCodeMessages} */ (object); |
+ if (!(container.messages() instanceof Array)) |
+ return Promise.reject(new Error("Internal error: messages member not an array of line message definition objects")); |
+ if (!(container.source() instanceof WebInspector.UISourceCode)) |
+ return Promise.reject(new Error("Internal error: code member not a UISourceCode objects")); |
+ |
+ var frame = WebInspector.SourcesPanel.instance().sourcesView().viewForFile(container.source()); |
+ frame.setMessagesForSource(container.messages().map(function(m){ |
+ return new WebInspector.SourceFrameMessage(m.text(), WebInspector.SourceFrameMessage.Level[m.kind()], { |
+ line: m.location().startLine, |
+ column: m.location().startColumn |
+ }, { |
+ line: m.location().endLine, |
+ column: m.location().endColumn |
+ }); |
+ })); |
+ |
+ return Promise.resolve(); |
+ } |
+} |
+ |
/** |
* @constructor |
* @implements {WebInspector.ActionDelegate} |