aboutsummaryrefslogtreecommitdiff
path: root/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-05-07 16:55:46 -0700
committerTor Norbye <tnorbye@google.com>2012-05-22 14:28:50 -0700
commit7dd444ea0125e50a5e88604afb6de43e80b7c270 (patch)
tree67b64e9cb7209938c407c26b919e19206b799407 /eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java
parent180557283cc7b80d718c1d79a7cba380fc7cb11f (diff)
downloadsdk-7dd444ea0125e50a5e88604afb6de43e80b7c270.tar.gz
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
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java
index 194cb3f07..7e7d65b9c 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java
@@ -188,7 +188,7 @@ class ThemeMenuAction extends SubmenuAction {
}
}
- String manifestTheme = manifest.getmManifestTheme();
+ String manifestTheme = manifest.getManifestTheme();
if (activityThemes.size() > 0 || manifestTheme != null) {
Set<String> allThemes = new HashSet<String>(activityThemes.values());
if (manifestTheme != null) {