Asynchronous version of menu rebuild to be used on save and rename to prevent the interface from locking up until the menus are done.
()
| 1035 | * to prevent the interface from locking up until the menus are done. |
| 1036 | */ |
| 1037 | public void rebuildSketchbookMenus() { |
| 1038 | //System.out.println("async enter"); |
| 1039 | //new Exception().printStackTrace(); |
| 1040 | SwingUtilities.invokeLater(new Runnable() { |
| 1041 | public void run() { |
| 1042 | //System.out.println("starting rebuild"); |
| 1043 | rebuildSketchbookMenu(Editor.sketchbookMenu); |
| 1044 | rebuildToolbarMenu(Editor.toolbarMenu); |
| 1045 | //System.out.println("done with rebuild"); |
| 1046 | } |
| 1047 | }); |
| 1048 | //System.out.println("async exit"); |
| 1049 | } |
| 1050 | |
| 1051 | |
| 1052 | protected void rebuildToolbarMenu(JMenu menu) { |
no outgoing calls
no test coverage detected