@@ -1254,6 +1254,7 @@ public void rebuildExamplesMenu(JMenu menu) {
1254
1254
}
1255
1255
1256
1256
private static String priorPlatformFolder ;
1257
+ private static boolean newLibraryImported ;
1257
1258
1258
1259
public void onBoardOrPortChange () {
1259
1260
BaseNoGui .onBoardOrPortChange ();
@@ -1262,10 +1263,11 @@ public void onBoardOrPortChange() {
1262
1263
TargetPlatform tp = BaseNoGui .getTargetPlatform ();
1263
1264
if (tp != null ) {
1264
1265
String platformFolder = tp .getFolder ().getAbsolutePath ();
1265
- if (priorPlatformFolder == null || !priorPlatformFolder .equals (platformFolder )) {
1266
+ if (priorPlatformFolder == null || !priorPlatformFolder .equals (platformFolder ) || newLibraryImported ) {
1266
1267
pdeKeywords = new PdeKeywords ();
1267
1268
pdeKeywords .reload ();
1268
1269
priorPlatformFolder = platformFolder ;
1270
+ newLibraryImported = false ;
1269
1271
for (Editor editor : editors ) {
1270
1272
editor .updateKeywords (pdeKeywords );
1271
1273
}
@@ -1305,6 +1307,7 @@ protected void onIndexesUpdated() throws Exception {
1305
1307
// Manager dialog is modal, waits here until closed
1306
1308
1307
1309
//handleAddLibrary();
1310
+ newLibraryImported = true ;
1308
1311
onBoardOrPortChange ();
1309
1312
rebuildImportMenu (Editor .importMenu );
1310
1313
rebuildExamplesMenu (Editor .examplesMenu );
@@ -2262,6 +2265,7 @@ public void handleAddLibrary() {
2262
2265
// FIXME error when importing. ignoring :(
2263
2266
} finally {
2264
2267
// delete zip created temp folder, if exists
2268
+ newLibraryImported = true ;
2265
2269
FileUtils .recursiveDelete (tmpFolder );
2266
2270
}
2267
2271
}
0 commit comments