aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-10-05 14:24:05 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-05 14:24:05 -0700
commit363294ec9f336c735e26a7f83350562f659de98e (patch)
tree591c01223895201703f3dcc6a88dd3892bccb904 /eclipse
parent1d166d664ed87ac37bebbbe3ce6f491ecbd3eb74 (diff)
parent84fdbc0ae6a029da53f27c4a9ae9bcc1142f0b75 (diff)
downloadsdk-363294ec9f336c735e26a7f83350562f659de98e.zip
sdk-363294ec9f336c735e26a7f83350562f659de98e.tar.gz
sdk-363294ec9f336c735e26a7f83350562f659de98e.tar.bz2
Merge "20542: Contextual prop menu doesn't work well for textStyle"
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java
index daef677..abf47b8 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java
@@ -274,7 +274,20 @@ public class BaseViewRule implements IViewRule {
} else {
newValues.remove(valueId);
}
- values = join('|', newValues);
+
+ List<String> sorted = new ArrayList<String>(newValues);
+ Collections.sort(sorted);
+ values = join('|', sorted);
+
+ // Special case
+ if (valueId.equals("normal")) { //$NON-NLS-1$
+ // For textStyle for example, if you have "bold|italic"
+ // and you select the "normal" property, this should
+ // not behave in the normal flag way and "or" itself in;
+ // it should replace the other two.
+ // This also applies to imeOptions.
+ values = valueId;
+ }
}
n.setAttribute(uri, actionId, values);
} else if (prop.isEnum()) {