entity1 = EOModelUtils.getRelatedEntity(selectedObjects[0]);
entity2 = EOModelUtils.getRelatedEntity(selectedObjects[1]);
}
}
if (entity1 != null && entity2 != null) {
CreateRelationshipDialog dialog = new CreateRelationshipDialog(getWindow().getShell(), entity1.getModel().getModelGroup(), entity1, entity2);
dialog.open();
} else if (entity1 != null) {
CreateRelationshipDialog dialog = new CreateRelationshipDialog(getWindow().getShell(), entity1.getModel().getModelGroup(), entity1, null);
dialog.open();
// entity1.addBlankRelationship(Messages.getString("EORelationship.newName"));
} else {
MessageDialog.openError(getWindow().getShell(), Messages.getString("EORelationship.noEntitySelectedTitle"), Messages.getString("EORelationship.noEntitySelectedMessage"));//$NON-NLS-1$
}
}