public FileSetDescriptor getDescriptor(String wsOsArch) { ConfigSpec configuration = ConfigSpec.createFromWsOsArch(wsOsArch); RootFilesProperties rootProperties = propertiesPerConfig.get(configuration); if (rootProperties == null) return null; // p2 will ignore permissions unless there are root files configured for the same configuration ensureRootFilesConfigured(rootProperties, configuration); FileSetDescriptor rootFilesDescriptor = initDescriptor(configuration, wsOsArch); copyRootPropertiesToDescriptor(rootProperties, rootFilesDescriptor); return rootFilesDescriptor; }
public IPathComputer getRootFileComputer(final String configSpec) { final FileToPathMap filesMap = propertiesPerConfig.get(ConfigSpec.createFromWsOsArch(configSpec)).getFileMap(); return new IPathComputer() { public void reset() { // do nothing } public IPath computePath(File fileInSources) { IPath fileInInstallation = filesMap.get(fileInSources); return fileInInstallation; } }; }