if (myEditor != null && myEntity != null) { EOModel model = myEditor.getModel(); if (model != null) { EOAttribute newAttribute = myEntity.addBlankAttribute(Messages.getString("EOAttribute.newName")); myEditor.setSelection(new StructuredSelection(newAttribute)); }
if (myEntity != null) { EOAttribute newAttribute = myEntity.addBlankAttribute(Messages.getString("EOAttribute.newName")); } else { MessageDialog.openError(myWindow.getShell(), Messages.getString("EOAttribute.noEntitySelectedTitle"), Messages.getString("EOAttribute.noEntitySelectedMessage"));
  public void run(IAction _action) {    try {      if (myEditor != null && myEntity != null) {        EOModel model = myEditor.getModel();        if (model != null) {          EOAttribute newAttribute = myEntity.addBlankAttribute(Messages.getString("EOAttribute.newName")); //$NON-NLS-1$          myEditor.setSelection(new StructuredSelection(newAttribute));        }      }    }    catch (DuplicateAttributeNameException e) {      // TODO Auto-generated catch block      e.printStackTrace();    }  }