Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] New Target API not included for M5

> 
> Can you please elaborate a little bit on the last step? What exactly
> must I do to "materialize" a target definition in the file system so
> that I can point my API baseline to that place?
> 

To materialize a target from a target definition file, use the 
ITargetPlatformService. Specifically, you can create a target handle 
(which provides access to the target definition), from an IFile or a URI 
to an external target definition file.

        /**
         * Returns a handle to a target definition backed by the 
underlying file.
         * The target definition may or may not exist. If the file does 
not exist
         * then this is a new target definition which becomes one of the 
known
         * workspace target definitions when it is saved.
         * 
         * @param file target definition file that may or may not exist 
         * @return target handle
         */
        public ITargetHandle getTarget(IFile file);

        /**
         * Returns a handle to a target definition backed by the 
underlying {@link URI}.
         * The target definition may or may not exist. If the {@link URI} 
is valid
         * then this is a new target definition which becomes one of the 
known
         * external target definitions.
         * 
         * @param uri target definition {@link URI} that may or may not 
exist 
         * @return target handle
         */
        public ITargetHandle getTarget(URI uri);


Darin


Back to the top