mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-27 21:54:30 +01:00
parent
c6642c1bd2
commit
1d74bb87ac
@ -1295,6 +1295,7 @@ public class Base {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static String priorPlatformFolder;
|
private static String priorPlatformFolder;
|
||||||
|
private static boolean newLibraryImported;
|
||||||
|
|
||||||
public void onBoardOrPortChange() {
|
public void onBoardOrPortChange() {
|
||||||
BaseNoGui.onBoardOrPortChange();
|
BaseNoGui.onBoardOrPortChange();
|
||||||
@ -1303,10 +1304,11 @@ public class Base {
|
|||||||
TargetPlatform tp = BaseNoGui.getTargetPlatform();
|
TargetPlatform tp = BaseNoGui.getTargetPlatform();
|
||||||
if (tp != null) {
|
if (tp != null) {
|
||||||
String platformFolder = tp.getFolder().getAbsolutePath();
|
String platformFolder = tp.getFolder().getAbsolutePath();
|
||||||
if (priorPlatformFolder == null || !priorPlatformFolder.equals(platformFolder)) {
|
if (priorPlatformFolder == null || !priorPlatformFolder.equals(platformFolder) || newLibraryImported) {
|
||||||
pdeKeywords = new PdeKeywords();
|
pdeKeywords = new PdeKeywords();
|
||||||
pdeKeywords.reload();
|
pdeKeywords.reload();
|
||||||
priorPlatformFolder = platformFolder;
|
priorPlatformFolder = platformFolder;
|
||||||
|
newLibraryImported = false;
|
||||||
for (Editor editor : editors) {
|
for (Editor editor : editors) {
|
||||||
editor.updateKeywords(pdeKeywords);
|
editor.updateKeywords(pdeKeywords);
|
||||||
}
|
}
|
||||||
@ -1346,6 +1348,7 @@ public class Base {
|
|||||||
// Manager dialog is modal, waits here until closed
|
// Manager dialog is modal, waits here until closed
|
||||||
|
|
||||||
//handleAddLibrary();
|
//handleAddLibrary();
|
||||||
|
newLibraryImported = true;
|
||||||
onBoardOrPortChange();
|
onBoardOrPortChange();
|
||||||
rebuildImportMenu(Editor.importMenu);
|
rebuildImportMenu(Editor.importMenu);
|
||||||
rebuildExamplesMenu(Editor.examplesMenu);
|
rebuildExamplesMenu(Editor.examplesMenu);
|
||||||
@ -2303,6 +2306,7 @@ public class Base {
|
|||||||
// FIXME error when importing. ignoring :(
|
// FIXME error when importing. ignoring :(
|
||||||
} finally {
|
} finally {
|
||||||
// delete zip created temp folder, if exists
|
// delete zip created temp folder, if exists
|
||||||
|
newLibraryImported = true;
|
||||||
FileUtils.recursiveDelete(tmpFolder);
|
FileUtils.recursiveDelete(tmpFolder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user