Index: Source/devtools/front_end/workspace/UISourceCode.js |
diff --git a/Source/devtools/front_end/workspace/UISourceCode.js b/Source/devtools/front_end/workspace/UISourceCode.js |
index 1b374623fc42f589f914df608d9aaf80055a6e1d..3d3e8c3c155378cc409f77af13ef8d15e58d5d9d 100644 |
--- a/Source/devtools/front_end/workspace/UISourceCode.js |
+++ b/Source/devtools/front_end/workspace/UISourceCode.js |
@@ -520,12 +520,7 @@ WebInspector.UISourceCode.prototype = { |
*/ |
extension: function() |
{ |
- var lastIndexOfDot = this._name.lastIndexOf("."); |
- var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot + 1) : ""; |
- var indexOfQuestionMark = extension.indexOf("?"); |
- if (indexOfQuestionMark !== -1) |
- extension = extension.substr(0, indexOfQuestionMark); |
- return extension; |
+ return WebInspector.TextUtils.extension(this._name); |
}, |
/** |
@@ -726,3 +721,65 @@ WebInspector.Revision.prototype = { |
callback([]); |
} |
} |
+ |
+/** |
+ * @constructor |
+ * @param {string} text |
+ * @param {string} kind |
+ * @param {{startLine: number, startColumn: number, endLine: number, endColumn: number}} location |
+ */ |
+WebInspector.UISourceCodeMessage = function(text, kind, location) { |
+ this._text = text; |
+ this._kind = kind; |
+ this._location = location; |
+} |
+ |
+WebInspector.UISourceCodeMessage.prototype = { |
+ /** |
+ * @return {string} |
+ */ |
+ text: function() { |
+ return this._text; |
+ }, |
+ |
+ /** |
+ * @return {string} |
+ */ |
+ kind: function() { |
+ return this._kind; |
+ }, |
+ |
+ /** |
+ * @return {{startLine: number, startColumn: number, endLine: number, endColumn: number}} |
+ */ |
+ location: function() { |
+ return this._location; |
+ } |
+} |
+ |
+/** |
+ * @constructor |
+ * @param {!WebInspector.UISourceCode} source |
+ * @param {!Array<!WebInspector.UISourceCodeMessage>} messages |
+ */ |
+WebInspector.UISourceCodeMessages = function(source, messages) |
+{ |
+ this._source = source; |
+ this._messages = messages; |
+} |
+ |
+WebInspector.UISourceCodeMessages.prototype = { |
+ /** |
+ * @return {!WebInspector.UISourceCode} |
+ */ |
+ source: function() { |
+ return this._source; |
+ }, |
+ |
+ /** |
+ * @return {!Array<!WebInspector.UISourceCodeMessage>} |
+ */ |
+ messages: function() { |
+ return this._messages; |
+ } |
+} |