@@ -1358,23 +1358,28 @@ public Editor handleOpen(String path) {
1358
1358
"only be installed from trusted sources." );
1359
1359
1360
1360
if (result == JOptionPane .YES_OPTION ) {
1361
- try {
1362
- editor .statusNotice ("Installing " + baseName + "..." );
1363
- editor .startIndeterminate ();
1364
-
1365
- // do the work of the actual install
1366
- LocalContribution contrib =
1367
- AvailableContribution .install (this , new File (path ));
1368
-
1369
- editor .stopIndeterminate ();
1370
- editor .statusEmpty ();
1371
-
1372
- if (contrib == null ) {
1373
- Messages .showWarning ("Error During Installation" , "Could not install contrib from " + path );
1361
+ editor .statusNotice ("Installing " + baseName + "..." );
1362
+ editor .startIndeterminate ();
1363
+
1364
+ new Thread (() -> {
1365
+ try {
1366
+ // do the work of the actual install
1367
+ LocalContribution contrib =
1368
+ AvailableContribution .install (this , new File (path ));
1369
+
1370
+ EventQueue .invokeLater (() -> {
1371
+ editor .stopIndeterminate ();
1372
+
1373
+ if (contrib != null ) {
1374
+ editor .statusEmpty ();
1375
+ } else {
1376
+ editor .statusError ("Could not install " + path );
1377
+ }
1378
+ });
1379
+ } catch (IOException e ) {
1380
+ EventQueue .invokeLater (() -> Messages .showWarning ("Exception During Installation" , "Could not install contrib from " + path , e ));
1374
1381
}
1375
- } catch (IOException e ) {
1376
- Messages .showWarning ("Exception During Installation" , "Could not install contrib from " + path , e );
1377
- }
1382
+ }).start ();
1378
1383
}
1379
1384
}
1380
1385
});
0 commit comments