History log of /sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/TemplateTestPage.java
Revision Date Author Comments
5978cd057931af1e98ecc51d4bc29b79dc147da2 14-Jun-2012 Tor Norbye <tnorbye@google.com> Update templates

This changeset updates the activity templates with new versions
from Roman. Also fixes a couple of bugs he ran into: the
camel case to underscore conversion methods were reversed, and
the template test wizard didn't reset the activity template
once the second page was shown.

Change-Id: I353af646f92f37bf2a9827d0dc68a409dd9358bc
7dd444ea0125e50a5e88604afb6de43e80b7c270 08-May-2012 Tor Norbye <tnorbye@google.com> New Template Wizard support

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