Actually handle the save command. If 'immediately' is set to false, this will happen in another thread so that the message area will update and the save button will stay highlighted while the save is happening. If 'immediately' is true, then it will happen immediately. This is used during a quit, be
(boolean immediately)
| 2630 | * <A HREF="http://dev.processing.org/bugs/show_bug.cgi?id=276">Bug 276</A>. |
| 2631 | */ |
| 2632 | public boolean handleSave(boolean immediately) { |
| 2633 | // handleStop(); // 0136 |
| 2634 | |
| 2635 | if (sketch.isUntitled()) { |
| 2636 | return handleSaveAs(); |
| 2637 | // need to get the name, user might also cancel here |
| 2638 | |
| 2639 | } else if (immediately) { |
| 2640 | handleSaveImpl(); |
| 2641 | |
| 2642 | } else { |
| 2643 | EventQueue.invokeLater(new Runnable() { |
| 2644 | public void run() { |
| 2645 | handleSaveImpl(); |
| 2646 | } |
| 2647 | }); |
| 2648 | } |
| 2649 | return true; |
| 2650 | } |
| 2651 | |
| 2652 | |
| 2653 | protected void handleSaveImpl() { |
no test coverage detected