private static void collectPath(Class<? extends Configurable> configurableClass, List<? super String> path, Configurable[] configurables) {
    for (Configurable configurable : configurables) {
      if (configurableClass.equals(configurable.getClass()) ||
          configurable instanceof ConfigurableWrapper &&
          configurableClass.getName().equals(((ConfigurableWrapper)configurable).getExtensionPoint().instanceClass)) {
        path.add(configurable.getDisplayName());
      }
      if (configurable instanceof Configurable.Composite) {
        ArrayList<String> thisPart = new ArrayList<>();
        collectPath(configurableClass, thisPart, ((Configurable.Composite)configurable).getConfigurables());
        if (!thisPart.isEmpty()) {
          path.add(configurable.getDisplayName());
          path.addAll(thisPart);
          break;
        }
      }
    }
  }
private static void collectPath(Class<? extends Configurable> configurableClass, List<? super String> path, Configurable[] configurables)