use of org.eclipse.wst.xsd.ui.internal.adt.facade.IStructure 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;
}
Aggregations