()
| 4974 | } |
| 4975 | |
| 4976 | void showText() { |
| 4977 | String title = getFirstString(); |
| 4978 | String text = null; |
| 4979 | if (interp.nextToken()==',') |
| 4980 | text = getLastString(); |
| 4981 | else |
| 4982 | interp.getRightParen(); |
| 4983 | if (text==null) { |
| 4984 | text = title; |
| 4985 | title = "Untitled"; |
| 4986 | } |
| 4987 | Frame frame = WindowManager.getFrame(title); |
| 4988 | Editor ed = null; |
| 4989 | boolean useExisting = frame instanceof Editor; |
| 4990 | if (useExisting) { |
| 4991 | ed = (Editor)frame; |
| 4992 | TextArea ta = ed.getTextArea(); |
| 4993 | ta.selectAll(); |
| 4994 | ta.replaceRange(text, ta.getSelectionStart(), ta.getSelectionEnd()); |
| 4995 | } else { |
| 4996 | ed = new Editor(); |
| 4997 | ed.setSize(350, 300); |
| 4998 | ed.create(title, text); |
| 4999 | } |
| 5000 | if (title.equals("Untitled") && text.contains("Test Action Tool")) |
| 5001 | new MacroInstaller().installSingleTool(text); |
| 5002 | } |
| 5003 | |
| 5004 | Variable[] newMenu() { |
| 5005 | String name = getFirstString(); |
no test coverage detected