Ticket #21480: josm_add_missing_search_hints.2.patch

File josm_add_missing_search_hints.2.patch, 2.9 KB (added by Woazboat, 4 years ago)
  • src/org/openstreetmap/josm/gui/dialogs/SearchDialog.java

    From 08b89f4f05b54f369aff9a3347cbfe17d192013c Mon Sep 17 00:00:00 2001
    From: Florian Kargl <f.kargl@posteo.de>
    Date: Wed, 27 Oct 2021 22:44:07 +0200
    Subject: [PATCH] Add missing hints to search dialog
    
    ---
     .../openstreetmap/josm/gui/dialogs/SearchDialog.java  | 11 +++++++++--
     1 file changed, 9 insertions(+), 2 deletions(-)
    
    diff --git a/src/org/openstreetmap/josm/gui/dialogs/SearchDialog.java b/src/org/openstreetmap/josm/gui/dialogs/SearchDialog.java
    index 83a27eec28..c2f4ff137b 100644
    a b private static JPanel buildHintsSection(AutoCompComboBox<SearchSetting> hcbSearc  
    321321                GBC.eol());
    322322        hintPanel.add(new SearchKeywordRow(hcbSearchString)
    323323                .addKeyword("<i>key:</i>", null, tr("matches if ''key'' exists"))
     324                .addKeyword("<i>key?</i>", null, tr("matches if ''key''' has a truthy value (''true'', ''yes'', ''1', ''on')"))
    324325                .addKeyword("<i>key</i>=<i>value</i>", null, tr("''key'' with exactly ''value''"))
    325326                .addKeyword("<i>key</i>~<i>regexp</i>", null, tr("value of ''key'' matching the regular expression ''regexp''"))
    326327                .addKeyword("<i>key</i>=*", null, tr("''key'' with any value"))
    private static JPanel buildHintsSection(AutoCompComboBox<SearchSetting> hcbSearc  
    338339                .addKeyword("<i>expr</i> <i>expr</i>", null,
    339340                        tr("logical and (both expressions have to be satisfied)"),
    340341                        trc("search string example", "Baker Street"))
     342                .addKeyword("<i>expr</i> & <i>expr</i>", "& ", tr("logical and (both expressions have to be satisfied)"))
     343                .addKeyword("<i>expr</i> AND <i>expr</i>", "AND ", tr("logical and (both expressions have to be satisfied)"))
    341344                .addKeyword("<i>expr</i> | <i>expr</i>", "| ", tr("logical or (at least one expression has to be satisfied)"))
    342                 .addKeyword("<i>expr</i> OR <i>expr</i>", "OR ", tr("logical or (at least one expression has to be satisfied)"))
     345                .addKeyword("<i>expr</i> OR <i>expr</i>", "OR ", tr("logical or (at least one expression has to be satisfied)")),
     346                GBC.eol());
     347        hintPanel.add(new SearchKeywordRow(hcbSearchString)
     348                .addKeyword("<i>expr</i> ^ <i>expr</i>", "^ ", tr("logical xor (one and only one expression has to be satisfied)"))
     349                .addKeyword("<i>expr</i> XOR <i>expr</i>", "XOR ", tr("logical or (one and only one expression has to be satisfied)"))
    343350                .addKeyword("-<i>expr</i>", null, tr("logical not"))
    344351                .addKeyword("(<i>expr</i>)", "()", tr("use parenthesis to group expressions")),
    345                 GBC.eol());
     352                GBC.eol().anchor(GBC.CENTER));
    346353
    347354        SearchKeywordRow objectHints = new SearchKeywordRow(hcbSearchString)
    348355                .addTitle(tr("objects"))