コード例 #1
0
 @Override
 public void doOnDelMenuAction(List<EntityTransformerMapping> objects) {
   if (objects != null && objects.size() > 0) {
     Integer[] ids = new Integer[objects.size()];
     int i = 0;
     for (EntityTransformerMapping etm : objects) {
       ids[i] = etm.getId();
       i++;
     }
     try {
       Activator.getDefault().deleteBusinessObjectsList(ids);
     } catch (java.rmi.ConnectException e) {
       Dialogs.openError(
           Activator.getDefault().getString(ENTITYMAPPER_DELETE_ERROR),
           Activator.getDefault().getString(UiPlugin.CHECK_SERVER),
           Activator.ID,
           e);
     } catch (RuntimeException e) {
       Dialogs.openError(
           Activator.getDefault().getString(ENTITYMAPPER_DELETE_ERROR),
           e.getLocalizedMessage(),
           Activator.ID,
           e);
     } catch (Exception e) {
       Dialogs.openError(
           UiPlugin.getDefault().getString(UiPlugin.UNKNOWN_EXCEPTION),
           UiPlugin.getDefault().getString(UiPlugin.UNKNOWN_EXCEPTION),
           UiPlugin.ID,
           e);
     }
     view.refresh();
   }
 }
コード例 #2
0
 /*
  * (non-Javadoc)
  *
  * @see com.mg.merp.wb.core.ui.support.StandartBrowserViewController#refreshView(java.lang.String)
  */
 @Override
 public void refreshView(String query) {
   try {
     EntityTransformerMapping[] etm = Activator.getDefault().synchronize(query);
     view.getTableViewer().setInput(etm);
     isSynchronized = true;
   } catch (Exception e) {
     isSynchronized = false;
     Dialogs.openError(
         Activator.getDefault().getString(GET_ENTITYMAPPER_FAIL),
         UiPlugin.getDefault().getString(UiPlugin.CHECK_SERVER),
         Activator.ID,
         e);
   }
 }