Added untitledAutoSave, autoSave to preferences

This commit is contained in:
joelmoniz
2014-06-04 20:19:42 +05:30
parent c02d3585f6
commit 95755e9404
2 changed files with 16 additions and 17 deletions

View File

@@ -1079,8 +1079,11 @@ public class DebugEditor extends JavaEditor implements ActionListener {
@Override
public void prepareRun() {
super.prepareRun();
if (!ExperimentalMode.autoSaveEnabled)
return;
try {
if (sketch.isUntitled()) {
if (sketch.isUntitled() && ExperimentalMode.untitledAutoSaveEnabled) {
if (handleSave(true))
statusTimedNotice("Saved. Running...", 5);
else
@@ -1118,20 +1121,6 @@ public class DebugEditor extends JavaEditor implements ActionListener {
* @param secs
*/
public void statusTimedNotice(final String msg, final int secs) {
// EventQueue.invokeLater(new Runnable() {
//
// @Override
// public void run() {
// statusNotice(msg);
// try {
// Thread.sleep(secs * 1000);
// } catch (InterruptedException e) {
// e.printStackTrace();
// }
// statusEmpty();
//
// }
// });
SwingWorker s = new SwingWorker<Void, Void>() {
@Override