mirror of
https://github.com/processing/processing4.git
synced 2026-02-15 03:15:40 +01: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();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
3
todo.txt
3
todo.txt
@@ -26,7 +26,8 @@ X update to JDK 11.0.12+7
|
||||
X rewrite download handler to just use a simple <get>
|
||||
_ remove the rest of the jre downloader code
|
||||
X initial code to install a contrib from a pdex file
|
||||
_ test to make sure it's behaving properly
|
||||
X test to make sure it's behaving properly
|
||||
X finish getting pdex files to install, now with actual feedback
|
||||
o handleNew() returns an Editor object
|
||||
o unlikely to break anything, but it is a signature change
|
||||
X nope, nevermind, not gonna do it
|
||||
|
||||
Reference in New Issue
Block a user