FileDocCategorySizeDatePackage
UiElementTreeEditPartFactory.javaAPI DocAndroid 1.5 API1814Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.layout.parts

UiElementTreeEditPartFactory

public class UiElementTreeEditPartFactory extends Object implements org.eclipse.gef.EditPartFactory
{@link EditPartFactory} to create {@link AbstractTreeEditPart} for {@link UiElementNode} objects. These objects are used in the {@link IContentOutlinePage} linked to the layout editor.

Fields Summary
Constructors Summary
Methods Summary
public org.eclipse.gef.EditPartcreateEditPart(org.eclipse.gef.EditPart context, java.lang.Object model)

        if (model instanceof UiDocumentNode) {
            return new UiDocumentTreeEditPart((UiDocumentNode) model);
        } else if (model instanceof UiElementNode) {
            UiElementNode node = (UiElementNode) model;
            if (node.getDescriptor().hasChildren()) {
                return new UiLayoutTreeEditPart(node);
            } else {
                return new UiViewTreeEditPart(node);
            }
        }
        return null;