| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) IBM Corp. 2009 All rights reserved. | 2 * Copyright (C) IBM Corp. 2009 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 * @override | 200 * @override |
| 201 * @param {!WebInspector.Context} context | 201 * @param {!WebInspector.Context} context |
| 202 * @param {string} actionId | 202 * @param {string} actionId |
| 203 * @return {boolean} | 203 * @return {boolean} |
| 204 */ | 204 */ |
| 205 handleAction: function(context, actionId) | 205 handleAction: function(context, actionId) |
| 206 { | 206 { |
| 207 var frame = WebInspector.context.flavor(WebInspector.UISourceCodeFrame); | 207 var frame = WebInspector.context.flavor(WebInspector.UISourceCodeFrame); |
| 208 if (!frame) | 208 if (!frame) |
| 209 return false; | 209 return false; |
| 210 var text = frame.textEditor.copyRange(frame.textEditor.selection()); | 210 var text = frame.textEditor.text(frame.textEditor.selection()); |
| 211 WebInspector.viewManager.showView("sources.watch"); | 211 WebInspector.viewManager.showView("sources.watch"); |
| 212 this.doUpdate(); | 212 this.doUpdate(); |
| 213 this._createWatchExpression(text); | 213 this._createWatchExpression(text); |
| 214 this._saveExpressions(); | 214 this._saveExpressions(); |
| 215 return true; | 215 return true; |
| 216 }, | 216 }, |
| 217 | 217 |
| 218 /** | 218 /** |
| 219 * @override | 219 * @override |
| 220 * @param {!Event} event | 220 * @param {!Event} event |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 contextMenu.appendApplicableItems(this._result); | 450 contextMenu.appendApplicableItems(this._result); |
| 451 }, | 451 }, |
| 452 | 452 |
| 453 _copyValueButtonClicked: function() | 453 _copyValueButtonClicked: function() |
| 454 { | 454 { |
| 455 InspectorFrontendHost.copyText(this._valueElement.textContent); | 455 InspectorFrontendHost.copyText(this._valueElement.textContent); |
| 456 }, | 456 }, |
| 457 | 457 |
| 458 __proto__: WebInspector.Object.prototype | 458 __proto__: WebInspector.Object.prototype |
| 459 } | 459 } |
| OLD | NEW |