@Override
 public void run() {
   WizardDialog wd = new WizardDialog(designer.getSite().getShell(), new BMFromDBWizard_2());
   if (Window.OK == wd.open() && selection != null) {
     addFields();
   }
 }
 private void addFields() {
   String pkName = null;
   if (primaryKeys != null && primaryKeys.getChildsNotNull().size() == 1) {
     pkName = ((CompositeMap) primaryKeys.getChilds().get(0)).getString("name");
   }
   if (pkName != null) {
     model.getPkRecord().setName(pkName);
   }
   @SuppressWarnings("unchecked")
   List<CompositeMap> list = selection.getChildsNotNull();
   for (CompositeMap m : list) {
     String column_name = m.getString("name");
     if (pkName != null && pkName.equalsIgnoreCase(column_name)) continue;
     Record r = model.getRecordByName(column_name);
     if (r == null) {
       r = DesignerUtil.createRecord(m);
       model.add(r);
     }
   }
   ((BMDesignPage) designer.getActivePageInstance()).refreshRecordViewer();
 }
 private IProject getAuroraProject() throws ResourceNotFoundException {
   IFile file = designer.getInputFile();
   IProject proj = file.getProject();
   AuroraMetaProject amp = new AuroraMetaProject(proj);
   return amp.getAuroraProject();
 }