OSDN Git Service

XML code completion improvements
authorTor Norbye <tnorbye@google.com>
Thu, 10 Mar 2011 20:16:22 +0000 (12:16 -0800)
committerTor Norbye <tnorbye@google.com>
Sat, 12 Mar 2011 01:20:37 +0000 (17:20 -0800)
commit87269bec9ec19e7308d2dc958235228dbd52827b
tree99660fe2bd20bfb6e29d2e6ffebc4dcca83ebc6d
parentd677414784d91761be1ddc5c994a0996240cea6b
XML code completion improvements

First, fix code completion for @android: resources such that if you
type @android: the various resource types (@android:drawable/,
@android:layout/, etc) are offered.

Second, fix completion for the @android: token itself such that if you
type "@a" then "@android:" is offered as a completion.

Finally, make resource name completion work even for attributes that
aren't marked in the metadata as allowing resource references.  This
will not be done for empty completion context, but if the user
-explicitly- types a "@" in the value field, then resource completion
will work. This is necessary for some attributes where our metadata is
wrong, such as android:minHeight, where code completion currently
refuses to complete a @dimen/ completion prefix.

Change-Id: I175c8f7230d56987b9a945a2b791a2eb3e018a7c
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/AndroidContentAssist.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/uimodel/UiElementNode.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/uimodel/UiResourceAttributeNode.java
eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/manifest/model/UiElementNodeTest.java