Search in sources :

Example 6 with IComplexType

use of org.eclipse.wst.xsd.ui.internal.adt.facade.IComplexType in project webtools.sourceediting by eclipse.

the class RootContentEditPart method getSelectedComplexType.

public IComplexType getSelectedComplexType() {
    IComplexType result = null;
    IModel model = (IModel) getModel();
    List types = model.getTypes();
    if (types.size() > 0) {
        if (types.get(0) instanceof IComplexType)
            result = (IComplexType) types.get(0);
    }
    return result;
}
Also used : IModel(org.eclipse.wst.xsd.ui.internal.adt.facade.IModel) ArrayList(java.util.ArrayList) List(java.util.List) IComplexType(org.eclipse.wst.xsd.ui.internal.adt.facade.IComplexType)

Aggregations

IComplexType (org.eclipse.wst.xsd.ui.internal.adt.facade.IComplexType)6 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Iterator (java.util.Iterator)1 Label (org.eclipse.draw2d.Label)1 ManhattanConnectionRouter (org.eclipse.draw2d.ManhattanConnectionRouter)1 Adapter (org.eclipse.emf.common.notify.Adapter)1 Command (org.eclipse.gef.commands.Command)1 AbstractGraphicalEditPart (org.eclipse.gef.editparts.AbstractGraphicalEditPart)1 Font (org.eclipse.swt.graphics.Font)1 XSDComplexTypeDefinitionAdapter (org.eclipse.wst.xsd.ui.internal.adapters.XSDComplexTypeDefinitionAdapter)1 XSDModelGroupDefinitionAdapter (org.eclipse.wst.xsd.ui.internal.adapters.XSDModelGroupDefinitionAdapter)1 Annotation (org.eclipse.wst.xsd.ui.internal.adt.design.editparts.model.Annotation)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 BaseCommand (org.eclipse.wst.xsd.ui.internal.common.commands.BaseCommand)1 XSDComplexTypeDefinition (org.eclipse.xsd.XSDComplexTypeDefinition)1 XSDConcreteComponent (org.eclipse.xsd.XSDConcreteComponent)1