R (@NotNull String rootId, @NotNull BuildRootIndex rootIndex) { final List<R> descriptors = rootIndex.getRootDescriptors( new File(rootId), Collections.singletonList((BuildTargetType<? extends JVMModuleBuildTarget<R>>)getTargetType()), null ); return ContainerUtil.getFirstItem(descriptors); }