OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 isDirty: function() | 513 isDirty: function() |
514 { | 514 { |
515 return typeof this._workingCopy !== "undefined" || typeof this._workingC
opyGetter !== "undefined"; | 515 return typeof this._workingCopy !== "undefined" || typeof this._workingC
opyGetter !== "undefined"; |
516 }, | 516 }, |
517 | 517 |
518 /** | 518 /** |
519 * @return {string} | 519 * @return {string} |
520 */ | 520 */ |
521 extension: function() | 521 extension: function() |
522 { | 522 { |
523 var lastIndexOfDot = this._name.lastIndexOf("."); | 523 return WebInspector.TextUtils.extension(this._name); |
524 var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot
+ 1) : ""; | |
525 var indexOfQuestionMark = extension.indexOf("?"); | |
526 if (indexOfQuestionMark !== -1) | |
527 extension = extension.substr(0, indexOfQuestionMark); | |
528 return extension; | |
529 }, | 524 }, |
530 | 525 |
531 /** | 526 /** |
532 * @return {?string} | 527 * @return {?string} |
533 */ | 528 */ |
534 content: function() | 529 content: function() |
535 { | 530 { |
536 return this._content; | 531 return this._content; |
537 }, | 532 }, |
538 | 533 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 * @param {string} query | 714 * @param {string} query |
720 * @param {boolean} caseSensitive | 715 * @param {boolean} caseSensitive |
721 * @param {boolean} isRegex | 716 * @param {boolean} isRegex |
722 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback | 717 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback |
723 */ | 718 */ |
724 searchInContent: function(query, caseSensitive, isRegex, callback) | 719 searchInContent: function(query, caseSensitive, isRegex, callback) |
725 { | 720 { |
726 callback([]); | 721 callback([]); |
727 } | 722 } |
728 } | 723 } |
| 724 |
| 725 /** |
| 726 * @constructor |
| 727 * @param {string} text |
| 728 * @param {string} kind |
| 729 * @param {{startLine: number, startColumn: number, endLine: number, endColumn:
number}} location |
| 730 */ |
| 731 WebInspector.UISourceCodeMessage = function(text, kind, location) { |
| 732 this._text = text; |
| 733 this._kind = kind; |
| 734 this._location = location; |
| 735 } |
| 736 |
| 737 WebInspector.UISourceCodeMessage.prototype = { |
| 738 /** |
| 739 * @return {string} |
| 740 */ |
| 741 text: function() { |
| 742 return this._text; |
| 743 }, |
| 744 |
| 745 /** |
| 746 * @return {string} |
| 747 */ |
| 748 kind: function() { |
| 749 return this._kind; |
| 750 }, |
| 751 |
| 752 /** |
| 753 * @return {{startLine: number, startColumn: number, endLine: number, endCol
umn: number}} |
| 754 */ |
| 755 location: function() { |
| 756 return this._location; |
| 757 } |
| 758 } |
| 759 |
| 760 /** |
| 761 * @constructor |
| 762 * @param {!WebInspector.UISourceCode} source |
| 763 * @param {!Array<!WebInspector.UISourceCodeMessage>} messages |
| 764 */ |
| 765 WebInspector.UISourceCodeMessages = function(source, messages) |
| 766 { |
| 767 this._source = source; |
| 768 this._messages = messages; |
| 769 } |
| 770 |
| 771 WebInspector.UISourceCodeMessages.prototype = { |
| 772 /** |
| 773 * @return {!WebInspector.UISourceCode} |
| 774 */ |
| 775 source: function() { |
| 776 return this._source; |
| 777 }, |
| 778 |
| 779 /** |
| 780 * @return {!Array<!WebInspector.UISourceCodeMessage>} |
| 781 */ |
| 782 messages: function() { |
| 783 return this._messages; |
| 784 } |
| 785 } |
OLD | NEW |