diff options
author | Tor Norbye <tnorbye@google.com> | 2011-10-05 08:46:19 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2011-10-05 15:27:42 -0700 |
commit | 6e805fb2b209a2d346fa561ad02e8f67de70684a (patch) | |
tree | 54c354e5f872e4fdfd7a43a8cb313d75ea609791 | |
parent | 68ce843e28c93465c48db84de09821347cdc8f6a (diff) | |
download | sdk-6e805fb2b209a2d346fa561ad02e8f67de70684a.zip sdk-6e805fb2b209a2d346fa561ad02e8f67de70684a.tar.gz sdk-6e805fb2b209a2d346fa561ad02e8f67de70684a.tar.bz2 |
20542: Contextual prop menu doesn't work well for textStyle. DO NOT MERGE.
Change-Id: I6092924b63448b9700ebe5906fab87f11520e27f
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java | 15 |
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()) { |