Index: applications/editors/josm/plugins/turnrestrictions/data/test-cases.osm
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/data/test-cases.osm	(revision 20701)
+++ applications/editors/josm/plugins/turnrestrictions/data/test-cases.osm	(revision 20701)
@@ -0,0 +1,165 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version='0.6' generator='JOSM'>
+  <bounds minlat='46.914158099999995' minlon='7.3788643' maxlat='46.930806499999996' maxlon='7.4164581' origin='OpenStreetMap server' />
+  <node id='-94' action='modify' visible='true' lat='46.92118998017687' lon='7.383993510066159' />
+  <node id='-92' action='modify' visible='true' lat='46.91990939642803' lon='7.38399351006616'>
+    <tag k='name' v='node 7.3' />
+  </node>
+  <node id='-91' visible='true' lat='46.9199878003943' lon='7.380435012966924' />
+  <node id='-78' visible='true' lat='46.923359062408515' lon='7.383840456427483' />
+  <node id='-76' action='modify' visible='true' lat='46.921921728576876' lon='7.383802193017814'>
+    <tag k='name' v='node 6.3' />
+  </node>
+  <node id='-75' visible='true' lat='46.921973995937314' lon='7.38016716909924' />
+  <node id='-38' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92880973833219' lon='7.402406615822886' />
+  <node id='-36' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92880973833219' lon='7.39972817714604' />
+  <node id='-34' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92752933671926' lon='7.396934948240187' />
+  <node id='-32' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.927581598608725' lon='7.3936442950086345' />
+  <node id='-30' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92828712912576' lon='7.396820158011179' />
+  <node id='-28' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92828712912576' lon='7.393606031598966' />
+  <node id='-26' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.928835868658666' lon='7.396743631191842' />
+  <node id='-24' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.928861998972394' lon='7.393606031598966' />
+  <node id='-22' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92888812927337' lon='7.390162324728737' />
+  <node id='-20' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92888812927337' lon='7.386948198316524' />
+  <node id='-18' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92773838397117' lon='7.383657545084972' />
+  <node id='-16' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92779064565668' lon='7.380252101624412' />
+  <node id='-14' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92833939027588' lon='7.3837340719043105' />
+  <node id='-12' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.928365520831804' lon='7.3802903650340825' />
+  <node id='-10' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92888812927337' lon='7.383619281675304' />
+  <node id='-8' timestamp='2010-03-27T10:39:59Z' visible='true' lat='46.92888812927337' lon='7.3802903650340825' />
+  <node id='-6' timestamp='2010-03-27T10:52:49Z' visible='true' lat='46.9243377340131' lon='7.380169082269725' />
+  <node id='-4' action='modify' timestamp='2010-03-27T10:52:49Z' visible='true' lat='46.9242959219737' lon='7.383689315959293'>
+    <tag k='name' v='node 5.3' />
+  </node>
+  <node id='-2' action='modify' timestamp='2010-03-27T10:52:49Z' visible='true' lat='46.925759323935175' lon='7.383689315959293' />
+  <node id='3193150' action='delete' timestamp='2010-03-14T11:36:30Z' uid='1' user='guggis' visible='true' version='1' changeset='3301' lat='46.9295464' lon='7.3922341' />
+  <node id='3193151' action='delete' timestamp='2010-03-14T11:36:30Z' uid='1' user='guggis' visible='true' version='1' changeset='3301' lat='46.9295464' lon='7.397716' />
+  <node id='3193152' action='delete' timestamp='2010-03-14T11:36:56Z' uid='1' user='guggis' visible='true' version='1' changeset='3300' lat='46.9276142' lon='7.3927056' />
+  <node id='3193153' action='delete' timestamp='2010-03-14T11:36:56Z' uid='1' user='guggis' visible='true' version='1' changeset='3300' lat='46.9273727' lon='7.3963602' />
+  <way id='-96' action='modify' visible='true'>
+    <nd ref='-92' />
+    <nd ref='-94' />
+    <tag k='name' v='way 7.2' />
+  </way>
+  <way id='-93' action='modify' visible='true'>
+    <nd ref='-91' />
+    <nd ref='-92' />
+    <tag k='name' v='way 7.1' />
+  </way>
+  <way id='-81' action='modify' visible='true'>
+    <nd ref='-76' />
+    <nd ref='-78' />
+    <tag k='name' v='way 6.2' />
+  </way>
+  <way id='-77' action='modify' visible='true'>
+    <nd ref='-75' />
+    <nd ref='-76' />
+    <tag k='name' v='way 6.1' />
+  </way>
+  <way id='-62' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <nd ref='-36' />
+    <nd ref='-38' />
+    <tag k='name' v='way 4.1' />
+  </way>
+  <way id='-60' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <nd ref='-32' />
+    <nd ref='-34' />
+    <tag k='name' v='way 3.3' />
+  </way>
+  <way id='-58' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <nd ref='-28' />
+    <nd ref='-30' />
+    <tag k='name' v='way 3.2' />
+  </way>
+  <way id='-56' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <nd ref='-24' />
+    <nd ref='-26' />
+    <tag k='name' v='way 3.1' />
+  </way>
+  <way id='-54' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <nd ref='-20' />
+    <nd ref='-22' />
+    <tag k='name' v='way 2.1' />
+  </way>
+  <way id='-52' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <nd ref='-16' />
+    <nd ref='-18' />
+    <tag k='name' v='way 1.3' />
+  </way>
+  <way id='-50' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <nd ref='-12' />
+    <nd ref='-14' />
+    <tag k='name' v='way 1.2' />
+  </way>
+  <way id='-48' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <nd ref='-8' />
+    <nd ref='-10' />
+    <tag k='name' v='way 1.1' />
+  </way>
+  <way id='-46' action='modify' timestamp='2010-03-27T10:52:49Z' visible='true'>
+    <nd ref='-6' />
+    <nd ref='-4' />
+    <tag k='name' v='way 5.1' />
+  </way>
+  <way id='-44' action='modify' timestamp='2010-03-27T10:52:49Z' visible='true'>
+    <nd ref='-4' />
+    <nd ref='-2' />
+    <tag k='name' v='way 5.2' />
+  </way>
+  <way id='85091' action='delete' timestamp='2010-03-14T11:36:30Z' uid='1' user='guggis' visible='true' version='1' changeset='3301'>
+  </way>
+  <way id='85092' action='delete' timestamp='2010-03-14T11:36:56Z' uid='1' user='guggis' visible='true' version='1' changeset='3300'>
+  </way>
+  <relation id='-103' action='modify' visible='true'>
+    <member type='way' ref='-93' role='from' />
+    <member type='way' ref='-96' role='to' />
+    <member type='node' ref='-92' role='via' />
+    <tag k='except' v='non-standard-except' />
+    <tag k='name' v='Test Case 7 - Non-Standard-Excepts' />
+    <tag k='restriction' v='no_right_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-90' visible='true'>
+    <member type='way' ref='-77' role='from' />
+    <member type='way' ref='-81' role='to' />
+    <tag k='name' v='Test Case 6 - Missing node as &apos;via&apos;' />
+    <tag k='restriction' v='no_left_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-74' action='modify' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <member type='way' ref='-62' role='from' />
+    <tag k='name' v='Test Case 4 - No &apos;to&apos; ways' />
+    <tag k='restriction' v='no_left_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-72' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <member type='way' ref='-56' role='from' />
+    <member type='way' ref='-58' role='to' />
+    <member type='way' ref='-60' role='to' />
+    <tag k='name' v='Test Case 3 - 2 &apos;tp&apos; ways' />
+    <tag k='restriction' v='no_left_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-70' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <member type='way' ref='-54' role='to' />
+    <tag k='name' v='Test Case 2 - No from way' />
+    <tag k='restriction' v='no_left_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-68' timestamp='2010-03-27T10:39:59Z' visible='true'>
+    <member type='way' ref='-48' role='from' />
+    <member type='way' ref='-50' role='from' />
+    <member type='way' ref='-52' role='to' />
+    <tag k='name' v='Test Case 1 - 2 from ways' />
+    <tag k='restriction' v='no_left_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-66' action='modify' timestamp='2010-03-27T10:52:49Z' visible='true'>
+    <member type='way' ref='-46' role='from' />
+    <member type='way' ref='-44' role='to' />
+    <member type='node' ref='-4' role='via' />
+    <tag k='name' v='Test Case 5 - Non-Standard restriction' />
+    <tag k='restriction' v='non-standard-restriction' />
+    <tag k='type' v='restriction' />
+  </relation>
+</osm>
Index: applications/editors/josm/plugins/turnrestrictions/data/test-data-set-1.osm
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/data/test-data-set-1.osm	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/data/test-data-set-1.osm	(revision 20701)
@@ -2,175 +2,185 @@
 <osm version='0.6' generator='JOSM'>
   <bounds minlat='46.9185552' minlon='7.3901081' maxlat='46.9271138' maxlon='7.4086475' origin='OpenStreetMap server' />
-  <node id='-106' action='modify' visible='true' lat='46.92028078273882' lon='7.401045898188405' />
-  <node id='-104' action='modify' visible='true' lat='46.919302014885396' lon='7.401068288768116'>
+  <node id='-56' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.920401695281015' lon='7.392672484176534' />
+  <node id='-54' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.91947481836078' lon='7.394608244994619' />
+  <node id='-52' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.91947481836078' lon='7.392692440473628' />
+  <node id='-50' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.9194611876982' lon='7.391036067814855' />
+  <node id='-48' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.920906018634135' lon='7.399118368137783' />
+  <node id='-46' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.921737460284035' lon='7.40135347341227' />
+  <node id='-44' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.921737460284035' lon='7.39909841184069' />
+  <node id='-42' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.921737460284035' lon='7.3971426947255114' />
+  <node id='-40' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92280059638277' lon='7.392991784930033' />
+  <node id='-38' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92175109036751' lon='7.394767895371367' />
+  <node id='-36' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92175109036752' lon='7.393011741227126' />
+  <node id='-34' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.921737460284014' lon='7.390916330032293' />
+  <node id='-32' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92375467491946' lon='7.391245608934339' />
+  <node id='-30' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92378193405656' lon='7.394298922389664' />
+  <node id='-28' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92450429613562' lon='7.394298922389665' />
+  <node id='-26' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.924517925515175' lon='7.391285521528527' />
+  <node id='-24' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.925969434589156' lon='7.404077507965554' />
+  <node id='-22' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.925955805578894' lon='7.401802490096877' />
+  <node id='-20' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.925955805578894' lon='7.39940773444564' />
+  <node id='-18' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.92569685372496' lon='7.3913653467169' />
+  <node id='-16' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.92566959556225' lon='7.393261194940797' />
+  <node id='-14' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.92654852689992' lon='7.393198680597321' />
+  <node id='-12' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.9265827364623' lon='7.395296737244347' />
+  <node id='-10' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.9265827364623' lon='7.397511886221743' />
+  <node id='-8' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.925560562772716' lon='7.397471973627557' />
+  <node id='-6' action='modify' timestamp='2010-03-15T22:32:09Z' visible='true' lat='46.91930201488541' lon='7.399142698913044' />
+  <node id='-4' action='modify' timestamp='2010-03-15T22:32:09Z' visible='true' lat='46.919302014885396' lon='7.401068288768116'>
     <tag k='name' v='node 8.3' />
   </node>
-  <node id='-103' action='modify' visible='true' lat='46.91930201488541' lon='7.399142698913044' />
-  <node id='-50' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.925560562772716' lon='7.397471973627557' />
-  <node id='-48' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.9265827364623' lon='7.397511886221743' />
-  <node id='-46' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.9265827364623' lon='7.395296737244347' />
-  <node id='-44' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.92662362300419' lon='7.39328115123789' />
-  <node id='-42' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.92566959556225' lon='7.393261194940797' />
-  <node id='-40' timestamp='2010-03-09T09:06:53Z' visible='true' lat='46.92569685372496' lon='7.3913653467169' />
-  <node id='-38' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.925955805578894' lon='7.39940773444564' />
-  <node id='-36' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.925955805578894' lon='7.401802490096877' />
-  <node id='-34' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.925969434589156' lon='7.404077507965554' />
-  <node id='-32' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.924517925515175' lon='7.391285521528527' />
-  <node id='-30' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92450429613562' lon='7.394298922389665' />
-  <node id='-28' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92378193405656' lon='7.394298922389664' />
-  <node id='-26' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92375467491946' lon='7.391245608934339' />
-  <node id='-24' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.921737460284014' lon='7.390916330032293' />
-  <node id='-22' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92175109036752' lon='7.393011741227126' />
-  <node id='-20' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92175109036751' lon='7.394767895371367' />
-  <node id='-18' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.92280059638277' lon='7.392991784930033' />
-  <node id='-16' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.921737460284035' lon='7.3971426947255114' />
-  <node id='-14' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.921737460284035' lon='7.39909841184069' />
-  <node id='-12' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.921737460284035' lon='7.40135347341227' />
-  <node id='-10' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.920906018634135' lon='7.399118368137783' />
-  <node id='-8' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.9194611876982' lon='7.391036067814855' />
-  <node id='-6' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.91947481836078' lon='7.392692440473628' />
-  <node id='-4' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.91947481836078' lon='7.394608244994619' />
-  <node id='-2' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true' lat='46.920401695281015' lon='7.392672484176534' />
-  <way id='-107' action='modify' visible='true'>
-    <nd ref='-104' />
-    <nd ref='-106' />
-    <tag k='name' v='way.8.2' />
+  <node id='-2' action='modify' timestamp='2010-03-15T22:32:09Z' visible='true' lat='46.92028078273882' lon='7.401045898188405' />
+  <way id='-96' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-52' />
+    <nd ref='-54' />
+    <tag k='name' v='way 7.2' />
   </way>
-  <way id='-105' action='modify' visible='true'>
-    <nd ref='-103' />
-    <nd ref='-104' />
-    <tag k='name' v='way.8.1' />
+  <way id='-94' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-52' />
+    <nd ref='-56' />
   </way>
-  <way id='-86' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
+  <way id='-92' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-50' />
+    <nd ref='-52' />
+    <tag k='name' v='way 7.1' />
+  </way>
+  <way id='-90' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-44' />
+    <nd ref='-46' />
+  </way>
+  <way id='-88' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-44' />
     <nd ref='-48' />
-    <nd ref='-50' />
-    <tag k='name' v='Weg 2.2' />
+    <tag k='name' v='way 6.2' />
   </way>
-  <way id='-84' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
-    <nd ref='-46' />
-    <nd ref='-48' />
-    <tag k='name' v='Weg 2.1' />
-  </way>
-  <way id='-82' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
+  <way id='-86' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
     <nd ref='-42' />
     <nd ref='-44' />
-    <tag k='name' v='Weg 1.2' />
+    <tag k='name' v='way 6.1' />
   </way>
-  <way id='-80' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
+  <way id='-84' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-36' />
+    <nd ref='-38' />
+  </way>
+  <way id='-82' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-36' />
     <nd ref='-40' />
-    <nd ref='-42' />
-    <tag k='name' v='Weg 1.1' />
+    <tag k='name' v='way 5.2' />
   </way>
-  <way id='-78' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-38' />
+  <way id='-80' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-34' />
     <nd ref='-36' />
-    <tag k='name' v='Weg 3.1' />
+    <tag k='name' v='way 5.1' />
+  </way>
+  <way id='-78' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-28' />
+    <nd ref='-30' />
   </way>
   <way id='-76' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-36' />
-    <nd ref='-34' />
-    <tag k='name' v='Weg 3.2' />
+    <nd ref='-30' />
+    <nd ref='-32' />
+    <tag k='name' v='way 4.2' />
   </way>
   <way id='-74' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-32' />
-    <nd ref='-30' />
+    <nd ref='-26' />
+    <nd ref='-28' />
     <tag k='name' v='way 4.1' />
   </way>
   <way id='-72' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-28' />
-    <nd ref='-26' />
-    <tag k='name' v='way 4.2' />
+    <nd ref='-22' />
+    <nd ref='-24' />
+    <tag k='name' v='Weg 3.2' />
   </way>
-  <way id='-70' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-30' />
-    <nd ref='-28' />
+  <way id='-70' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <nd ref='-20' />
+    <nd ref='-22' />
+    <tag k='name' v='Weg 3.1' />
   </way>
-  <way id='-68' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-24' />
-    <nd ref='-22' />
-    <tag k='name' v='way 5.1' />
+  <way id='-68' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
+    <nd ref='-18' />
+    <nd ref='-16' />
+    <tag k='name' v='Weg 1.1' />
   </way>
-  <way id='-66' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-22' />
-    <nd ref='-18' />
-    <tag k='name' v='way 5.2' />
-  </way>
-  <way id='-64' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-22' />
-    <nd ref='-20' />
-  </way>
-  <way id='-62' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+  <way id='-66' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
     <nd ref='-16' />
     <nd ref='-14' />
-    <tag k='name' v='way 6.1' />
+    <tag k='name' v='Weg 1.2' />
   </way>
-  <way id='-60' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-14' />
+  <way id='-64' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
+    <nd ref='-12' />
     <nd ref='-10' />
-    <tag k='name' v='way 6.2' />
+    <tag k='name' v='Weg 2.1' />
   </way>
-  <way id='-58' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-14' />
-    <nd ref='-12' />
+  <way id='-62' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
+    <nd ref='-10' />
+    <nd ref='-8' />
+    <tag k='name' v='Weg 2.2' />
   </way>
-  <way id='-56' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-8' />
-    <nd ref='-6' />
-    <tag k='name' v='way 7.1' />
-  </way>
-  <way id='-54' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <nd ref='-6' />
-    <nd ref='-2' />
-  </way>
-  <way id='-52' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+  <way id='-60' action='modify' timestamp='2010-03-15T22:32:09Z' visible='true'>
     <nd ref='-6' />
     <nd ref='-4' />
-    <tag k='name' v='way 7.2' />
+    <tag k='name' v='way.8.1' />
   </way>
-  <relation id='-100' timestamp='2010-03-09T09:06:53Z' visible='true'>
-    <member type='way' ref='-84' role='from' />
-    <member type='way' ref='-86' role='to' />
+  <way id='-58' action='modify' timestamp='2010-03-15T22:32:09Z' visible='true'>
+    <nd ref='-4' />
+    <nd ref='-2' />
+    <tag k='name' v='way.8.2' />
+  </way>
+  <relation id='-114' visible='true'>
+    <member type='way' ref='-60' role='from' />
+    <member type='way' ref='-58' role='to' />
+    <member type='node' ref='-4' role='via' />
+    <tag k='restriction' v='no_left_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-110' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <member type='way' ref='-92' role='from' />
+    <member type='way' ref='-96' role='to' />
+    <member type='node' ref='-52' role='via' />
+    <tag k='restriction' v='only_straight_on' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-108' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <member type='way' ref='-86' role='from' />
+    <member type='way' ref='-88' role='to' />
+    <member type='node' ref='-44' role='via' />
+    <tag k='restriction' v='only_right_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-106' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <member type='way' ref='-80' role='from' />
+    <member type='way' ref='-82' role='to' />
+    <member type='node' ref='-36' role='via' />
+    <tag k='restriction' v='only_left_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-104' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <member type='way' ref='-74' role='from' />
+    <member type='way' ref='-76' role='to' />
+    <member type='way' ref='-78' role='via' />
+    <tag k='restriction' v='no_u_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-102' action='modify' timestamp='2010-03-15T09:31:53Z' visible='true'>
+    <member type='way' ref='-70' role='from' />
+    <member type='way' ref='-72' role='to' />
+    <member type='node' ref='-22' role='via' />
+    <tag k='restriction' v='no_straight_on' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-100' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
+    <member type='way' ref='-68' role='from' />
+    <member type='way' ref='-66' role='to' />
+    <member type='node' ref='-16' role='via' />
+    <tag k='restriction' v='no_left_turn' />
+    <tag k='type' v='restriction' />
+  </relation>
+  <relation id='-98' action='modify' timestamp='2010-03-09T09:06:53Z' visible='true'>
+    <member type='way' ref='-64' role='from' />
+    <member type='way' ref='-62' role='to' />
+    <member type='node' ref='-10' role='via' />
     <tag k='restriction' v='no_right_turn' />
     <tag k='type' v='restriction' />
   </relation>
-  <relation id='-98' timestamp='2010-03-09T09:06:53Z' visible='true'>
-    <member type='way' ref='-80' role='from' />
-    <member type='way' ref='-82' role='to' />
-    <tag k='restriction' v='no_left_turn' />
-    <tag k='type' v='restriction' />
-  </relation>
-  <relation id='-96' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <member type='way' ref='-78' role='from' />
-    <member type='way' ref='-76' role='to' />
-    <tag k='restriction' v='no_straight_on' />
-    <tag k='type' v='restriction' />
-  </relation>
-  <relation id='-94' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <member type='way' ref='-74' role='from' />
-    <member type='way' ref='-72' role='to' />
-    <member type='way' ref='-70' role='via' />
-    <tag k='restriction' v='no_u_turn' />
-    <tag k='type' v='restriction' />
-  </relation>
-  <relation id='-92' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <member type='way' ref='-68' role='from' />
-    <member type='way' ref='-66' role='to' />
-    <member type='node' ref='-22' role='via' />
-    <tag k='restriction' v='only_left_turn' />
-    <tag k='type' v='restriction' />
-  </relation>
-  <relation id='-90' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <member type='way' ref='-62' role='from' />
-    <member type='way' ref='-60' role='to' />
-    <member type='node' ref='-14' role='via' />
-    <tag k='restriction' v='only_right_turn' />
-    <tag k='type' v='restriction' />
-  </relation>
-  <relation id='-88' timestamp='2010-03-15T09:31:53Z' visible='true'>
-    <member type='way' ref='-56' role='from' />
-    <member type='way' ref='-52' role='to' />
-    <member type='node' ref='-6' role='via' />
-    <tag k='restriction' v='only_straight_on' />
-    <tag k='type' v='restriction' />
-  </relation>
 </osm>
Index: applications/editors/josm/plugins/turnrestrictions/images/types/non-standard-type.svg
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/images/types/non-standard-type.svg	(revision 20701)
+++ applications/editors/josm/plugins/turnrestrictions/images/types/non-standard-type.svg	(revision 20701)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="32"
+   height="32"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="Neues Dokument 1">
+  <defs
+     id="defs4">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective10" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="5.6"
+     inkscape:cx="-2.6249999"
+     inkscape:cy="16.291151"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="920"
+     inkscape:window-height="778"
+     inkscape:window-x="231"
+     inkscape:window-y="94"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Ebene 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1020.3622)">
+    <path
+       sodipodi:type="arc"
+       style="fill:none;stroke:#db0000;stroke-width:3.05941176000000010;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+       id="path2816"
+       sodipodi:cx="18.214285"
+       sodipodi:cy="17.803572"
+       sodipodi:rx="13.928572"
+       sodipodi:ry="13.482142"
+       d="m 32.142857,17.803572 a 13.928572,13.482142 0 1 1 -27.8571438,0 13.928572,13.482142 0 1 1 27.8571438,0 z"
+       transform="matrix(0.96153846,0,0,1,-1.4423077,1018.7551)" />
+    <text
+       xml:space="preserve"
+       style="font-size:40px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+       x="10.178572"
+       y="1044.3265"
+       id="text3590"><tspan
+         sodipodi:role="line"
+         id="tspan3592"
+         x="10.178572"
+         y="1044.3265"
+         style="font-size:20px">?</tspan></text>
+  </g>
+</svg>
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/CreateOrEditTurnRestrictionAction.java	(revision 20701)
@@ -4,7 +4,11 @@
 
 import java.awt.event.ActionEvent;
-import java.awt.event.KeyEvent;
 import java.util.Collection;
 import java.util.logging.Logger;
+
+import javax.swing.ActionMap;
+import javax.swing.InputMap;
+import javax.swing.JComponent;
+import javax.swing.KeyStroke;
 
 import org.openstreetmap.josm.Main;
@@ -15,5 +19,5 @@
 import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionEditorManager;
 import org.openstreetmap.josm.plugins.turnrestrictions.editor.TurnRestrictionSelectionPopupPanel;
-import org.openstreetmap.josm.tools.Shortcut;
+import org.openstreetmap.josm.plugins.turnrestrictions.preferences.PreferenceKeys;
 
 /**
@@ -26,18 +30,67 @@
 public class CreateOrEditTurnRestrictionAction extends JosmAction {
 	static private final Logger logger = Logger.getLogger(CreateOrEditTurnRestrictionAction.class.getName());
-	public CreateOrEditTurnRestrictionAction() {
+	
+	/**
+	 * Installs the global key stroke with which creating/editing a turn restriction
+	 * is triggered.
+	 * 
+	 * @param keyStroke the key stroke 
+	 */
+	static public void install(KeyStroke keyStroke){
+		InputMap im = Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+		Object actionMapKey = im.get(keyStroke);
+		if (actionMapKey != null && !actionMapKey.toString().equals("turnrestrictions:create-or-edit")) {
+			System.out.println(tr("Warning: turnrestrictions plugin replaces already existing action ''{0}'' behind shortcut ''{1}'' by action ''{2}''", actionMapKey.toString(), keyStroke.toString(), "turnrestrictions:create-or-edit"));			
+		}
+		KeyStroke[] keys = im.keys();
+		if (keys != null){
+			for(KeyStroke ks: im.keys()){
+				if (im.get(ks).equals("turnrestrictions:create-or-edit")) {
+					im.remove(ks);
+				}
+			}
+		}
+		im.put(keyStroke, "turnrestrictions:create-or-edit");
+		ActionMap am = Main.contentPane.getActionMap();
+		am.put("turnrestrictions:create-or-edit", getInstance());
+	}
+	
+	/**
+	 * Installs  global key stroke configured in the preferences.
+	 * 
+	 * @param keyStroke the key stroke 
+	 */
+	static public void install(){
+		String value = Main.pref.get(PreferenceKeys.EDIT_SHORTCUT, "shift ctrl T");
+		KeyStroke key = KeyStroke.getKeyStroke(value);
+		if (key == null){
+			System.out.println(tr("Warning: illegal value ''{0}'' for preference key ''{1}''. Falling back to default value ''shift ctrl T''.", value, PreferenceKeys.EDIT_SHORTCUT));
+			key = KeyStroke.getKeyStroke("shift ctrl T");
+		}
+		install(key);
+	}
+	
+	/** the singleton instance of this action */
+	private static CreateOrEditTurnRestrictionAction instance;
+	
+	/**
+	 * Replies the unique instance of this action
+	 * 
+	 * @return
+	 */
+	public static CreateOrEditTurnRestrictionAction getInstance() {
+		if (instance == null){
+			instance = new CreateOrEditTurnRestrictionAction();
+		}
+		return instance;
+	}
+	
+	protected CreateOrEditTurnRestrictionAction() {
 		super(
 		    tr("Create/Edit turn restriction..."),
 		    null,
 		    tr("Create or edit a turn restriction."),
-		    Shortcut.registerShortcut(
-					"turnrestrictions:create-or-edit", 
-					tr("Turnrestrictions: Create or Edit"),
-					// results in Shift-Ctrl-T on windows
-					KeyEvent.VK_T,
-					Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY, 
-					Shortcut.SHIFT_DEFAULT
-			),
-			true /* register action */
+		    null, // shortcut is going to be registered later 
+			false 
 	    );
 	}	
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionsPlugin.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionsPlugin.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/TurnRestrictionsPlugin.java	(revision 20701)
@@ -9,14 +9,11 @@
 
 /**
- * This is the main class for the turnrestriction plugin.
+ * This is the main class for the turnrestrictions plugin.
  * 
  */
 public class TurnRestrictionsPlugin extends Plugin{
 	
-	private CreateOrEditTurnRestrictionAction actCreateOrEditTurnRestriction;
-	
 	public TurnRestrictionsPlugin(PluginInformation info) {
-		super(info);
-		actCreateOrEditTurnRestriction = new CreateOrEditTurnRestrictionAction();
+		super(info);		
 	}
 	
@@ -30,4 +27,5 @@
 			// add the dialog
 			newFrame.addToggleDialog(dialog);
+			CreateOrEditTurnRestrictionAction.install();
 		}
 	}
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/editor/TurnRestrictionLegEditor.java	(revision 20701)
@@ -156,5 +156,5 @@
 			lblOsmObject.setFont(UIManager.getFont("Label.font").deriveFont(Font.ITALIC));
 			lblOsmObject.setIcon(null);
-			lblOsmObject.setText(tr("multiple objects with role ''{0}''",this.role.toString()));
+			lblOsmObject.setText(tr("multiple objects with role ''{0}''",this.role.getOsmRole()));
 			lblOsmObject.setToolTipText(null);			
 		}
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/list/TurnRestrictionCellRenderer.java	(revision 20701)
@@ -96,5 +96,7 @@
 	 */
 	protected ImageIcon getIcon(String restrictionType) {
-		if (!isValidRestrictionType(restrictionType)) return null;
+		if (!isValidRestrictionType(restrictionType)) {
+			return ImageProvider.get("types", "non-standard-type");
+		}
 		return ImageProvider.get(buildImageName(restrictionType));
 	}
@@ -146,8 +148,4 @@
 	protected void renderIcon(Relation tr) {
 		String restrictionType = tr.get("restriction");
-		if (!isValidRestrictionType(restrictionType)) {
-			icon.setIcon(null);
-			return;
-		}
 		icon.setIcon(getIcon(restrictionType));
 	}
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferenceKeys.java	(revision 20701)
@@ -1,3 +1,5 @@
 package org.openstreetmap.josm.plugins.turnrestrictions.preferences;
+
+import javax.swing.KeyStroke;
 
 /**
@@ -29,3 +31,10 @@
 	 */
 	String SHOW_VIAS_IN_BASIC_EDITOR = "turnrestrictions.show-vias-in-basic-editor";
+	
+	/**
+	 * The shortcut which triggers creating a new or editing and existing turn
+	 * restriction. The value must be parseable by {@see KeyStroke#getKeyStroke(String)}.
+	 * If missing, the default value "ctrl shift T" is assumed.
+	 */
+	String EDIT_SHORTCUT= "turnrestrictions.edit-shortcut";
 }
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/PreferencesPanel.java	(revision 20701)
@@ -16,4 +16,5 @@
 import javax.swing.JPanel;
 import javax.swing.JRadioButton;
+import javax.swing.JSeparator;
 
 import org.openstreetmap.josm.data.Preferences;
@@ -34,4 +35,5 @@
 	private ButtonGroup bgIconSet;
 	private JCheckBox cbShowViaListInBasicEditor;
+	private ShortcutPreferencePanel pnlShortcutPreference;
 	
 	protected JPanel buildShowViaListInBasicEditorPanel() {
@@ -47,7 +49,7 @@
 		msg.setText("<html><body>"
 				+ tr("The Basic Editor can optionally display the list of via-objects "
-					 + "of a turn restrictions. If enabled, one can also edit them "
-					 + "in the Basic editor. If disabled, editing of via-objects is only "
-					 + "possible in the Advanced Editor."
+					 + "of a turn restriction. If enabled, one can edit them "
+					 + "in the Basic editor too. If disabled, editing of via-objects is "
+					 + "possible in the Advanced Editor only."
 				  )
 				+ "</body></html>"
@@ -153,5 +155,11 @@
 		add(buildSetBPanel(), gc);
 		gc.gridy++;
+		add(new JSeparator(), gc);		
+		gc.gridy++;
 		add(buildShowViaListInBasicEditorPanel(), gc);
+		gc.gridy++;
+		add(new JSeparator(), gc);
+		gc.gridy++;
+		add(pnlShortcutPreference = new ShortcutPreferencePanel(), gc);
 		
 		// filler - just grab remaining space
@@ -189,4 +197,6 @@
 		boolean b = prefs.getBoolean(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, false);
 		cbShowViaListInBasicEditor.setSelected(b);
+		
+		pnlShortcutPreference.initFromPreferences(prefs);
 	}
 	
@@ -213,4 +223,6 @@
 			prefs.put(PreferenceKeys.SHOW_VIAS_IN_BASIC_EDITOR, newValue);
 		}		
+		
+		pnlShortcutPreference.saveToPreferences(prefs);
 	}
 	
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/ShortcutPreferencePanel.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/ShortcutPreferencePanel.java	(revision 20701)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/preferences/ShortcutPreferencePanel.java	(revision 20701)
@@ -0,0 +1,225 @@
+package org.openstreetmap.josm.plugins.turnrestrictions.preferences;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+import static org.openstreetmap.josm.tools.I18n.trc;
+
+import java.awt.Component;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.event.KeyEvent;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.swing.AbstractListModel;
+import javax.swing.ComboBoxModel;
+import javax.swing.JCheckBox;
+import javax.swing.JComboBox;
+import javax.swing.JLabel;
+import javax.swing.JList;
+import javax.swing.JPanel;
+import javax.swing.KeyStroke;
+import javax.swing.ListCellRenderer;
+import javax.swing.UIManager;
+
+import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.gui.widgets.HtmlPanel;
+import org.openstreetmap.josm.plugins.turnrestrictions.CreateOrEditTurnRestrictionAction;
+
+/**
+ * ShortcutPreferencePanel allows to configure the global shortcut to trigger
+ * creating/editing a turn restriction.
+ */
+public class ShortcutPreferencePanel extends JPanel {
+	
+	private JCheckBox cbCtrl;
+	private JCheckBox cbAlt;
+	private JCheckBox cbShift;
+	private JCheckBox cbMeta;
+	private JComboBox cmKeyCodes;
+
+	protected JPanel buildMessagePanel() {
+		HtmlPanel pnl = new HtmlPanel();
+		pnl.setText("<html><body>"
+			+ tr("Please configure the <strong>keyboard shortcut</strong> which triggers "
+				+ "creating/editing a turn restriction from the current JOSM selection.")
+			+ "</body></html>"
+		);
+		return pnl;
+	}
+	
+	protected JPanel buildShortCutConfigPanel() {
+		JPanel pnl = new JPanel(new GridBagLayout());
+		GridBagConstraints gc = new GridBagConstraints();
+		gc.anchor = GridBagConstraints.NORTHWEST;
+		gc.fill = GridBagConstraints.HORIZONTAL;
+		gc.weightx = 0.0;
+		gc.gridx = 0;
+		gc.gridy = 0;
+		
+		pnl.add(new JLabel(trc("keyboard-key", "Key:")), gc);
+		gc.gridx++;
+		gc.gridwidth=4;
+		gc.weightx = 1.0;
+		pnl.add(cmKeyCodes = new JComboBox(new VKeyComboBoxModel()), gc);
+		cmKeyCodes.setRenderer(new VKeyCellRenderer());
+		
+		gc.gridx = 0;
+		gc.gridy = 1;
+		gc.gridwidth = 1;
+		gc.weightx = 0.0;
+		pnl.add(new JLabel(trc("keyboard-modifiers", "Modifiers:")), gc);
+	
+		gc.gridx++;
+		pnl.add(cbShift = new JCheckBox(trc("keyboard-modifiers", "Shift")), gc);
+		gc.gridx++;
+		pnl.add(cbCtrl = new JCheckBox(trc("keyboard-modifiers", "Ctrl")), gc);
+		gc.gridx++;
+		pnl.add(cbAlt = new JCheckBox(trc("keyboard-modifiers", "Alt")), gc);
+		gc.gridx++;
+		gc.weightx = 1.0;
+		pnl.add(cbMeta = new JCheckBox(trc("keyboard-modifiers", "Meta")), gc);
+		
+		return pnl;
+	}
+	
+	protected void build() {
+		setLayout(new GridBagLayout());
+		GridBagConstraints gc = new GridBagConstraints();
+		gc.anchor = GridBagConstraints.NORTHWEST;
+		gc.fill = GridBagConstraints.HORIZONTAL;
+		gc.weightx = 1.0;
+		gc.gridx = 0;
+		gc.gridy = 0;
+		add(buildMessagePanel(), gc);
+		gc.gridy++;
+		add(buildShortCutConfigPanel(), gc);
+	}
+	
+	public ShortcutPreferencePanel() {
+		build();
+	}
+	
+	public void initFromPreferences(Preferences pref){
+		String value = pref.get(PreferenceKeys.EDIT_SHORTCUT, "shift ctrl T");
+		KeyStroke key = KeyStroke.getKeyStroke(value);
+		if (key == null){
+			System.out.println(tr("Warning: illegal value ''{0}'' for preference key ''{1}''. Falling back to default value ''shift ctrl T''.", value, PreferenceKeys.EDIT_SHORTCUT));
+			key = KeyStroke.getKeyStroke("shift ctrl T");
+		}
+		cmKeyCodes.getModel().setSelectedItem(key.getKeyCode());
+		cbAlt.setSelected((key.getModifiers() & KeyEvent.ALT_DOWN_MASK) != 0);
+		cbCtrl.setSelected((key.getModifiers() & KeyEvent.CTRL_DOWN_MASK) != 0);
+		cbShift.setSelected((key.getModifiers() & KeyEvent.SHIFT_DOWN_MASK) != 0);
+		cbMeta.setSelected((key.getModifiers() & KeyEvent.META_DOWN_MASK) != 0);
+	}
+	
+	public void saveToPreferences(Preferences pref){
+		Integer code  = (Integer)cmKeyCodes.getModel().getSelectedItem();
+		if (code == null) {
+			code = KeyEvent.VK_T;
+		}
+		int modifiers = 0;
+		if (cbAlt.isSelected()) modifiers |= KeyEvent.ALT_DOWN_MASK;
+		if (cbCtrl.isSelected()) modifiers |= KeyEvent.CTRL_DOWN_MASK;
+		if (cbShift.isSelected()) modifiers |= KeyEvent.SHIFT_DOWN_MASK;
+		if (cbMeta.isSelected()) modifiers |= KeyEvent.META_DOWN_MASK;		
+		KeyStroke ks = KeyStroke.getKeyStroke(code, modifiers);
+		
+		pref.put(PreferenceKeys.EDIT_SHORTCUT, ks.toString());		
+		CreateOrEditTurnRestrictionAction.install(ks);
+	}
+	
+	static private class VKeyComboBoxModel extends AbstractListModel implements ComboBoxModel {
+		private final ArrayList<Integer> keys = new ArrayList<Integer>();
+		private Integer selected = null;
+
+		public VKeyComboBoxModel() {
+			populate();
+		}
+		
+		public void populate() {
+			for (Field f :KeyEvent.class.getFields()) {
+				if (! Modifier.isStatic(f.getModifiers())) continue;
+				if (! f.getName().startsWith("VK_")) continue;
+				try {
+					keys.add((Integer)f.get(null));
+				} catch(IllegalAccessException e){
+					// ignore
+				}
+			}
+			
+			Collections.sort(keys, new KeyCodeComparator());
+		}
+		
+		public Object getSelectedItem() {
+			return selected;
+		}
+
+		public void setSelectedItem(Object anItem) {
+			this.selected = (Integer)anItem;			
+		}
+
+		public Object getElementAt(int index) {
+			return keys.get(index);
+		}
+
+		public int getSize() {
+			return keys.size();
+		}		
+	}
+	
+	static private class VKeyCellRenderer extends JLabel implements ListCellRenderer {
+		public Component getListCellRendererComponent(JList list, Object value,
+				int index, boolean isSelected, boolean cellHasFocus) {
+			if (isSelected) {
+				setBackground(UIManager.getColor("ComboBox.selectionBackground"));
+				setForeground(UIManager.getColor("ComboBox.selectionForeground"));
+			} else {
+				setBackground(UIManager.getColor("ComboBox.background"));
+				setForeground(UIManager.getColor("ComboBox.foreground"));
+			}
+			setText(KeyEvent.getKeyText((Integer)value));
+			return this;
+		}		
+	}
+	
+	static private class KeyCodeComparator implements Comparator<Integer> {
+		private final static Map<Integer, String> keyNames = new HashMap<Integer, String>();
+		
+		protected String keyName(Integer code){
+			String name = keyNames.get(code);
+			if (name == null){
+				name = KeyEvent.getKeyText(code);
+				keyNames.put(code, name);
+			}
+			return name;
+		}
+		/**
+		 * Make sure single letter keys (A-Z, 0-9) are at the top of the list.
+		 * Make sure function key F1-F19 are sorted numerically, not lexicografically.
+		 * 
+		 */
+		public int compare(Integer kc1, Integer kc2) {
+			String n1 = keyName(kc1);
+			String n2 = keyName(kc2);
+			if (n1.length() == 1 && n2.length()==1){
+				return n1.compareTo(n2);
+			} else if (n1.length() == 1){
+				return -1;
+			} else if (n2.length() == 1){
+				return 1;
+			} else if (n1.matches("F\\d+") && n2.matches("F\\d+")){
+				int f1 = Integer.parseInt(n1.substring(1));
+				int f2 = Integer.parseInt(n2.substring(1));
+				return new Integer(f1).compareTo(f2);				
+			} else {
+				return n1.compareTo(n2);
+			}				
+		}		
+	}
+}
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IdenticalTurnRestrictionLegsError.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IdenticalTurnRestrictionLegsError.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IdenticalTurnRestrictionLegsError.java	(revision 20701)
@@ -27,6 +27,6 @@
 	@Override
 	public String getText() {		
-		return tr("This turn restriction uses the OSM way <span class=\"object-name\">{0}</span> with role ''from'' <strong>and</strong> with role ''to''. "
-				+ "In a turn restriction, the way with role ''from'' should be different from the way with role ''to'', though.",
+		return tr("This turn restriction uses the OSM way <span class=\"object-name\">{0}</span> with role <tt>from</tt> <strong>and</strong> with role <tt>to</tt>. "
+				+ "In a turn restriction, the way with role <tt>from</tt> should be different from the way with role <tt>to</tt>, though.",
 				leg.getDisplayName(DefaultNameFormatter.getInstance())
 				);				
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IntersectionMissingAsViaError.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IntersectionMissingAsViaError.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/IntersectionMissingAsViaError.java	(revision 20701)
@@ -37,5 +37,5 @@
 		String msg = tr("The <strong>from</strong>-way <span class=\"object-name\">{0}</span> and the <strong>to</strong>-way <span class=\"object-name\">{1}</span> "
 		       + "interesect at node <span class=\"object-name\">{2}</span> but <span class=\"object-name\">{2}</span> isn''t a <strong>via</strong>-object.<br> "
-		       + "It is recommended to set <span class=\"object-name\">{2}</span> as only <strong>via</strong>-object.",
+		       + "It is recommended to set <span class=\"object-name\">{2}</span> as unique <strong>via</strong>-object.",
 		       this.from.getDisplayName(DefaultNameFormatter.getInstance()),
 		       this.to.getDisplayName(DefaultNameFormatter.getInstance()),
Index: applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MultipleTurnRestrictionLegError.java
===================================================================
--- applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MultipleTurnRestrictionLegError.java	(revision 20697)
+++ applications/editors/josm/plugins/turnrestrictions/src/org/openstreetmap/josm/plugins/turnrestrictions/qa/MultipleTurnRestrictionLegError.java	(revision 20701)
@@ -20,5 +20,5 @@
 	 * Create the issue
 	 * 
-	 * @param parent the parant model 
+	 * @param parent the parent model 
 	 * @param role the role of the turn restriction leg with multiple entries 
 	 * @param numLegs the number of legs
@@ -34,6 +34,6 @@
 	public String getText() {
 		switch(role){
-		case FROM: return 
-			tr("A turn restriction requires exactly one way with role <tt>from</tt>. "
+		case FROM:  
+			return tr("A turn restriction requires exactly one way with role <tt>from</tt>. "
 				+ "This turn restriction has {0} ways in this role. Please remove "
 				+ "{1} of them.",
@@ -42,5 +42,5 @@
 			);
 		case TO: 
-			tr("A turn restriction requires exactly one way with role <tt>from</tt>. "
+			return tr("A turn restriction requires exactly one way with role <tt>to</tt>. "
 					+ "This turn restriction has {0} ways in this role. Please remove "
 					+ "{1} of them.",
