public static Map<File, Set<ExportableComponent>> getRegisteredComponentsAndFiles(List<ExportableComponent> exportableComponents) { Map<File,Set<ExportableComponent>> fileToComponents = new HashMap<File, Set<ExportableComponent>>(); final List<ExportableComponent> components = new ArrayList<ExportableComponent>(Arrays.asList(ApplicationManager.getApplication().getComponents(ExportableApplicationComponent.class))); components.addAll(ServiceBean.loadServicesFromBeans(ExportableComponent.EXTENSION_POINT, ExportableComponent.class)); for (ExportableComponent component : components) { exportableComponents.add(component); final File[] exportFiles = component.getExportFiles(); for (File exportFile : exportFiles) { Set<ExportableComponent> componentsTied = fileToComponents.get(exportFile); if (componentsTied == null) { componentsTied = new HashSet<ExportableComponent>(); fileToComponents.put(exportFile, componentsTied); } componentsTied.add(component); } } return fileToComponents; }