Add file reference of product to map of objects.

@param objects
object map.
@param linkTarget
build description for executable or shared library.
@return file reference to generated executable or shared library.
547209
private PBXObjectRef addProduct(final Map objects, final TargetInfo linkTarget) {

    //
    // create file reference for executable file
    // forget Ant's location, just place in XCode's default location
    final PBXObjectRef executable = createPBXFileReference("BUILD_PRODUCTS_DIR", linkTarget.getOutput().getParent(),
        linkTarget.getOutput());
    final Map executableProperties = executable.getProperties();

    final String fileType = getFileType(linkTarget);
    executableProperties.put("explicitFileType", fileType);
    executableProperties.put("includeInIndex", "0");
    objects.put(executable.getID(), executableProperties);

    return executable;
  }
1371547
public void link(Object source, CollectionDescriptor cds, List referencesToLink)
    {
        for(int i = 0; i < referencesToLink.size(); i++)
        {
            link(source, cds, referencesToLink.get(i));
        }
    }
328054
public void createLinks(ServiceReference<S> declarationBinderRef) {
        for (D declaration : linkerManagement.getMatchedDeclaration()) {
            if (linkerManagement.canBeLinked(declaration, declarationBinderRef)) {
                linkerManagement.link(declaration, declarationBinderRef);
            }
        }
    }
378733
@Override
    public T addAsWebResource(File resource, String target) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource should be specified");
        Validate.notNull(target, "Target should be specified");

        return addAsWebResource(new FileAsset(resource), target);
    }
640815
@RequestMapping(value = "builds/{buildId}/links", method = RequestMethod.GET)
    public Form getBuildLinkForm(@PathVariable ID buildId) {
        // Gets the form values
        List<BuildLinkFormItem> items = structureService.getBuildLinksFrom(structureService.getBuild(buildId))
                .stream()
                .map(build -> new BuildLinkFormItem(build.getProject().getName(), build.getName()))
                .collect(Collectors.toList());
        // Creates the form
        return Form.create()
                .with(
                        MultiForm.of(
                                "links",
                                Form.create()
                                        .with(Text.of("project").label("Project name"))
                                        .with(Text.of("build").label("Build name"))
                        )
                                .label("Links")
                                .value(items)
                );
    }
354210
protected void addLinkedResources(String path, GeneratorContext context, FilePathMapping fMapping) {
		addLinkedResources(path, context, Arrays.asList(fMapping));
	}
1361595
@Override
    public ComponentBuilder addDirectory(String target) throws IOException
    {
        checkTarget(target);
        FileBuilder fb = new FileBuilder(target);
        fileBuilders.add(fb);
        return fb;
    }
952058
public BeadledomWebTarget buildTarget(Link baseUrl) {
    BeadledomClient beadledomClient = build();
    return beadledomClient.target(baseUrl);
  }
358735
protected HalRepresentation add(final Links links) {
        this.links = this.links != null
                ? copyOf(this.links).with(links).build()
                : links.using(this.curies);
        if (embedded != null) {
            embedded = embedded.using(this.curies);
        }
        return this;
    }
1038657
@Override
    public T addAsLibraries(File... resources) throws IllegalArgumentException {
        Validate.notNull(resources, "Resources must be specified");
        for (File resource : resources) {
            addAsLibrary(resource);
        }
        return covarientReturn();
    }
1088228
def build(self, filenames, cl_args=None, link_args=None,
              x64=False, out_dir=''):
        
        if not cl_args:
            cl_args = []
        if not link_args:
            link_args = []
        msvc, lib = self.vc.get_bin_and_lib(x64)
        lib = self.make_lib(lib)
        if out_dir:
            cl_args.append('/Fo:' + out_dir + '\\')
        include = self.make_inc(self.vc.inc + self.sdk.inc)
        cl_args.extend(include + filenames)
        try:
            msvc.run_cl('/c', *cl_args)
        except CalledProcessError as error:
            logging.error(_('failed to compile: %s'), filenames)
            logging.error(_('cl.exe returned:\n%s'), error.output)
            return False
        link_args.extend(lib + self.make_objs(filenames, out_dir))
        try:
            msvc.run_link(*link_args)
        except CalledProcessError as error:
            logging.error(_('failed to link: %s'), filenames)
            logging.error(_('link.exe returned:\n%s'), error.output)
            return False
        return True
2465
public BeadledomWebTarget buildTarget(URI baseUrl) {
    BeadledomClient beadledomClient = build();
    return beadledomClient.target(baseUrl);
  }
1108773
public Map<String,Object> addPropertiesFile(Map<String,Object> properties)
    {
        String propertiesPath = (String)properties.get("webStartPropertiesFile");
        if (propertiesPath == null)
            return properties;
        if (propertiesPath.startsWith("/"))
            propertiesPath = propertiesPath.substring(1);
        URL url = null;
        try {
            url = ClassServiceUtility.getClassService().getResourceURL(propertiesPath, null, null, this.getClass().getClassLoader());
        } catch (RuntimeException e) {
            e.printStackTrace();    // ???
        }           
        Reader inStream = null;
        if (url != null)
        {
            try {
                inStream = new InputStreamReader(url.openStream());
            } catch (Exception e) {
                // Not found
            }
        }
        if (inStream != null)
        {
            try {
                // Todo may want to add cache info (using bundle lastModified).
                Properties cachedProperties = new Properties();
                cachedProperties.load(inStream);
                inStream.close();
                for (Object key : cachedProperties.keySet())
                {
                    properties.put(key.toString(), cachedProperties.get(key));
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return properties;
    }
63940
public static Map<String, IDLProxyObject> create(File file, boolean debug, File path, List<CodeDependent> cds,
            Set<String> compiledClass) throws IOException {

        return create(file, debug, path, cds, compiledClass, true);
    }
1257573
@Override
    public T addAsLibrary(URL resource, ArchivePath target) throws IllegalArgumentException {
        Validate.notNull(resource, "Resource must be specified");
        Validate.notNull(target, "Target must be specified");

        File resourceFile = new File(resource.getFile());
        if (!resourceFile.exists()) {
            return addAsLibrary(new UrlAsset(resource), target);
        }

        if (resourceFile.isFile()) {
            return addAsLibrary(new UrlAsset(resource), target);
        }

        if (resourceFile.listFiles().length == 0) {
            return addAsLibrary(new UrlAsset(resource), target);
        }

        for (File file : resourceFile.listFiles()) {
            addAsLibrary(file, new BasicPath(target, file.getName()));
        }

        return covarientReturn();
    }
361134
private void createExternalLinks() {

        int pointerId;
        try {
            pointerId = OpenCms.getResourceManager().getResourceType(
                CmsResourceTypePointer.getStaticTypeName()).getTypeId();
        } catch (CmsLoaderException e) {
            // should not never ever happen
            pointerId = CmsResourceTypePointer.getStaticTypeId();
        }
        // loop through all links
        Iterator i = m_externalLinks.iterator();
        while (i.hasNext()) {
            String linkUrl = (String)i.next();
            String filename = getExternalLinkFile(linkUrl);

            m_report.print(Messages.get().container(Messages.RPT_CREATE_EXTERNAL_LINK_0), I_CmsReport.FORMAT_NOTE);
            m_report.print(
                org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_ARGUMENT_1, filename));
            m_report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));

            List properties = new ArrayList();
            CmsProperty property1 = new CmsProperty(
                CmsPropertyDefinition.PROPERTY_TITLE,
                "Link to " + linkUrl,
                "Link to " + linkUrl);
            properties.add(property1);
            try {
                m_cmsObject.createResource(m_linkGallery + filename, pointerId, linkUrl.getBytes(), properties);
            } catch (CmsException e) {
                // do nothing here, an exception will be thrown if this link already exists
            }
            m_report.println(
                org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_OK_0),
                I_CmsReport.FORMAT_OK);
        }
    }
1095758
@Override
    public T addAsLibrary(String resourceName, String target) throws IllegalArgumentException {
        Validate.notNull(resourceName, "ResourceName must be specified");
        Validate.notNull(target, "Target must be specified");

        return addAsLibrary(resourceName, new BasicPath(target));
    }