public EObject createEMFObject(String nodeName, String readAheadName) { // attribute name is based on the name property DynamicAttribute attribute = FacesConfigFactory.eINSTANCE.createDynamicAttribute(); attribute.setName(nodeName); return attribute; }
public void setMOFValue(Notifier owner, Object value, int newIndex) { if (owner instanceof DynamicElement) { DynamicAttribute attribute = FacesConfigFactory.eINSTANCE.createDynamicAttribute(); attribute.setName(fDOMNames[0]); attribute.setValue(value.toString()); EList attributes = ((DynamicElement)owner).getAttributes(); if (newIndex < 0 || newIndex >= attributes.size()) { attributes.add(attribute); } else { attributes.set(newIndex, attribute); } } // otherwise do nothing }