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