@@ -1295,6 +1295,7 @@ public void rebuildExamplesMenu(JMenu menu) {
1295
1295
}
1296
1296
1297
1297
private static String priorPlatformFolder ;
1298
+ private static boolean newLibraryImported ;
1298
1299
1299
1300
public void onBoardOrPortChange () {
1300
1301
BaseNoGui .onBoardOrPortChange ();
@@ -1303,10 +1304,11 @@ public void onBoardOrPortChange() {
1303
1304
TargetPlatform tp = BaseNoGui .getTargetPlatform ();
1304
1305
if (tp != null ) {
1305
1306
String platformFolder = tp .getFolder ().getAbsolutePath ();
1306
- if (priorPlatformFolder == null || !priorPlatformFolder .equals (platformFolder )) {
1307
+ if (priorPlatformFolder == null || !priorPlatformFolder .equals (platformFolder ) || newLibraryImported ) {
1307
1308
pdeKeywords = new PdeKeywords ();
1308
1309
pdeKeywords .reload ();
1309
1310
priorPlatformFolder = platformFolder ;
1311
+ newLibraryImported = false ;
1310
1312
for (Editor editor : editors ) {
1311
1313
editor .updateKeywords (pdeKeywords );
1312
1314
}
@@ -1346,6 +1348,7 @@ protected void onIndexesUpdated() throws Exception {
1346
1348
// Manager dialog is modal, waits here until closed
1347
1349
1348
1350
//handleAddLibrary();
1351
+ newLibraryImported = true ;
1349
1352
onBoardOrPortChange ();
1350
1353
rebuildImportMenu (Editor .importMenu );
1351
1354
rebuildExamplesMenu (Editor .examplesMenu );
@@ -2303,6 +2306,7 @@ public void handleAddLibrary() {
2303
2306
// FIXME error when importing. ignoring :(
2304
2307
} finally {
2305
2308
// delete zip created temp folder, if exists
2309
+ newLibraryImported = true ;
2306
2310
FileUtils .recursiveDelete (tmpFolder );
2307
2311
}
2308
2312
}
0 commit comments