(application, path)
| 389 | system.openFile({ prompt:"Open File" }, path => { if (path) application.defer("doOpenFileCallback", new String(path)); }); |
| 390 | } |
| 391 | doOpenFileCallback(application, path) { |
| 392 | if (path.endsWith(".js") || path.endsWith(".json") || path.endsWith(".ts") || path.endsWith(".xml") || path.endsWith(".xs")) |
| 393 | this.selectFile(path); |
| 394 | else if (path.endsWith(".bin")) { |
| 395 | this.showTab(3, true); |
| 396 | this.selectMachine(null, 3); |
| 397 | this.serial.doInstallApp(path); |
| 398 | } |
| 399 | else if (path.endsWith(".xsa")) { |
| 400 | this.showTab(3, true); |
| 401 | this.selectMachine(null, 3); |
| 402 | this.serial.doInstallMod(path); |
| 403 | } |
| 404 | else if (path.endsWith(".cpuprofile")) { |
| 405 | this.showTab(2, true); |
| 406 | this.selectMachine(null, 2); |
| 407 | path = path.valueOf(); |
| 408 | let profile = this.profiles.find(profile => profile.path == path); |
| 409 | if (!profile) { |
| 410 | this.doOpenProfile(path); |
| 411 | } |
| 412 | } |
| 413 | } |
| 414 | doOpenProfile(path) { |
| 415 | let profile; |
| 416 | try { |
no test coverage detected