Changeset 18408 in josm


Ignore:
Timestamp:
2022-03-22T18:29:37+01:00 (2 years ago)
Author:
taylor.smock
Message:

fix #21480: Add missing syntax hints to search dialog (patch by Woazboat)

This adds documentation for the following syntax:

  • key? (truthy values)
  • &, AND
  • OR
  • , XOR (only one of)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/SearchDialog.java

    r18173 r18408  
    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''"))
     
    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)
Note: See TracChangeset for help on using the changeset viewer.