mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
Bug 480287 Uncategorized libs were losing their parent.
This badly affected the check behavior since it couldn't find it in the tree. Change-Id: Ic77c9d45568f31f9563d2c1a93040291e28b20df
This commit is contained in:
parent
15a087a3f4
commit
0c59d09514
2 changed files with 3 additions and 2 deletions
|
@ -13,6 +13,7 @@ import java.util.Set;
|
||||||
public class LibraryIndex {
|
public class LibraryIndex {
|
||||||
|
|
||||||
private List<ArduinoLibrary> libraries;
|
private List<ArduinoLibrary> libraries;
|
||||||
|
public static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
|
||||||
|
|
||||||
// category name to library name
|
// category name to library name
|
||||||
private Map<String, Set<String>> categories = new HashMap<>();
|
private Map<String, Set<String>> categories = new HashMap<>();
|
||||||
|
@ -25,7 +26,7 @@ public class LibraryIndex {
|
||||||
|
|
||||||
String category = library.getCategory();
|
String category = library.getCategory();
|
||||||
if (category == null) {
|
if (category == null) {
|
||||||
category = "Uncategorized"; //$NON-NLS-1$
|
category = UNCATEGORIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
Set<String> categoryLibs = categories.get(category);
|
Set<String> categoryLibs = categories.get(category);
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class LibrariesPropertyPage extends PropertyPage {
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
Activator.log(e);
|
Activator.log(e);
|
||||||
}
|
}
|
||||||
return null;
|
return LibraryIndex.UNCATEGORIZED;
|
||||||
} else if (element instanceof String || element instanceof ArduinoPlatform) {
|
} else if (element instanceof String || element instanceof ArduinoPlatform) {
|
||||||
return index;
|
return index;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue