(String path)
| 509 | } |
| 510 | |
| 511 | public static void recordOpen(String path) { |
| 512 | if (!recordingEnabled() || !record || path==null) |
| 513 | return; |
| 514 | path = fixPath(path); |
| 515 | String s = scriptMode?"imp = IJ.openImage":"open"; |
| 516 | boolean openingLut = false; |
| 517 | if (scriptMode) { |
| 518 | if (isTextOrTable(path)) |
| 519 | s = "IJ.open"; |
| 520 | else if (path!=null && path.endsWith(".lut")) { |
| 521 | s = "lut = Opener.openLut"; |
| 522 | openingLut = true; |
| 523 | } |
| 524 | } |
| 525 | textArea.append(s+"(\""+path+"\");\n"); |
| 526 | ImagePlus imp = WindowManager.getCurrentImage(); |
| 527 | if (openingLut && imp!=null && !imp.getTitle().endsWith(".lut")) |
| 528 | textArea.append("imp.setLut(lut);\n"); |
| 529 | } |
| 530 | |
| 531 | public static void recordPath(String key, String path) { |
| 532 | if (key==null || !recordPath) { |
no test coverage detected