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)
| 1877 | * <A HREF="http://dev.processing.org/bugs/show_bug.cgi?id=276">Bug 276</A>. |
| 1878 | */ |
| 1879 | public boolean handleSave(boolean immediately) { |
| 1880 | //stopRunner(); |
| 1881 | handleStop(); // 0136 |
| 1882 | removeAllLineHighlights(); |
| 1883 | |
| 1884 | if (untitled) { |
| 1885 | return handleSaveAs(); |
| 1886 | // need to get the name, user might also cancel here |
| 1887 | |
| 1888 | } else if (immediately) { |
| 1889 | return handleSave2(); |
| 1890 | |
| 1891 | } else { |
| 1892 | SwingUtilities.invokeLater(new Runnable() { |
| 1893 | public void run() { |
| 1894 | handleSave2(); |
| 1895 | } |
| 1896 | }); |
| 1897 | } |
| 1898 | return true; |
| 1899 | } |
| 1900 | |
| 1901 | |
| 1902 | private boolean handleSave2() { |
no test coverage detected