diff options
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java')
-rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/BaseViewRule.java | 11 |
1 files changed, 11 insertions, 0 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 3fe90d2..a53859d 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 @@ -482,6 +482,17 @@ public class BaseViewRule extends AbstractViewRule { actions.add(properties); } + @Override + @Nullable + public String getDefaultActionId(@NonNull final INode selectedNode) { + IAttributeInfo textAttribute = selectedNode.getAttributeInfo(ANDROID_URI, ATTR_TEXT); + if (textAttribute != null) { + return PROP_PREFIX + ATTR_TEXT; + } + + return null; + } + private static String getPropertyMapKey(INode node) { // Compute the key for mAttributesMap. This depends on the type of this // node and its parent in the view hierarchy. |