use of org.eclipse.xsd.XSDTerm in project tmdm-studio-se by Talend.
the class XSDAddComplexTypeElementAction method updateCompositorType.
private boolean updateCompositorType(XSDTypeDefinition superType, XSDModelGroup currentGroup) {
XSDParticle superTypeParticle = superType.getComplexType();
XSDTerm term = superTypeParticle.getTerm();
if (term instanceof XSDModelGroup) {
XSDModelGroup group = (XSDModelGroup) term;
if (group.getCompositor() == XSDCompositor.ALL_LITERAL || currentGroup.getCompositor() == XSDCompositor.ALL_LITERAL) {
if (MessageDialog.openConfirm(null, Messages._ChangeToSequenceType, Messages._ComplexTypeToSequence)) {
group.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
superTypeParticle.updateElement();
currentGroup.setCompositor(XSDCompositor.SEQUENCE_LITERAL);
currentGroup.updateElement();
return true;
}
return false;
}
}
return true;
}
Aggregations