} else if (selectedObject instanceof IEOEntityRelative) {
entity = ((IEOEntityRelative) selectedObject).getEntity();
model = entity.getModel();
}
if (model != null) {
SubclassEntityDialog dialog = new SubclassEntityDialog(getWindow().getShell(), model, entity, model.getModelGroup().getEditingModel());
dialog.setBlockOnOpen(true);
int results = dialog.open();
if (results == Window.OK) {
String entityName = dialog.getEntityName();
if (entityName != null && entityName.trim().length() > 0) {
try {
EOEntity parentEntity = dialog.getParentEntity();
InheritanceType inheritanceType = dialog.getInheritanceType();
String restrictingQualifier = dialog.getRestrictingQualifier();
EOModel destinationModel = dialog.getDestinationModel();
SubclassOperation operation = new SubclassOperation(parentEntity, inheritanceType, destinationModel, entityName, restrictingQualifier);
operation.addContext(EOModelUtils.getUndoContext(model));
IOperationHistory operationHistory = PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();
operationHistory.execute(operation, null, null);
} catch (Throwable e) {