FileDocCategorySizeDatePackage
ReferenceAttributeDescriptor.javaAPI DocAndroid 1.5 API3528Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.descriptors

ReferenceAttributeDescriptor

public final class ReferenceAttributeDescriptor extends TextAttributeDescriptor
Describes an XML attribute displayed containing a value or a reference to a resource. It is displayed by a {@link UiResourceAttributeNode}.

Fields Summary
private com.android.ide.eclipse.common.resources.ResourceType
mResourceType
Constructors Summary
public ReferenceAttributeDescriptor(String xmlLocalName, String uiName, String nsUri, String tooltip)
Creates a reference attributes that can contain any type of resources.

param
xmlLocalName The XML name of the attribute (case sensitive)
param
uiName The UI name of the attribute. Cannot be an empty string and cannot be null.
param
nsUri The URI of the attribute. Can be null if attribute has no namespace. See {@link SdkConstants#NS_RESOURCES} for a common value.
param
tooltip A non-empty tooltip string or null

        super(xmlLocalName, uiName, nsUri, tooltip);
    
public ReferenceAttributeDescriptor(com.android.ide.eclipse.common.resources.ResourceType resourceType, String xmlLocalName, String uiName, String nsUri, String tooltip)
Creates a reference attributes that can contain a reference to a specific {@link ResourceType}.

param
resourceType The specific {@link ResourceType} that this reference attribute supports. It can be null, in which case, all resource types are supported.
param
xmlLocalName The XML name of the attribute (case sensitive)
param
uiName The UI name of the attribute. Cannot be an empty string and cannot be null.
param
nsUri The URI of the attribute. Can be null if attribute has no namespace. See {@link SdkConstants#NS_RESOURCES} for a common value.
param
tooltip A non-empty tooltip string or null

        super(xmlLocalName, uiName, nsUri, tooltip);
        mResourceType = resourceType;
    
Methods Summary
public org.eclipse.jface.viewers.CellEditorcreatePropertyEditor(org.eclipse.swt.widgets.Composite parent)

        return new ResourceValueCellEditor(parent);
    
public com.android.ide.eclipse.editors.uimodel.UiAttributeNodecreateUiNode(com.android.ide.eclipse.editors.uimodel.UiElementNode uiParent)

return
A new {@link UiResourceAttributeNode} linked to this reference descriptor.

        return new UiResourceAttributeNode(mResourceType, this, uiParent);