return ((IAddContext) context).getNewObject();
} else if (context instanceof IPictogramElementContext) {
return BusinessObjectUtil.getFirstElementOfType(
(((IPictogramElementContext) context).getPictogramElement()), BaseElement.class);
} else if (context instanceof IReconnectionContext) {
IReconnectionContext rc = (IReconnectionContext)context;
return BusinessObjectUtil.getFirstElementOfType(rc.getConnection(), BaseElement.class);
}
return null;
}