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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 isDirty: function() | 491 isDirty: function() |
492 { | 492 { |
493 return typeof this._workingCopy !== "undefined" || typeof this._workingC
opyGetter !== "undefined"; | 493 return typeof this._workingCopy !== "undefined" || typeof this._workingC
opyGetter !== "undefined"; |
494 }, | 494 }, |
495 | 495 |
496 /** | 496 /** |
497 * @return {string} | 497 * @return {string} |
498 */ | 498 */ |
499 extension: function() | 499 extension: function() |
500 { | 500 { |
501 var lastIndexOfDot = this._name.lastIndexOf("."); | 501 return WebInspector.TextUtils.extension(this._name); |
502 var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot
+ 1) : ""; | |
503 var indexOfQuestionMark = extension.indexOf("?"); | |
504 if (indexOfQuestionMark !== -1) | |
505 extension = extension.substr(0, indexOfQuestionMark); | |
506 return extension; | |
507 }, | 502 }, |
508 | 503 |
509 /** | 504 /** |
510 * @return {?string} | 505 * @return {?string} |
511 */ | 506 */ |
512 content: function() | 507 content: function() |
513 { | 508 { |
514 return this._content; | 509 return this._content; |
515 }, | 510 }, |
516 | 511 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 * @param {string} query | 692 * @param {string} query |
698 * @param {boolean} caseSensitive | 693 * @param {boolean} caseSensitive |
699 * @param {boolean} isRegex | 694 * @param {boolean} isRegex |
700 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback | 695 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback |
701 */ | 696 */ |
702 searchInContent: function(query, caseSensitive, isRegex, callback) | 697 searchInContent: function(query, caseSensitive, isRegex, callback) |
703 { | 698 { |
704 callback([]); | 699 callback([]); |
705 } | 700 } |
706 } | 701 } |
OLD | NEW |