本文整理了Java中org.eclipse.xsd.XSDModelGroup.getContainer()
方法的一些代码示例,展示了XSDModelGroup.getContainer()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSDModelGroup.getContainer()
方法的具体详情如下:
包路径:org.eclipse.xsd.XSDModelGroup
类名称:XSDModelGroup
方法名:getContainer
暂无
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public Object getParent(Object object)
{
XSDModelGroup element = (XSDModelGroup) object;
return element.getContainer();
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public XSDParticle getXSDParticle()
{
Object o = getXSDModelGroup().getContainer();
return (o instanceof XSDParticle) ? (XSDParticle) o : null;
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
if (hasMinOccurs)
int min = ((XSDParticle) xsdModelGroup.getContainer()).getMinOccurs();
if (min == XSDParticle.UNBOUNDED)
int min = ((XSDParticle) xsdModelGroup.getContainer()).getMinOccurs();
result.append(String.valueOf(min));
int max = ((XSDParticle) xsdModelGroup.getContainer()).getMaxOccurs();
result.append(".."); //$NON-NLS-1$
if (max == XSDParticle.UNBOUNDED)
int max = ((XSDParticle) xsdModelGroup.getContainer()).getMaxOccurs();
result.append(String.valueOf(max));
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public void undo()
{
super.undo();
if (parent instanceof XSDModelGroup)
{
XSDModelGroup model = (XSDModelGroup) parent;
model.getContents().remove(newModelGroup.getContainer());
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
protected XSDParticle createXSDElementDeclaration()
{
XSDSimpleTypeDefinition type = xsdModelGroup.getSchema().getSchemaForSchema().resolveSimpleTypeDefinition("string"); //$NON-NLS-1$
XSDElementDeclaration element = XSDFactory.eINSTANCE.createXSDElementDeclaration();
XSDConcreteComponent comp = xsdModelGroup.getContainer();
ArrayList usedAttributeNames = new ArrayList();
usedAttributeNames.addAll(XSDCommonUIUtils.getChildElements(xsdModelGroup));
while (comp != null)
{
if (comp instanceof XSDModelGroupDefinition)
{
usedAttributeNames.addAll(XSDCommonUIUtils.getAllAttributes((XSDModelGroupDefinition)comp));
break;
}
else if (comp instanceof XSDComplexTypeDefinition)
{
usedAttributeNames.addAll(XSDCommonUIUtils.getAllAttributes((XSDComplexTypeDefinition)comp));
usedAttributeNames.addAll(XSDCommonUIUtils.getInheritedAttributes((XSDComplexTypeDefinition)comp));
break;
}
comp = comp.getContainer();
}
element.setName(XSDCommonUIUtils.createUniqueElementName(
nameToAdd == null ? "NewElement" : nameToAdd , usedAttributeNames)); //$NON-NLS-1$
element.setTypeDefinition(type);
XSDParticle particle = XSDFactory.eINSTANCE.createXSDParticle();
particle.setContent(element);
addedXSDConcreteComponent = element;
return particle;
}
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
List<XSDParticle> particles = xsdModelGroup.getParticles();
if (particles.size() == 0 ||
xsdModelGroup.getContainer() instanceof XSDModelGroupDefinition &&
((XSDModelGroupDefinition)xsdModelGroup.getContainer()).isCircular())
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
((XSDModelGroup) parent).getContents().add(newModelGroup.getContainer());
newModelGroup = createModelGroup();
XSDModelGroup newParent = (XSDModelGroup)particle.getContent();
newParent.getContents().add(newModelGroup.getContainer());
代码示例来源:origin: org.eclipse.emf/org.eclipse.xsd.edit
/**
* This handles notification by calling {@link #fireNotifyChanged fireNotifyChanged}.
*/
@Override
public void notifyChanged(Notification msg)
{
XSDModelGroup xsdModelGroup = (XSDModelGroup)msg.getNotifier();
if (msg.getFeature() == xsdPackage.getXSDModelGroup_Compositor() ||
msg.getFeature() == xsdPackage.getXSDModelGroup_Contents() ||
msg.getFeature() == xsdPackage.getXSDModelGroup_Annotation())
{
fireNotifyChanged(msg);
XSDConcreteComponent container = xsdModelGroup.getContainer();
if (container instanceof XSDParticle)
{
((ItemProviderAdapter)adapterFactory.adapt(container, IItemLabelProvider.class)).fireNotifyChanged
(new ENotificationImpl
((InternalEObject)container,
msg.getEventType(),
(EStructuralFeature)msg.getFeature(),
msg.getOldValue(),
msg.getNewValue(),
msg.getPosition()));
}
return;
}
super.notifyChanged(msg);
}
代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd
if (name == null)
if (xsdModelGroup.getContainer() instanceof XSDModelGroupDefinition)
XSDModelGroupDefinition xsdModelGroupDefinition = (XSDModelGroupDefinition)xsdModelGroup.getContainer();
name = getEcoreAttribute(xsdModelGroupDefinition, "name");
if (name == null)
代码示例来源:origin: org.eclipse/org.eclipse.xsd
if (name == null)
if (xsdModelGroup.getContainer() instanceof XSDModelGroupDefinition)
XSDModelGroupDefinition xsdModelGroupDefinition = (XSDModelGroupDefinition)xsdModelGroup.getContainer();
name = getEcoreAttribute(xsdModelGroupDefinition, "name");
if (name == null)
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
XSDConcreteComponent component = modelGroup.getContainer();
XSDComplexTypeDefinition ct = null;
while (component != null)
内容来源于网络,如有侵权,请联系作者删除!