aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-06-11 18:23:43 -0700
committerTor Norbye <tnorbye@google.com>2012-06-11 18:23:43 -0700
commit752526df0fc98bade0f7aac3a1836d5a056c0913 (patch)
tree420ba016d1b067174e5c4b0612dabf728256da0d /eclipse
parent2c407fd37c0dac821de7015a43a6f39f30ec4315 (diff)
downloadsdk-752526df0fc98bade0f7aac3a1836d5a056c0913.zip
sdk-752526df0fc98bade0f7aac3a1836d5a056c0913.tar.gz
sdk-752526df0fc98bade0f7aac3a1836d5a056c0913.tar.bz2
Fix bug in theme menu: don't strip style prefix from manifest
Change-Id: I32c1f47b7e6e7c1d91d7e3000075046d2c872ad9
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/SelectThemeAction.java4
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ThemeMenuAction.java1
2 files changed, 4 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/SelectThemeAction.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/SelectThemeAction.java
index b8ba48e..8d92d3c 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/SelectThemeAction.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/SelectThemeAction.java
@@ -16,6 +16,9 @@
package com.android.ide.eclipse.adt.internal.editors.layout.configuration;
+import static com.android.ide.common.resources.ResourceResolver.PREFIX_ANDROID_STYLE;
+import static com.android.ide.common.resources.ResourceResolver.PREFIX_STYLE;
+
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
@@ -30,6 +33,7 @@ class SelectThemeAction extends Action {
public SelectThemeAction(ConfigurationComposite configuration, String title, String theme,
boolean selected) {
super(title, IAction.AS_RADIO_BUTTON);
+ assert theme.startsWith(PREFIX_STYLE) || theme.startsWith(PREFIX_ANDROID_STYLE) : theme;
mConfiguration = configuration;
mTheme = theme;
if (selected) {
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 7e7d65b..0836709 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
@@ -199,7 +199,6 @@ class ThemeMenuAction extends SubmenuAction {
String current = mConfiguration.getSelectedTheme();
for (String theme : sorted) {
boolean selected = theme.equals(current);
- theme = ResourceHelper.styleToTheme(theme);
addMenuItem(menu, theme, selected);
}
} else {