OSDN Git Service

Allow blank strings for the text property input
authorTor Norbye <tnorbye@google.com>
Sat, 8 Jan 2011 05:59:18 +0000 (21:59 -0800)
committerTor Norbye <tnorbye@google.com>
Sat, 8 Jan 2011 05:59:18 +0000 (21:59 -0800)
commit1d217ac076cd488917659b8e4e953dbd205b7fdd
treed662b178681305f7abcdddfd2051e864c54d0d7c
parentfa623a8a182baf168ac6817c8d0fd4591920273b
Allow blank strings for the text property input

The input-dialog for setting the text property was requiring the
string to be non-empty, or it would reject the input. That's not right
- it should be possible to set the text to blank (which is common for
text fields for example), since blank will clear the attribute.

This code was just cut & pasted from the similar code for inputting
id's where the id -should- be nonempty.

The code was also not handling the case where the user cancels the
dialog for custom string properties; we need a null check.

Change-Id: I31a2ae07b99ebc59d15b76f68c514d97294a736b
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java