Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 19482)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java	(revision 19483)
@@ -70,4 +70,5 @@
 import org.openstreetmap.josm.data.UndoRedoHandler;
 import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.Filter;
 import org.openstreetmap.josm.data.osm.OsmDataManager;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -147,6 +148,9 @@
     public static final ListProperty PROPERTY_RECENT_TAGS = new ListProperty("properties.recent-tags",
             Collections.emptyList());
-    /** The preference list of tags which should not be remembered, since r9940 */
+    /** The preference filter of tags which should not be remembered, since r9940 */
     public static final StringProperty PROPERTY_TAGS_TO_IGNORE = new StringProperty("properties.recent-tags.ignore",
+            new SearchSetting().writeToString());
+    /** The preference filter for tag keys for which values should not be auto-completed, since xxx */
+    public static final StringProperty NO_AUTOCOMPLETE_KEYS = new StringProperty("properties.autocomplete.exclude-keys",
             new SearchSetting().writeToString());
 
@@ -183,4 +187,5 @@
     final RecentTagCollection recentTags = new RecentTagCollection(MAX_LRU_TAGS_NUMBER);
     SearchSetting tagsToIgnore;
+    SearchSetting noAutocomplete;
 
     /**
@@ -241,4 +246,5 @@
         this.tagData = propertyData;
         this.valueCount = valueCount;
+        this.noAutocomplete = SearchSetting.readFromString(NO_AUTOCOMPLETE_KEYS.get());
     }
 
@@ -737,4 +743,21 @@
         }
 
+        /**
+         * Check if values should be auto-completed for the given tag key.
+         * @param key the key
+         * @return false if auto-completion is disabled or if the key matches the exclusion filter, true else
+         */
+        private boolean autocompleteValuesForKey(String key) {
+            if (!AUTOCOMPLETE_VALUES.get())
+                return false;
+            if (noAutocomplete == null || Utils.isEmpty(noAutocomplete.text))
+                return true;
+            try {
+                return !SearchCompiler.compile(noAutocomplete).match(new Tag(key));
+            } catch (SearchParseError parseError) {
+                throw new IllegalStateException(parseError);
+            }
+        }
+
         protected void addEventListeners() {
             // OK on Enter in values
@@ -778,4 +801,6 @@
             // update the values combobox orientation if the key changed
             values.applyComponentOrientation(OrientationAction.getNamelikeOrientation(keys.getText()));
+            // update the auto-completion setting for the given tag key
+            values.setAutocompleteEnabled(autocompleteValuesForKey(keys.getText()));
         }
 
@@ -1163,4 +1188,5 @@
                 add(new IgnoreTagAction(tr("Ignore tag ''{0}''", t), t));
                 add(new EditIgnoreTagsAction());
+                add(new EditExcludeAutocompleteValues(t));
             }
         }
@@ -1190,10 +1216,10 @@
 
             EditIgnoreTagsAction() {
-                super(tr("Edit ignore list"));
+                super(tr("Edit ignore filter"));
             }
 
             @Override
             public void actionPerformed(ActionEvent e) {
-                final SearchSetting newTagsToIngore = SearchAction.showSearchDialog(tagsToIgnore);
+                final SearchSetting newTagsToIngore = SearchAction.showSearchDialog(new Filter(tagsToIgnore));
                 if (newTagsToIngore == null) {
                     return;
@@ -1205,4 +1231,27 @@
                 } catch (SearchParseError parseError) {
                     warnAboutParseError(parseError);
+                }
+            }
+        }
+
+        class EditExcludeAutocompleteValues extends AbstractAction {
+            final transient Tag tag;
+
+            EditExcludeAutocompleteValues(Tag tag) {
+                super(tr("Edit tag filter to stop autocompletion of values"));
+                this.tag = tag;
+                setEnabled(AUTOCOMPLETE_VALUES.get());
+            }
+
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                SearchSetting initFilter = SearchSetting.fromString('"' + tag.getKey() + '"');
+
+                if (noAutocomplete != null && !Utils.isEmpty(noAutocomplete.text))
+                    initFilter = noAutocomplete;
+                final SearchSetting newNoAutocomplete = SearchAction.showSearchDialog(new Filter(initFilter));
+                if (newNoAutocomplete != null) {
+                    noAutocomplete = newNoAutocomplete;
+                    NO_AUTOCOMPLETE_KEYS.put(noAutocomplete.writeToString());
                 }
             }
