mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
finish getting pdex files to install, now with actual feedback
This commit is contained in:
@@ -1358,23 +1358,28 @@ public class Base {
|
||||
"only be installed from trusted sources.");
|
||||
|
||||
if (result == JOptionPane.YES_OPTION) {
|
||||
try {
|
||||
editor.statusNotice("Installing " + baseName + "...");
|
||||
editor.startIndeterminate();
|
||||
editor.statusNotice("Installing " + baseName + "...");
|
||||
editor.startIndeterminate();
|
||||
|
||||
// do the work of the actual install
|
||||
LocalContribution contrib =
|
||||
AvailableContribution.install(this, new File(path));
|
||||
new Thread(() -> {
|
||||
try {
|
||||
// do the work of the actual install
|
||||
LocalContribution contrib =
|
||||
AvailableContribution.install(this, new File(path));
|
||||
|
||||
editor.stopIndeterminate();
|
||||
editor.statusEmpty();
|
||||
EventQueue.invokeLater(() -> {
|
||||
editor.stopIndeterminate();
|
||||
|
||||
if (contrib == null) {
|
||||
Messages.showWarning("Error During Installation", "Could not install contrib from " + path);
|
||||
if (contrib != null) {
|
||||
editor.statusEmpty();
|
||||
} else {
|
||||
editor.statusError("Could not install " + path);
|
||||
}
|
||||
});
|
||||
} catch (IOException e) {
|
||||
EventQueue.invokeLater(() -> Messages.showWarning("Exception During Installation", "Could not install contrib from " + path, e));
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Messages.showWarning("Exception During Installation", "Could not install contrib from " + path, e);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user