aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/plugins/com.android.ide.eclipse.adt/templates
Commit message (Collapse)AuthorAgeFilesLines
* Allow project templates to be bundled separatelyTor Norbye2012-06-0462-1335/+0
| | | | | | | | | | | | | | | | | | This changeset moves the various FreeMarker templates out of the ADT plugin and over into the tools install area. The code to instantiate templates is simplified a bit now that it no longer needs to both handle files on disk and files read out of the .jar. There's a new first page to the various template wizards which is shown if the tools are not up to date (specifically, if the $SDK/tools/templates/ directory does not exist). This page explains that the tools have to be updated, and the Next button is disabled until they are up to date. This CL also contains some other tweaks suggested by Roman to the activity-to-layout name mapping and misc code changes. Change-Id: I3bc65f54a6b79bbeedfb917a9d34ec0d312f3526
* Support selector syntax for thumbnails in templatesTor Norbye2012-05-253-11/+28
| | | | | | | | | | | | | | This changes the thumbnail handling from templates from ad-hoc attributes to a more selector-centric system. The template can specify one or more thumbnails along with parameter values associated with those thumbnails. When the user edits an attribute, the wizard reevaluates the thumbnail and picks the best match (meaning one of the thumbnails that matches all the parameter values, and among those the one that matches the most.) (This changeset also moves the metadata code into a new class.) Change-Id: Ic75d58573df5b2ea200c6b2861bbf36ce17ea1c3
* New Template Wizard supportTor Norbye2012-05-2263-0/+1320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changeset adds several new templates, to create a new project, a new activity, a new custom view, etc. More importantly, it contains support for these wizards (and the corresponding code generation) to be driven by templates. A wizard contains metadata which provides a name, description and icon for the template, as well as a list of parameters, along with type and constraint metadata for those parameters. When a wizard is created for this template, it automatically adds UI elements to input the parameters and to validate the input. Parameters can also specify their default values as templated expressions using the other variables on the page, so in the New Blank Activity wizard for example, editing the activity name automatically updates the suggested layout name, by repeatedly evaluating a template expression to compute a layout name from an activity name. There's a recipe file for each template which states what actions to take to create the template. In addition to obviously copying resources (such as icons and jar files) and instantiating templates (to rewrite text using variables and FreeMarker logic), it can also merge XML contents (to for example insert activity registration metadata into the manifest file, or add string definitions to the strings.xml file), and it can cause files to be opened when the template is created. Tne new wizards also use JFace's decorator support to provide help and to mark text fields that contain errors, when one or more of the page fields do not validate, as well as to show tip text along the bottom of the page. One example of this is that it explains what a "package name" is when the package field has focus. This changeset also contains a "Template Development Wizard" which lets you point to a local directory containing a template definition, and run a test wizard from there. This is useful for developing, debugging and testing templates. Change-Id: I08e7d2464a1ef00d09517f0154c42681249a7ff6
* Update default project icons, and add an xhdpi versionTor Norbye2011-12-164-0/+0
| | | | Change-Id: I1c8a8ee2e470a30bc9df76b694e9b68fe09d5712
* Change default launcher icon name in new Android projectsTor Norbye2011-09-064-1/+1
| | | | | | | | | | | | | | | | | When creating a new project, the default project template includes a launcher icon named "icon.png". This changeset changes the name of this default icon to "ic_launcher.png", in accordance with the recommended naming convention listed in http://developer.android.com/guide/practices/ui_guidelines/icon_design.html (The secondary motivation for this is that the Icon Set Wizard will suggest ic_launcher as a default launcher name, and it would be nice if going through the wizard with the default settings would replace the current project's launcher icon. Given the guidelines above I'd rather not change the wizard default name to "icon") Change-Id: I9f516c769019c2635edad4e1e6f01a5110d156fe
* Adding import R class statementKeiji Ariyama2011-02-162-3/+3
| | | | | | when creating project with different package Activity. Change-Id: Icce8609f9e925760b43778b39e064a74ba314900
* ADT: ensure <application> is last in manifest.Raphael Moll2010-11-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | ADT descriptors have no notion of XML ordering. We modify the concept of "mandatory" descriptor to have normal mandatory descriptors versus "mandatory last" ones. ("mandatory" elements are virtual reserved slots that are always present in the UiModel even if they have no real counterpart in the XML model. These elements ensure they can be manipulated in the UI even before their XML is created.) Then we try our best to ensure the "last" ones remain at the end of the UiNode model. There are 2 cases: - in UiElementNode, when constructing the UINode model when parsing an existing XML model, we try to reorder the nodes at the end if possible. - in UiActions, when adding a new element to the UiModel, we try to place it before the first "mandatory last" element. SDK Bug 3197310 Change-Id: I6a7d9502a95ebe92ff82e07f3f3249a0d25c2154
* Replace icon template with new style and multiple densities.Xavier Ducrohet2009-09-304-0/+0
| | | | | | | | | | | | | | | | | | The icon in the templates of ADT was medium density only. I added new densities (high and low), as well as updated to the new Eclair style. Also added a version for Ant project. Updated ADT and sdklib to deal with creating new projects with all 3 icons. In case of Ant project, this is done only if the icons are present in the target platforms. For ADT, this is done only if the project target donut or later. Older project still have only one icon located in drawable/ Change-Id: I77069a1e4902ef395d490526aabc40a26e33d4ca
* ADT #1715616: "New Android Test Project" wizard.Raphael2009-05-083-0/+4
| | | | Also updates eclipse/changes.txt
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0310-0/+52
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-0310-52/+0
|
* auto import from //branches/cupcake/...@125939The Android Open Source Project2009-01-092-0/+2
|
* Initial ContributionThe Android Open Source Project2008-10-219-0/+50