code: protected static String getFeatureId(File featureManifest) throws IOException {
          String rootDir = CustomUtils.getCanonicalPath(featureManifest.getParentFile().getParentFile().getParentFile()); // go up two directories.
          String output = null;
          // check with user feature dir.
          if (rootDir.equals(CustomUtils.getCanonicalPath(new File(CustomUtils.getInstallRoot(), CustomUtils.USER_FEATURE_DIR)))) {
              output = "usr";
          } else {
              for (ProductExtensionInfo info : ProductExtension.getProductExtensions()) {
                  File extensionDir = new File(info.getLocation());
                  if (!CustomUtils.isAbsolute(extensionDir)) {
                      File parentDir = new File(CustomUtils.getInstallRoot()).getParentFile();
                      extensionDir = new File(parentDir, info.getLocation());
                  }
                  if (rootDir.equals(CustomUtils.getCanonicalPath(extensionDir))) {
                      output = info.getProductID();
                      break;
                  }
              }
          }
          return output;
      }
docs: Find corresponding feature id (i.e., user or myExt1 from the location of feature manifest file.
  The logic is that since the location of the feature manifest file is .../lib/features/<feature manifest>
  find the parent of lib directory, and compare the location information of the ProductionExtension
  objects, and if they match, get the corresponding feature id from the ProductExtension object
  and return it. If there is no matching id, return null.
  
  @throws IOException