public UpdateContentModelCommand(String label, XSDModelGroup xsdModelGroup, XSDCompositor xsdCompositor) { super(label); this.xsdModelGroup = xsdModelGroup; this.newXSDCompositor = xsdCompositor; this.oldXSDCompositor = xsdModelGroup.getCompositor(); }
public Image getImage() { XSDModelGroup xsdModelGroup = getXSDModelGroup(); if (XSDCompositor.CHOICE_LITERAL == xsdModelGroup.getCompositor()) { return ModelGroupFigure.CHOICE_ICON_IMAGE; } else if (XSDCompositor.ALL_LITERAL == xsdModelGroup.getCompositor()) { return ModelGroupFigure.ALL_ICON_IMAGE; } else { return ModelGroupFigure.SEQUENCE_ICON_IMAGE; } }
@Override public String getText(Object object) { XSDModelGroup xsdModelGroup = ((XSDModelGroup)object); return xsdModelGroup.getCompositor().getName(); }
/** * This returns XSDModelGroup.gif. */ @Override public Object getImage(Object object) { XSDModelGroup xsdModelGroup = ((XSDModelGroup)object); if (XSDCompositor.CHOICE_LITERAL == xsdModelGroup.getCompositor()) { return XSDEditPlugin.INSTANCE.getImage("full/obj16/XSDModelGroupChoice"); } else if (XSDCompositor.ALL_LITERAL == xsdModelGroup.getCompositor()) { return XSDEditPlugin.INSTANCE.getImage("full/obj16/XSDModelGroupAll"); } else { return XSDEditPlugin.INSTANCE.getImage("full/obj16/XSDModelGroupSequence"); } }
String name = xsdModelGroup.getCompositor().getName(); if (name != null)
switch (xsdModelGroup.getCompositor().getValue())
switch (xsdModelGroup.getCompositor().getValue())
if (xsdModelGroup.getCompositor() == XSDCompositor.CHOICE_LITERAL)
switch (xsdModelGroup.getCompositor().getValue())
switch (xsdModelGroup.getCompositor().getValue())
if (xsdModelGroup.getCompositor() == XSDCompositor.CHOICE_LITERAL)
if (mg.getCompositor() != XSDCompositor.ALL_LITERAL)
public void refresh() { super.refresh(); if (isReadOnly) { composite.setEnabled(false); } else { composite.setEnabled(true); } setListenerEnabled(false); if (input != null) { if (input instanceof XSDModelGroup) { XSDModelGroup particle = (XSDModelGroup)input; String modelType = particle.getCompositor().getName(); modelGroupCombo.setText(modelType); minCombo.setEnabled(!(particle.eContainer() instanceof XSDModelGroupDefinition)); maxCombo.setEnabled(!(particle.eContainer() instanceof XSDModelGroupDefinition)); } } refreshMinMax(); setListenerEnabled(true); }
switch (xsdModelGroup.getCompositor().getValue())
switch (xsdModelGroup.getCompositor().getValue())
qualifier = ((XSDModelGroup) child).getCompositor().getName();
switch (getXSDModelGroup().getCompositor().getValue())