Index: trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 1867)
+++ trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 1868)
@@ -59,5 +59,5 @@
     }
 
-    public void actionPerformed(ActionEvent e) {
+    public void autoScale()  {
         if (Main.map != null) {
             BoundingXYVisitor bbox = getBoundingBox();
@@ -67,4 +67,8 @@
         }
         putValue("active", true);
+    }
+
+    public void actionPerformed(ActionEvent e) {
+        autoScale();
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 1867)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java	(revision 1868)
@@ -1,5 +1,4 @@
 package org.openstreetmap.josm.gui.dialogs;
 
-import static org.openstreetmap.josm.tools.I18n.marktr;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -7,16 +6,11 @@
 import java.awt.GridLayout;
 import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
 
 import javax.swing.AbstractAction;
 import javax.swing.DefaultListModel;
 import javax.swing.JList;
-import javax.swing.JOptionPane;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
@@ -26,18 +20,10 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.command.ChangeCommand;
-import org.openstreetmap.josm.command.Command;
-import org.openstreetmap.josm.command.DeleteCommand;
-import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Relation;
-import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil;
-import org.openstreetmap.josm.gui.OptionPaneUtil;
 import org.openstreetmap.josm.gui.OsmPrimitivRenderer;
 import org.openstreetmap.josm.gui.PrimitiveNameFormatter;
 import org.openstreetmap.josm.gui.SideButton;
-import org.openstreetmap.josm.gui.dialogs.relation.ParentRelationLoadingTask;
-import org.openstreetmap.josm.gui.dialogs.relation.RelationDialogManager;
 import org.openstreetmap.josm.gui.dialogs.relation.RelationEditor;
 import org.openstreetmap.josm.gui.layer.DataChangeListener;
@@ -45,10 +31,7 @@
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
 import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
-import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.ImageProvider;
 import org.openstreetmap.josm.tools.Shortcut;
-
-import com.sun.corba.se.spi.legacy.connection.GetEndPointInfoAgainException;
 
 /**
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 1867)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/GenericRelationEditor.java	(revision 1868)
@@ -327,5 +327,5 @@
         pnl.setLayout(new GridBagLayout());
         // setting up the member table
-        memberTable = new MemberTable(memberTableModel);
+        memberTable = new MemberTable(getLayer(),memberTableModel);
 
         memberTable.getSelectionModel().addListSelectionListener(new SelectionSynchronizer());
@@ -666,10 +666,10 @@
             );
             switch(ret) {
-            case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: return;
-            case JOptionPane.CLOSED_OPTION: return;
-            case JOptionPane.NO_OPTION: return;
-            case JOptionPane.YES_OPTION:
-                memberTableModel.removeMembersReferringTo(toCheck);
-                break;
+                case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION: return;
+                case JOptionPane.CLOSED_OPTION: return;
+                case JOptionPane.NO_OPTION: return;
+                case JOptionPane.YES_OPTION:
+                    memberTableModel.removeMembersReferringTo(toCheck);
+                    break;
             }
         }
@@ -704,9 +704,9 @@
             );
             switch(ret) {
-            case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION : return true;
-            case JOptionPane.YES_OPTION: return true;
-            case JOptionPane.NO_OPTION: return false;
-            case JOptionPane.CLOSED_OPTION: return false;
-            case JOptionPane.CANCEL_OPTION: throw new AddAbortException();
+                case ConditionalOptionPaneUtil.DIALOG_DISABLED_OPTION : return true;
+                case JOptionPane.YES_OPTION: return true;
+                case JOptionPane.NO_OPTION: return false;
+                case JOptionPane.CLOSED_OPTION: return false;
+                case JOptionPane.CANCEL_OPTION: throw new AddAbortException();
             }
             // should not happen
@@ -1079,7 +1079,7 @@
             );
             switch(ret) {
-            case JOptionPane.CANCEL_OPTION: return false;
-            case JOptionPane.YES_OPTION: return true;
-            case JOptionPane.NO_OPTION: return false;
+                case JOptionPane.CANCEL_OPTION: return false;
+                case JOptionPane.YES_OPTION: return true;
+                case JOptionPane.NO_OPTION: return false;
             }
             return false;
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java	(revision 1867)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/relation/MemberTable.java	(revision 1868)
@@ -2,17 +2,38 @@
 package org.openstreetmap.josm.gui.dialogs.relation;
 
-import java.awt.Dimension;
-import java.awt.Rectangle;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
 
 import javax.swing.AbstractAction;
 import javax.swing.JComponent;
+import javax.swing.JPopupMenu;
 import javax.swing.JTable;
 import javax.swing.KeyStroke;
 import javax.swing.ListSelectionModel;
+import javax.swing.event.ListSelectionEvent;
+import javax.swing.event.ListSelectionListener;
 import javax.swing.table.TableColumnModel;
 
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.AutoScaleAction;
+import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
 public class MemberTable extends JTable implements IMemberModelListener {
+
+    /**
+     * the data layer in whose context relation members are edited in this table
+     */
+    protected OsmDataLayer layer;
+
+    /** the popup menu */
+    protected JPopupMenu popupMenu;
 
     /**
@@ -22,8 +43,10 @@
      * @param columnModel
      */
-    public MemberTable(MemberTableModel model) {
+    public MemberTable(OsmDataLayer layer, MemberTableModel model) {
         super(model, new MemberTableColumnModel(), model.getSelectionModel());
+        this.layer = layer;
         model.addMemberModelListener(this);
         init();
+
     }
 
@@ -38,6 +61,6 @@
         // make ENTER behave like TAB
         //
-        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
-        .put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), "selectNextColumnCell");
+        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(
+                KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), "selectNextColumnCell");
 
         // install custom navigation actions
@@ -45,9 +68,11 @@
         getActionMap().put("selectNextColumnCell", new SelectNextColumnCellAction());
         getActionMap().put("selectPreviousColumnCell", new SelectPreviousColumnCellAction());
-    }
-
-    /**
-     * adjusts the width of the columns for the tag name and the tag value
-     * to the width of the scroll panes viewport.
+
+        addMouseListener(new PopupListener());
+    }
+
+    /**
+     * adjusts the width of the columns for the tag name and the tag value to the width of the
+     * scroll panes viewport.
      * 
      * Note: {@see #getPreferredScrollableViewportSize()} did not work as expected
@@ -71,22 +96,16 @@
 
     public void makeMemberVisible(int index) {
-        scrollRectToVisible(
-                getCellRect(index, 0, true)
-        );
-    }
-
-    /**
-     * Action to be run when the user navigates to the next cell in the table,
-     * for instance by pressing TAB or ENTER. The action alters the standard
-     * navigation path from cell to cell:
-     * <ul>
-     *   <li>it jumps over cells in the first column</li>
-     *   <li>it automatically add a new empty row when the user leaves the
-     *   last cell in the table</li>
-     * <ul>
-     *
-     *
-     */
-    class SelectNextColumnCellAction extends AbstractAction  {
+        scrollRectToVisible(getCellRect(index, 0, true));
+    }
+
+    /**
+     * Action to be run when the user navigates to the next cell in the table, for instance by
+     * pressing TAB or ENTER. The action alters the standard navigation path from cell to cell: <ul>
+     * <li>it jumps over cells in the first column</li> <li>it automatically add a new empty row
+     * when the user leaves the last cell in the table</li> <ul>
+     * 
+     * 
+     */
+    class SelectNextColumnCellAction extends AbstractAction {
         public void actionPerformed(ActionEvent e) {
             run();
@@ -102,6 +121,6 @@
             if (col == 0 && row < getRowCount() - 1) {
                 row++;
-            } else if (row < getRowCount()-1) {
-                col=0;
+            } else if (row < getRowCount() - 1) {
+                col = 0;
                 row++;
             }
@@ -110,11 +129,10 @@
     }
 
-
-    /**
-     * Action to be run when the user navigates to the previous cell in the table,
-     * for instance by pressing Shift-TAB
-     *
-     */
-    class SelectPreviousColumnCellAction extends AbstractAction  {
+    /**
+     * Action to be run when the user navigates to the previous cell in the table, for instance by
+     * pressing Shift-TAB
+     * 
+     */
+    class SelectPreviousColumnCellAction extends AbstractAction {
 
         public void actionPerformed(ActionEvent e) {
@@ -125,5 +143,4 @@
             }
 
-
             if (col == 0 && row == 0) {
                 // change nothing
@@ -135,3 +152,101 @@
         }
     }
+
+    /**
+     * creates the popup men
+     */
+    protected void createPopupMenu() {
+        popupMenu = new JPopupMenu();
+        ZoomToAction zoomToAction = new ZoomToAction();
+        Layer.listeners.add(zoomToAction);
+        getSelectionModel().addListSelectionListener(zoomToAction);
+        popupMenu.add(zoomToAction);
+    }
+
+    /**
+     * Replies the popup menu for this table
+     * 
+     * @return the popup menu
+     */
+    protected JPopupMenu getPopUpMenu() {
+        if (popupMenu == null) {
+            createPopupMenu();
+        }
+        return popupMenu;
+    }
+
+    class PopupListener extends MouseAdapter {
+        @Override
+        public void mousePressed(MouseEvent e) {
+            showPopup(e);
+        }
+
+        @Override
+        public void mouseReleased(MouseEvent e) {
+            showPopup(e);
+        }
+
+        private void showPopup(MouseEvent e) {
+            if (e.isPopupTrigger()) {
+                getPopUpMenu().show(e.getComponent(), e.getX(), e.getY());
+            }
+        }
+    }
+
+    class ZoomToAction extends AbstractAction implements LayerChangeListener, ListSelectionListener {
+        public ZoomToAction() {
+            putValue(NAME, tr("Zoom to"));
+            putValue(SHORT_DESCRIPTION, tr("Zoom to primitive the first selected member refers to"));
+            updateEnabledState();
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            if (! isEnabled())
+                return;
+            int rows[] = getSelectedRows();
+            if (rows == null || rows.length == 0)
+                return;
+            int row = rows[0];
+            OsmPrimitive primitive = getMemberTableModel().getReferredPrimitive(row);
+            layer.data.setSelected(primitive);
+            DataSet.fireSelectionChanged(layer.data.getSelected());
+            AutoScaleAction action = new AutoScaleAction("selection");
+            action.autoScale();
+        }
+
+        protected void updateEnabledState() {
+            if (Main.main == null || Main.main.getEditLayer() != layer) {
+                setEnabled(false);
+                putValue(SHORT_DESCRIPTION, tr("Zooming disabled because layer of this relation is not active"));
+                return;
+            }
+            if (getSelectedRowCount() == 0) {
+                setEnabled(false);
+                putValue(SHORT_DESCRIPTION, tr("Zooming disabled because there is no selected member"));
+                return;
+            }
+            setEnabled(true);
+            putValue(SHORT_DESCRIPTION, tr("Zoom to primitive the first selected member refers to"));
+        }
+
+        public void valueChanged(ListSelectionEvent e) {
+            updateEnabledState();
+        }
+
+        public void activeLayerChange(Layer oldLayer, Layer newLayer) {
+            updateEnabledState();
+        }
+
+        public void layerAdded(Layer newLayer) {
+            updateEnabledState();
+        }
+
+        public void layerRemoved(Layer oldLayer) {
+            updateEnabledState();
+        }
+    }
+
+    protected MemberTableModel getMemberTableModel() {
+        return (MemberTableModel) getModel();
+    }
 }
Index: trunk/src/org/openstreetmap/josm/io/OsmApi.java
===================================================================
--- trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 1867)
+++ trunk/src/org/openstreetmap/josm/io/OsmApi.java	(revision 1868)
@@ -24,4 +24,5 @@
 import java.util.Properties;
 
+import javax.swing.JPopupMenu;
 import javax.xml.parsers.SAXParserFactory;
 
@@ -502,3 +503,4 @@
         return capabilities;
     }
+
 }
