Java Code Examples for com.android.SdkConstants#OS_SDK_TOOLS_LIB_FOLDER

The following examples show how to use com.android.SdkConstants#OS_SDK_TOOLS_LIB_FOLDER . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProjectCreator.java    From java-n-IDE-for-Android with Apache License 2.0 3 votes vote down vote up
/**
 * Installs a new file that is based on a template file provided by the tools folder.
 * Each match of each key from the place-holder map in the template will be replaced with its
 * corresponding value in the created file.
 *
 * @param templateName the name of to the template file
 * @param destFile the path to the destination file, relative to the project
 * @param placeholderMap a map of (place-holder, value) to create the file from the template.
 * @throws ProjectCreateException
 */
public void installTemplate(String templateName, File destFile,
        Map<String, String> placeholderMap)
        throws ProjectCreateException {
    // query the target for its template directory
    String templateFolder = mSdkFolder + File.separator + SdkConstants.OS_SDK_TOOLS_LIB_FOLDER;
    final String sourcePath = templateFolder + File.separator + templateName;

    installFullPathTemplate(sourcePath, destFile, placeholderMap);
}
 
Example 2
Source File: ProjectCreator.java    From javaide with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Installs a new file that is based on a template file provided by the tools folder.
 * Each match of each key from the place-holder map in the template will be replaced with its
 * corresponding value in the created file.
 *
 * @param templateName the name of to the template file
 * @param destFile the path to the destination file, relative to the project
 * @param placeholderMap a map of (place-holder, value) to create the file from the template.
 * @throws ProjectCreateException
 */
public void installTemplate(String templateName, File destFile,
        Map<String, String> placeholderMap)
        throws ProjectCreateException {
    // query the target for its template directory
    String templateFolder = mSdkFolder + File.separator + SdkConstants.OS_SDK_TOOLS_LIB_FOLDER;
    final String sourcePath = templateFolder + File.separator + templateName;

    installFullPathTemplate(sourcePath, destFile, placeholderMap);
}