(String title, String msg, String[] variables)
| 1433 | } |
| 1434 | |
| 1435 | void showError(String title, String msg, String[] variables) { |
| 1436 | boolean noImages = msg.startsWith("There are no images open"); |
| 1437 | if (noImages) |
| 1438 | title = "No Image"; |
| 1439 | Macro.setOptions(null); |
| 1440 | GenericDialog gd = new GenericDialog(title); |
| 1441 | gd.setInsets(6,5,0); |
| 1442 | gd.addMessage(msg); |
| 1443 | gd.setInsets(15,30,5); |
| 1444 | if (!noImages) |
| 1445 | gd.addCheckbox("Show \"Debug\" Window", showVariables); |
| 1446 | gd.hideCancelButton(); |
| 1447 | gd.showDialog(); |
| 1448 | if (!noImages) |
| 1449 | showVariables = gd.getNextBoolean(); |
| 1450 | else |
| 1451 | showVariables = false; |
| 1452 | if (!gd.wasCanceled() && showVariables) |
| 1453 | updateDebugWindow(variables, null); |
| 1454 | } |
| 1455 | |
| 1456 | public TextWindow updateDebugWindow(String[] variables, TextWindow debugWindow) { |
| 1457 | if (debugWindow==null) { |
no test coverage detected