| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 remove() { | 166 remove() { |
| 167 this._project.deleteFile(this.url()); | 167 this._project.deleteFile(this.url()); |
| 168 } | 168 } |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * @param {string} name | 171 * @param {string} name |
| 172 * @param {string} url | 172 * @param {string} url |
| 173 * @param {!Common.ResourceType=} contentType | 173 * @param {!Common.ResourceType=} contentType |
| 174 */ | 174 */ |
| 175 _updateName(name, url, contentType) { | 175 _updateName(name, url, contentType) { |
| 176 var oldURL = this.url(); | |
| 177 this._url = this._url.substring(0, this._url.length - this._name.length) + n
ame; | 176 this._url = this._url.substring(0, this._url.length - this._name.length) + n
ame; |
| 178 this._name = name; | 177 this._name = name; |
| 179 if (url) | 178 if (url) |
| 180 this._url = url; | 179 this._url = url; |
| 181 if (contentType) | 180 if (contentType) |
| 182 this._contentType = contentType; | 181 this._contentType = contentType; |
| 183 this.dispatchEventToListeners(Workspace.UISourceCode.Events.TitleChanged, th
is); | 182 this.dispatchEventToListeners(Workspace.UISourceCode.Events.TitleChanged, th
is); |
| 184 } | 183 } |
| 185 | 184 |
| 186 /** | 185 /** |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 Workspace.UISourceCodeMetadata = class { | 939 Workspace.UISourceCodeMetadata = class { |
| 941 /** | 940 /** |
| 942 * @param {?Date} modificationTime | 941 * @param {?Date} modificationTime |
| 943 * @param {?number} contentSize | 942 * @param {?number} contentSize |
| 944 */ | 943 */ |
| 945 constructor(modificationTime, contentSize) { | 944 constructor(modificationTime, contentSize) { |
| 946 this.modificationTime = modificationTime; | 945 this.modificationTime = modificationTime; |
| 947 this.contentSize = contentSize; | 946 this.contentSize = contentSize; |
| 948 } | 947 } |
| 949 }; | 948 }; |
| OLD | NEW |