code: void parseHeader(String header, Set<String> packages) {
          if (header != null && header.length() > 0) {
              List<String> splitPackages = new ArrayList<String>();
              // We can't just split() on commas, because there may be things in quotes, like uses clauses
              int lastIndex = 0;
              boolean inQuotedSection = false;
              int i = 0;
              for (i = 0; i < header.length(); i++) {
                  if ((header.charAt(i) == ',') && !(inQuotedSection)) {
                      String packagePlusAttributesAndDirectives = header.substring(lastIndex, i);
                      lastIndex = i + 1;
                      splitPackages.add(packagePlusAttributesAndDirectives);
                  } else if (header.charAt(i) == '"') {
                      inQuotedSection = !inQuotedSection;
                  }
              }
              // Add the last string
              splitPackages.add(header.substring(lastIndex, i));
  
              // Now go through and handle the attributes
  
              for (String packagePlusAttributesAndDirectives : splitPackages) {
                  String[] bits = packagePlusAttributesAndDirectives.split(";");
                  // We could also process ibm-api-type and other declarations here to get better information if we need it
                  packages.add(bits[0]);
  
              }
          }
      }
docs: This algorithm is nuts. Bnd has a nice on in OSGIHeader.
  
  @param header
  @param packages