Bug 480287 Uncategorized libs were losing their parent.
authorDoug Schaefer <dschaefer@qnx.com>
Sat, 24 Oct 2015 15:38:21 +0000 (11:38 -0400)
committerDoug Schaefer <dschaefer@qnx.com>
Sat, 24 Oct 2015 17:09:16 +0000 (13:09 -0400)
This badly affected the check behavior since it couldn't find it in
the tree.

Change-Id: Ic77c9d45568f31f9563d2c1a93040291e28b20df

toolchains/arduino/org.eclipse.cdt.arduino.core/src/org/eclipse/cdt/arduino/core/internal/board/LibraryIndex.java
toolchains/arduino/org.eclipse.cdt.arduino.ui/src/org/eclipse/cdt/arduino/ui/internal/project/LibrariesPropertyPage.java

index 10ef898..75d1b69 100644 (file)
@@ -13,6 +13,7 @@ import java.util.Set;
 public class LibraryIndex {
 
        private List<ArduinoLibrary> libraries;
+       public static final String UNCATEGORIZED = "Uncategorized"; //$NON-NLS-1$
 
        // category name to library name
        private Map<String, Set<String>> categories = new HashMap<>();
@@ -25,7 +26,7 @@ public class LibraryIndex {
 
                        String category = library.getCategory();
                        if (category == null) {
-                               category = "Uncategorized"; //$NON-NLS-1$
+                               category = UNCATEGORIZED;
                        }
 
                        Set<String> categoryLibs = categories.get(category);
index 879db2f..5c301a6 100644 (file)
@@ -84,7 +84,7 @@ public class LibrariesPropertyPage extends PropertyPage {
                                } catch (CoreException e) {
                                        Activator.log(e);
                                }
-                               return null;
+                               return LibraryIndex.UNCATEGORIZED;
                        } else if (element instanceof String || element instanceof ArduinoPlatform) {
                                return index;
                        } else {