Index: /trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java	(revision 1000)
+++ /trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java	(revision 1001)
@@ -18,4 +18,5 @@
 import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.corrector.ReverseWayTagCorrector;
+import org.openstreetmap.josm.corrector.UserCancelException;
 import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Relation;
@@ -65,10 +66,15 @@
 			Collections.reverse(wnew.nodes);
 			if (Main.pref.getBoolean("tag-correction.reverse-way", true)) {
-				final Collection<ChangePropertyCommand> changePropertyCommands = reverseWayTagCorrector
-				        .execute(wnew);
-				propertiesUpdated = propertiesUpdated
-				        || (changePropertyCommands != null && !changePropertyCommands
-				                .isEmpty());
-				c.addAll(changePropertyCommands);
+				try
+				{
+					final Collection<Command> changePropertyCommands = reverseWayTagCorrector.execute(wnew);
+					propertiesUpdated = propertiesUpdated
+				        || (changePropertyCommands != null && !changePropertyCommands.isEmpty());
+					c.addAll(changePropertyCommands);
+				}
+				catch(UserCancelException ex)
+				{
+					return;
+				}
 			}
 			c.add(new ChangeCommand(w, wnew));
Index: /trunk/src/org/openstreetmap/josm/corrector/Correction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/Correction.java	(revision 1001)
+++ /trunk/src/org/openstreetmap/josm/corrector/Correction.java	(revision 1001)
@@ -0,0 +1,6 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.corrector;
+
+public interface Correction {
+
+}
Index: /trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java	(revision 1001)
+++ /trunk/src/org/openstreetmap/josm/corrector/CorrectionTable.java	(revision 1001)
@@ -0,0 +1,62 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.corrector;
+
+import java.awt.Component;
+import java.awt.Dimension;
+import java.awt.Font;
+
+import javax.swing.JLabel;
+import javax.swing.JTable;
+import javax.swing.table.TableCellRenderer;
+
+public abstract class CorrectionTable<TM extends CorrectionTableModel<?>>
+        extends JTable {
+
+	private static final int MAX_VISIBLE_LINES = 10;
+
+    public static class BoldRenderer extends JLabel implements
+	        TableCellRenderer {
+
+		public Component getTableCellRendererComponent(JTable table,
+		        Object value, boolean isSelected, boolean hasFocus, int row,
+		        int column) {
+
+			Font f = getFont();
+			setFont(new Font(f.getName(), f.getStyle() | Font.BOLD, f.getSize()));
+
+			setText((String)value);
+
+			return this;
+		}
+	}
+
+	private static BoldRenderer boldRenderer = null;
+
+	protected CorrectionTable(TM correctionTableModel) {
+		super(correctionTableModel);
+
+		final int correctionsSize = correctionTableModel.getCorrections().size();
+		final int lines = correctionsSize > MAX_VISIBLE_LINES ? MAX_VISIBLE_LINES
+                : correctionsSize;
+		setPreferredScrollableViewportSize(new Dimension(400, lines
+		        * getRowHeight()));
+		getColumnModel().getColumn(correctionTableModel.getApplyColumn())
+                .setPreferredWidth(40);
+		setRowSelectionAllowed(false);
+	}
+
+	public TableCellRenderer getCellRenderer(int row, int column) {
+		if (getCorrectionTableModel().isBoldCell(row, column)) {
+			if (boldRenderer == null)
+				boldRenderer = new BoldRenderer();
+			return boldRenderer;
+		}
+		return super.getCellRenderer(row, column);
+	}
+
+	@SuppressWarnings("unchecked")
+    public TM getCorrectionTableModel() {
+		return (TM)getModel();
+	}
+
+}
Index: /trunk/src/org/openstreetmap/josm/corrector/CorrectionTableModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/CorrectionTableModel.java	(revision 1001)
+++ /trunk/src/org/openstreetmap/josm/corrector/CorrectionTableModel.java	(revision 1001)
@@ -0,0 +1,80 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.corrector;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.swing.table.AbstractTableModel;
+
+public abstract class CorrectionTableModel<C extends Correction> extends
+        AbstractTableModel {
+
+	private List<C> corrections;
+	private boolean[] apply;
+	private int applyColumn;
+
+	public CorrectionTableModel(List<C> corrections) {
+		super();
+		this.corrections = corrections;
+		apply = new boolean[this.corrections.size()];
+		Arrays.fill(apply, true);
+		applyColumn = getColumnCount() - 1; 
+	}
+
+	abstract public int getColumnCount();
+
+	abstract protected boolean isBoldCell(int row, int column);
+	abstract public String getCorrectionColumnName(int colIndex);
+	abstract public Object getCorrectionValueAt(int rowIndex, int colIndex);
+
+	public List<C> getCorrections() {
+		return corrections;
+	}
+	
+	public int getApplyColumn() {
+		return applyColumn;
+	}
+	
+    public boolean getApply(int i) {
+    	return apply[i];
+    }
+
+	public int getRowCount() {
+    	return corrections.size();
+    }
+
+	@Override
+    public Class<?> getColumnClass(int columnIndex) {
+    	if (columnIndex == applyColumn)
+    		return Boolean.class;
+    	return String.class;
+    }
+
+	@Override
+	public String getColumnName(int columnIndex) {
+    	if (columnIndex == applyColumn)
+    		return tr("Apply?");
+		
+		return getCorrectionColumnName(columnIndex);
+	}
+
+	@Override
+    public boolean isCellEditable(int rowIndex, int columnIndex) {
+    	return columnIndex == applyColumn;
+    }
+
+	@Override
+    public void setValueAt(Object aValue, int rowIndex, int columnIndex) {
+    	if (columnIndex == applyColumn && aValue instanceof Boolean)
+    		apply[rowIndex] = (Boolean)aValue;
+    }
+
+    public Object getValueAt(int rowIndex, int colIndex) {
+    	if (colIndex == applyColumn)
+    		return apply[rowIndex];
+    	
+    	return getCorrectionValueAt(rowIndex, colIndex);
+	}
+}
Index: /trunk/src/org/openstreetmap/josm/corrector/RoleCorrection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/RoleCorrection.java	(revision 1001)
+++ /trunk/src/org/openstreetmap/josm/corrector/RoleCorrection.java	(revision 1001)
@@ -0,0 +1,19 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.corrector;
+
+import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.RelationMember;
+
+public class RoleCorrection implements Correction {
+
+    public final Relation relation;
+    public final RelationMember member;
+    public final String newRole;
+
+    public RoleCorrection(Relation relation, RelationMember member,
+            String newRole) {
+        this.relation = relation;
+        this.member = member;
+        this.newRole = newRole;
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/corrector/RoleCorrectionTable.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/RoleCorrectionTable.java	(revision 1001)
+++ /trunk/src/org/openstreetmap/josm/corrector/RoleCorrectionTable.java	(revision 1001)
@@ -0,0 +1,13 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.corrector;
+
+import java.util.List;
+
+public class RoleCorrectionTable extends
+        CorrectionTable<RoleCorrectionTableModel> {
+
+    public RoleCorrectionTable(List<RoleCorrection> roleCorrections) {
+        super(new RoleCorrectionTableModel(roleCorrections));
+    }
+
+}
Index: /trunk/src/org/openstreetmap/josm/corrector/RoleCorrectionTableModel.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/RoleCorrectionTableModel.java	(revision 1001)
+++ /trunk/src/org/openstreetmap/josm/corrector/RoleCorrectionTableModel.java	(revision 1001)
@@ -0,0 +1,58 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.corrector;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.util.List;
+
+import org.openstreetmap.josm.data.osm.visitor.NameVisitor;
+
+public class RoleCorrectionTableModel extends
+        CorrectionTableModel<RoleCorrection> {
+
+    private static NameVisitor nameVisitor = new NameVisitor();
+
+    public RoleCorrectionTableModel(List<RoleCorrection> roleCorrections) {
+        super(roleCorrections);
+    }
+
+    @Override
+    public int getColumnCount() {
+        return 4;
+    }
+
+    @Override
+    public String getCorrectionColumnName(int colIndex) {
+        switch (colIndex) {
+        case 0:
+            return tr("Relation");
+        case 1:
+            return tr("Old role");
+        case 2:
+            return tr("New role");
+        }
+        return null;
+    }
+
+    @Override
+    public Object getCorrectionValueAt(int rowIndex, int colIndex) {
+        RoleCorrection roleCorrection = getCorrections().get(rowIndex);
+
+        switch (colIndex) {
+        case 0:
+            roleCorrection.relation.visit(nameVisitor);
+            return nameVisitor.name;
+        case 1:
+            return roleCorrection.member.role;
+        case 2:
+            return roleCorrection.newRole;
+        }
+        return null;
+    }
+
+    @Override
+    protected boolean isBoldCell(int row, int column) {
+        return column == 2;
+    }
+
+}
Index: /trunk/src/org/openstreetmap/josm/corrector/UserCancelException.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/corrector/UserCancelException.java	(revision 1001)
+++ /trunk/src/org/openstreetmap/josm/corrector/UserCancelException.java	(revision 1001)
@@ -0,0 +1,6 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.corrector;
+
+public class UserCancelException extends Exception {
+
+}
