| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 var uiLocation = null; | 490 var uiLocation = null; |
| 491 if (info.uiLocation) { | 491 if (info.uiLocation) { |
| 492 uiLocation = info.uiLocation; | 492 uiLocation = info.uiLocation; |
| 493 url = uiLocation.uiSourceCode.contentURL(); | 493 url = uiLocation.uiSourceCode.contentURL(); |
| 494 } else if (info.url) { | 494 } else if (info.url) { |
| 495 url = info.url; | 495 url = info.url; |
| 496 var uiSourceCode = Workspace.workspace.uiSourceCodeForURL(url); | 496 var uiSourceCode = Workspace.workspace.uiSourceCodeForURL(url); |
| 497 uiLocation = uiSourceCode ? uiSourceCode.uiLocation(info.lineNumber || 0,
info.columnNumber || 0) : null; | 497 uiLocation = uiSourceCode ? uiSourceCode.uiLocation(info.lineNumber || 0,
info.columnNumber || 0) : null; |
| 498 } | 498 } |
| 499 var resource = url ? Bindings.resourceForURL(url) : null; | 499 var resource = url ? Bindings.resourceForURL(url) : null; |
| 500 var request = url ? SDK.NetworkLog.requestForURL(url) : null; | 500 var request = url ? SDK.networkLog.requestForURL(url) : null; |
| 501 var contentProvider = uiLocation ? uiLocation.uiSourceCode : resource; | 501 var contentProvider = uiLocation ? uiLocation.uiSourceCode : resource; |
| 502 | 502 |
| 503 if (info.revealable) | 503 if (info.revealable) |
| 504 result.push({title: Common.UIString('Reveal'), handler: () => Common.Revea
ler.reveal(info.revealable)}); | 504 result.push({title: Common.UIString('Reveal'), handler: () => Common.Revea
ler.reveal(info.revealable)}); |
| 505 if (uiLocation) { | 505 if (uiLocation) { |
| 506 result.push({ | 506 result.push({ |
| 507 title: Common.UIString.capitalize('Open in Sources ^panel'), | 507 title: Common.UIString.capitalize('Open in Sources ^panel'), |
| 508 handler: () => Common.Revealer.reveal(uiLocation) | 508 handler: () => Common.Revealer.reveal(uiLocation) |
| 509 }); | 509 }); |
| 510 } | 510 } |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 contextMenu.appendSeparator(); | 780 contextMenu.appendSeparator(); |
| 781 contextMenu.appendItem(Common.UIString('Save'), save.bind(null, false)); | 781 contextMenu.appendItem(Common.UIString('Save'), save.bind(null, false)); |
| 782 | 782 |
| 783 if (contentProvider instanceof Workspace.UISourceCode) { | 783 if (contentProvider instanceof Workspace.UISourceCode) { |
| 784 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (contentProvider
); | 784 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (contentProvider
); |
| 785 if (!uiSourceCode.project().canSetFileContent()) | 785 if (!uiSourceCode.project().canSetFileContent()) |
| 786 contextMenu.appendItem(Common.UIString.capitalize('Save ^as...'), save.b
ind(null, true)); | 786 contextMenu.appendItem(Common.UIString.capitalize('Save ^as...'), save.b
ind(null, true)); |
| 787 } | 787 } |
| 788 } | 788 } |
| 789 }; | 789 }; |
| OLD | NEW |