public void setElementDetails(
String elementName, String id,
Styles styles)
throws BuilderException {
AbstractModelElement modelElement = getCurrentModelElement();
if (modelElement != null) {
ConcreteElementDetails elementDetails =
(ConcreteElementDetails) modelElement.getElementDetails();
if (elementDetails == null) {
// Handle those cases where the element detas are optional
elementDetails = new ConcreteElementDetails();
modelElement.setElementDetails(elementDetails);
}
try {
elementDetails.setElementName(elementName);
elementDetails.setId(id);