private void addIdMap(Shell shell) {
   IdMap idmap = new IdMap(false);
   XMLCompareAddIdMapDialog dialog =
       new XMLCompareAddIdMapDialog(
           shell, idmap, fIdMaps, fIdMapsInternal, fIdExtensionToName, false);
   if (dialog.open() == Window.OK) {
     if (!fIdMaps.containsKey(idmap.getName())) {
       fIdMaps.put(idmap.getName(), new HashMap());
       if (!idmap.getExtension().equals("")) // $NON-NLS-1$
       fIdExtensionToName.put(idmap.getExtension(), idmap.getName());
       newIdMapsTableItem(idmap, true);
     }
   }
 }
 private void renameIdMap(Shell shell) {
   TableItem[] itemsIdMaps = fIdMapsTable.getSelection();
   if (itemsIdMaps.length > 0) {
     IdMap idmap = (IdMap) itemsIdMaps[0].getData();
     String old_name = idmap.getName();
     String old_extension = idmap.getExtension();
     HashMap idmapHS = (HashMap) fIdMaps.get(old_name);
     XMLCompareAddIdMapDialog dialog =
         new XMLCompareAddIdMapDialog(
             shell, idmap, fIdMaps, fIdMapsInternal, fIdExtensionToName, true);
     if (dialog.open() == Window.OK) {
       fIdMaps.remove(old_name);
       fIdExtensionToName.remove(old_extension);
       fIdMaps.put(idmap.getName(), idmapHS);
       if (!idmap.getExtension().equals("")) // $NON-NLS-1$
       fIdExtensionToName.put(idmap.getExtension(), idmap.getName());
       fIdMapsTable.remove(fIdMapsTable.indexOf(itemsIdMaps[0]));
       newIdMapsTableItem(idmap, true);
     }
   }
 }