if (myEditor != null) { EOModel model = myEditor.getModel(); if (model != null) { EOEntity newEntity = model.addBlankEntity(Messages.getString("EOEntity.newName")); myEditor.setSelection(new StructuredSelection(newEntity)); }
if (myModel != null) { EOEntity newEntity = myModel.addBlankEntity(Messages.getString("EOEntity.newName")); } else { MessageDialog.openError(myWindow.getShell(), Messages.getString("EOEntity.noModelSelectedTitle"), Messages.getString("EOEntity.noModelSelectedMessage"));
  public void run(IAction _action) {    try {      if (myEditor != null) {        EOModel model = myEditor.getModel();        if (model != null) {          EOEntity newEntity = model.addBlankEntity(Messages.getString("EOEntity.newName")); //$NON-NLS-1$          myEditor.setSelection(new StructuredSelection(newEntity));        }      }    }    catch (DuplicateEntityNameException e) {      // TODO Auto-generated catch block      e.printStackTrace();    }  }