Search in sources :

Example 1 with RootHolder

use of org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.RootHolder in project webtools.sourceediting by eclipse.

the class RootHolderEditPart method getModelChildren.

protected List getModelChildren() {
    List collections = new ArrayList();
    RootHolder holder = (RootHolder) getModel();
    IADTObject focusObject = holder.getModel();
    collections.add(new FocusTypeColumn(focusObject));
    collections.add(new ReferencedTypeColumn(focusObject));
    return collections;
}
Also used : IADTObject(org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject) ReferencedTypeColumn(org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.ReferencedTypeColumn) ArrayList(java.util.ArrayList) FocusTypeColumn(org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.FocusTypeColumn) List(java.util.List) ArrayList(java.util.ArrayList) RootHolder(org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.RootHolder)

Example 2 with RootHolder

use of org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.RootHolder in project webtools.sourceediting by eclipse.

the class RootContentEditPart method getModelChildren.

protected List getModelChildren() {
    collections = new ArrayList();
    if (getModel() != null) {
        Object obj = getModel();
        IADTObject focusObject = null;
        if (obj instanceof IStructure) {
            if (obj instanceof IGraphElement) {
                if (((IGraphElement) obj).isFocusAllowed())
                    focusObject = (IStructure) obj;
            }
        } else if (obj instanceof IField) {
            focusObject = (IField) obj;
        } else if (obj instanceof IModel) {
            focusObject = (IModel) obj;
            collections.add(focusObject);
            return collections;
        } else if (obj instanceof IType) {
            if (obj instanceof IGraphElement) {
                if (((IGraphElement) obj).isFocusAllowed()) {
                    focusObject = (IType) obj;
                }
            }
        } else if (obj instanceof IGraphElement) {
            if (((IGraphElement) obj).isFocusAllowed()) {
                focusObject = (IADTObject) obj;
                collections.add(focusObject);
                return collections;
            }
        }
        if (focusObject != null) {
            RootHolder holder = new RootHolder(focusObject);
            collections.add(holder);
            return collections;
        }
    }
    return collections;
}
Also used : IModel(org.eclipse.wst.xsd.ui.internal.adt.facade.IModel) IGraphElement(org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.IGraphElement) IADTObject(org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject) ArrayList(java.util.ArrayList) IADTObject(org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject) IStructure(org.eclipse.wst.xsd.ui.internal.adt.facade.IStructure) IField(org.eclipse.wst.xsd.ui.internal.adt.facade.IField) RootHolder(org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.RootHolder) IType(org.eclipse.wst.xsd.ui.internal.adt.facade.IType)

Aggregations

ArrayList (java.util.ArrayList)2 RootHolder (org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.RootHolder)2 IADTObject (org.eclipse.wst.xsd.ui.internal.adt.facade.IADTObject)2 List (java.util.List)1 FocusTypeColumn (org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.FocusTypeColumn)1 IGraphElement (org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.IGraphElement)1 ReferencedTypeColumn (org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.ReferencedTypeColumn)1 IField (org.eclipse.wst.xsd.ui.internal.adt.facade.IField)1 IModel (org.eclipse.wst.xsd.ui.internal.adt.facade.IModel)1 IStructure (org.eclipse.wst.xsd.ui.internal.adt.facade.IStructure)1 IType (org.eclipse.wst.xsd.ui.internal.adt.facade.IType)1