public Pair<Icon, @Nls String> createIconAndText(@NotNull Object element) {
    if (element instanceof ConfigurationFactory) {
      return Pair.create(((ConfigurationFactory)element).getIcon(), ((ConfigurationFactory)element).getName());
    }
    else if (element instanceof ConfigurationType) {
      return Pair.create(((ConfigurationType)element).getIcon(), ((ConfigurationType)element).getDisplayName());
    }
    else {
      return Pair.create(null, String.valueOf(element));
    }
  }
public Pair<Icon, @Nls String> createIconAndText(@NotNull Object element)