History log of /sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/TemplateMetadata.java
Revision Date Author Comments
66a4556bc7f0726efe0f568c85f17ed16aafe9fa 28-Jun-2014 Josiah Gaskin <josiahgaskin@google.com> Fix Template Inflation in ADT

This change updates template handling in ADT to handle new tags including
formfactor and category.

Change-Id: Ia9bd6bdcfaf40061835381f8d3c6f8d67274d694
bd3220d0d3193807def9d38f9c8d671dc636d6e8 30-Dec-2013 Tor Norbye <tnorbye@google.com> Update to Lombok 0.2.2 and package ecj for command line lint

Change-Id: I3fc73035d968dfdb4e98b11b505f20a6b6ea58b7
ce4b39a1377b6546564cd0818f8296f1f40cc590 20-Dec-2012 Tor Norbye <tnorbye@google.com> 41681: "class|unique|nonempty" contraint doesn't check uniqueness

Also added unique constraint on some of the activity templates.

Change-Id: I2af181d9d2d716505c80bb4f487920166594625f
8ba6ca919874100bbc7b9bbc30c2e328ecfc71b9 21-Aug-2012 Tor Norbye <tnorbye@google.com> Add a default icon for templates without icons

Change-Id: Ic069160c1f6551238f50a13b3d206431a7284f5f
85e4a1a9dd133abb879ec211ce8dd385004edf22 08-Aug-2012 Xavier Ducrohet <xav@android.com> Refactor common.jar

Move resources and com.android.util.Pair into layoutlib_api
where they belong since layoutlib depends on them and we need
to control the API.

Made a copy of Pair to stay in common.jar but moved it to
com.android.utils.Pair (the one in com.android.util.Pair is
marked as deprecated to prevent usage where applicable).

Also moved XmlUtil and PositionXmlParser to com.android.utils
to match Pair.

Change-Id: I21d7057d3f2ce604f86a3bb1fa3c130948c93b89
32cfe7a5da41360a66820a056b71ce8b9a10bc60 27-Jul-2012 Tor Norbye <tnorbye@google.com> Add support for theme selection in new projects

The project templates now contain a variable for controlling the
initial theme used with the project. This changeset adds support for
this in the New Project wizard, since it has custom UI code rather
than being data driven like most of the templates. In particular, it
conditionally adds the theme selector if it's available in the
template, and it handles validation based on the build target.
There's some code reorganization to be able to share UI code between
the New Template Page and the New Project Page.

Change-Id: I53e5602a0a983c4a1aea9ae7fc5cd1054ccd4e69
279445ad4561895db41309681de8dd1544d0ae22 26-Jul-2012 Tor Norbye <tnorbye@google.com> Add support for icon generators in templates

This CL adds an <icon> element to the template xml file which
allows the template to request the icon generator to be
chained to the wizard to generate icons instead of using
hardcoded ones. The variable ${copyIcons} will be set in the
template context if for some reason the icons were not
generated (for example, because the surrounding template
infrastructure does not support icon generation.)

Example:
<globals file="globals.xml.ftl" />
<execute file="recipe.xml.ftl" />
+ <icons
+ type="notification"
+ name="${activityToLayout(viewClass)}"
+ background="#ff00ff"
+ foreground="#ffff00"
+ shape="square"
+ trim="true"
+ padding="5"
+ />

This CL also removes some obsolete code from the
graphic generators and wizards, and changes the default
icon used by new projects from the white circle with a
blue shape to the default packaging icon (which you can
then further customize.)

Change-Id: Ia039bf511b9939d01e16265449c1ad6c930279c2
c58247bd46d86afe244d2d9dd9160da10e0db648 25-Jul-2012 Tor Norbye <tnorbye@google.com> Template support for minimum build target

This changeset adds a minBuildApi attribute to the <template>
element which can be used to require a minimum level of build
target (which can be higher than the template's required
minimum API). As with the minimum API, this can be specified
both on the root element, as well as on <option> elements.

Examples:
name="New Blank Activity"
+ minBuildApi="12"
description="Creates a new blank activity, with optional inner navigation.">
<parameter id="navType" ...>
<option id="tabs_pager" minApi="14">Tabs + Swipe</option>
+ <option id="pager_strip" minApi="14" minBuildApi="15">Swipe Views + Title Strip</option>
<option id="dropdown" minApi="14">Dropdown</option>

Change-Id: I9d5b426bf2d440103a57f2a99ba6713cd6e7afaa
6d1e4fdd6b2132b895aae80de3dba83c3960d43f 21-Jun-2012 Tor Norbye <tnorbye@google.com> Miscellaneous wizard fixes

* Add minSdk requirements on templates, and attempting to pick a
template with a higher minimum SDK than the one used by the current
project will result in a validation error message (and the Next
button is disabled).

Similarly, add a minSdk requirement on options, such as the
BlankActivity's navigation type. This is used to block all
navigation types except for "none", unless minSdkVersion >= 14.

* Add a buildApi property, which the templates use to only
conditionally write contents which requires a higher compilation
target. For example, the values-v11 and values-v14 folders
specifying Theme.Holo.Light and Theme.Holo.Light.DarkActionBar are
only written if the build target is at least 11 and 14 respectively.

* Fix some other minor issues which prevented the projects from
compiling with low minSdkVersions and low build targets.

* Replace the default simple activity's layout (which was just a
<TextView> with a center gravity, with a <RelativeLayout> containing
the <TextView> with center constraints

* Make the code which combines the list of templates from extras/ and
tools/ smarter; instead of just concatenating the two lists, it now
compares them, and when they have the same names (same templates,
different versions), it now chooses which one to use based on the
template revision number in the metadata file.

Moved some code out of TemplateHandler and into a new TemplateManager
class, such that I could add metadata caching (since the code to merge
templates in multiple files would repeatedly read and parse the
metadata for each pair comparison.)

Change-Id: I94fc4f754dd7125b5be5c78e61efcfc268f73af5
dd0a8b2ec052e0cc670cb8738b0f6ed7b292f122 14-Jun-2012 Tor Norbye <tnorbye@google.com> Dependency support for the templates

Change-Id: Id6b0e5f65fc3a50b352423623332c47f7ab5085d
7f10682cf646bcb3e761fbb6bcb2f645bd748c03 14-Jun-2012 Tor Norbye <tnorbye@google.com> Add format handling to the template wizards

This changeset adds a format attribute to the templates. When the ADT
plugin reads a template file, and the format version is a higher
number than one it knows about, it rejects the templates and informs
the user to upgrade the plugin. This allows us to change the format of
the templates incompatibly in the future without worrying about users
with older versions of the plugin running into problems (because they
upgraded the tools but not ADT).

It also adds a revision number to each template which is used for the
opposite purpose: we can tell if a template is a slightly older
revision and then do some conditional handling.

Change-Id: If6c49012a1beca44c3a05b3e880ffde70294a57e
fd54b68d77bc90d5c607517c27bd7a30a2a8a57a 25-May-2012 Tor Norbye <tnorbye@google.com> Support selector syntax for thumbnails in templates

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