@@ -1254,6 +1254,7 @@ public void rebuildExamplesMenu(JMenu menu) {
12541254 }
12551255
12561256 private static String priorPlatformFolder ;
1257+ private static boolean newLibraryImported ;
12571258
12581259 public void onBoardOrPortChange () {
12591260 BaseNoGui .onBoardOrPortChange ();
@@ -1262,10 +1263,11 @@ public void onBoardOrPortChange() {
12621263 TargetPlatform tp = BaseNoGui .getTargetPlatform ();
12631264 if (tp != null ) {
12641265 String platformFolder = tp .getFolder ().getAbsolutePath ();
1265- if (priorPlatformFolder == null || !priorPlatformFolder .equals (platformFolder )) {
1266+ if (priorPlatformFolder == null || !priorPlatformFolder .equals (platformFolder ) || newLibraryImported ) {
12661267 pdeKeywords = new PdeKeywords ();
12671268 pdeKeywords .reload ();
12681269 priorPlatformFolder = platformFolder ;
1270+ newLibraryImported = false ;
12691271 for (Editor editor : editors ) {
12701272 editor .updateKeywords (pdeKeywords );
12711273 }
@@ -1305,6 +1307,7 @@ protected void onIndexesUpdated() throws Exception {
13051307 // Manager dialog is modal, waits here until closed
13061308
13071309 //handleAddLibrary();
1310+ newLibraryImported = true ;
13081311 onBoardOrPortChange ();
13091312 rebuildImportMenu (Editor .importMenu );
13101313 rebuildExamplesMenu (Editor .examplesMenu );
@@ -2262,6 +2265,7 @@ public void handleAddLibrary() {
22622265 // FIXME error when importing. ignoring :(
22632266 } finally {
22642267 // delete zip created temp folder, if exists
2268+ newLibraryImported = true ;
22652269 FileUtils .recursiveDelete (tmpFolder );
22662270 }
22672271 }
0 commit comments