OSDN Git Service

Fix GestureOverlayView handling
authorTor Norbye <tnorbye@google.com>
Fri, 10 Jun 2011 18:29:58 +0000 (11:29 -0700)
committerTor Norbye <tnorbye@google.com>
Fri, 10 Jun 2011 18:46:00 +0000 (11:46 -0700)
commit4e9c7b5df119dda3acd516fcea2ff59c22a19565
treeb56be43eedf470236ccfd601a8cf1b466de1442b
parent3af5f887f6f096675759486ddabc0023aa5fac6c
Fix GestureOverlayView handling

This CL fixes a number of problems related to the GestureOverlayView.

The first big problem was that GestureOverlayView lives in the
android.gesture package, which is not one of the special builtin
packages you can omit when specifying the element in layout XML
files. This CL both stores a full path in the descriptor XML name,
which fixes tag-to-descriptor lookup (without this we were showing the
wrong icon and missing vital attributes in completion), and handles
scenarios where the full path has to be used.

The second problem was that the descriptor metadata listed
GestureOverlayView as a "view" rather than a "layout", which meant
that it was missing information about children (which meant you
couldn't drop into it), and it was missing layout params (which meant
children couldn't be assigned attributes like layout_width and
layout_height).

Also tweak selection handling for gesture views.

There are a number of places where we need to go from a class name to
a view descriptor; these are now centralized in a utility method and
sped up with a map lookup.

(Issues fixed: #17541, #17543)

Change-Id: I67c450f28eab07b3575e510420b7faf4410085e3
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/LayoutConstants.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/UiElementPullParser.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/descriptors/CustomViewDescriptorService.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/descriptors/LayoutDescriptors.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/descriptors/ViewElementDescriptor.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/CanvasViewInfo.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/VisualRefactoring.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/uimodel/UiViewElementNode.java
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/xml/Hyperlinks.java