Ignore:
Timestamp:
2024-04-22T20:59:26+02:00 (3 weeks ago)
Author:
taylor.smock
Message:

Revert most var changes from r19048, fix most new compile warnings and checkstyle issues

Also, document why various ErrorProne checks were originally disabled and fix
generic SonarLint issues.

Location:
trunk/src/org/openstreetmap/josm/gui/tagging
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagCellRenderer.java

    r17595 r19050  
    9898        }
    9999
    100         switch(vColIndex) {
     100        switch (vColIndex) {
    101101            case 0: renderTagName((TagModel) value); break;
    102102            case 1: renderTagValue((TagModel) value); break;
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r18801 r19050  
    6060     * Creates a new tag editor model. Internally allocates two selection models
    6161     * for row selection and column selection.
    62      *
     62     * <p>
    6363     * To create a {@link javax.swing.JTable} with this model:
    6464     * <pre>
     
    157157        TagModel tag = get(row);
    158158        if (tag != null) {
    159             switch(col) {
     159            switch (col) {
    160160            case 0:
    161161                updateTagName(tag, (String) value);
     
    219219    /**
    220220     * adds a tag given by a name/value pair to the tag editor model.
    221      *
     221     * <p>
    222222     * If there is no tag with name <code>name</code> yet, a new {@link TagModel} is created
    223223     * and append to this model.
    224      *
     224     * <p>
    225225     * If there is a tag with name <code>name</code>, <code>value</code> is merged to the list
    226226     * of values for this tag.
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java

    r18283 r19050  
    99import java.awt.Window;
    1010import java.awt.event.ActionEvent;
     11import java.awt.event.InputEvent;
    1112import java.awt.event.KeyEvent;
    1213import java.beans.PropertyChangeEvent;
     
    134135     * Action to be run when the user invokes a delete action on the table, for
    135136     * instance by pressing DEL.
    136      *
     137     * <p>
    137138     * Depending on the shape on the current selection the action deletes individual
    138139     * values or entire tags from the model.
    139      *
     140     * <p>
    140141     * If the current selection consists of cells in the second column only, the keys of
    141142     * the selected tags are set to the empty string.
    142      *
     143     * <p>
    143144     * If the current selection consists of cell in the third column only, the values of the
    144145     * selected tags are set to the empty string.
    145      *
     146     * <p>
    146147     *  If the current selection consists of cells in the second and the third column,
    147148     *  the selected tags are removed from the model.
    148      *
     149     * <p>
    149150     *  This action listens to the table selection. It becomes enabled when the selection
    150151     *  is non-empty, otherwise it is disabled.
    151      *
    152      *
    153152     */
    154153    class DeleteAction extends AbstractAction implements ListSelectionListener {
     
    190189            if (!isEnabled())
    191190                return;
    192             switch(getSelectedColumnCount()) {
     191            switch (getSelectedColumnCount()) {
    193192            case 1:
    194193                if (getSelectedColumn() == 0) {
     
    351350        addAction = new AddAction();
    352351        getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)
    353         .put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, KeyEvent.CTRL_DOWN_MASK), "addTag");
     352            .put(KeyStroke.getKeyStroke(KeyEvent.VK_ADD, InputEvent.CTRL_DOWN_MASK), "addTag");
    354353        getActionMap().put("addTag", addAction);
    355354
     
    566565     * This is a custom implementation of the CellEditorRemover used in JTable
    567566     * to handle the client property <code>terminateEditOnFocusLost</code>.
    568      *
     567     * <p>
    569568     * This implementation also checks whether focus is transferred to one of a list
    570569     * of dedicated components, see {@link TagTable#doNotStopCellEditingWhenFocused}.
  • trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompEvent.java

    r18801 r19050  
    8080    public String paramString() {
    8181        String typeStr;
    82         switch(id) {
     82        switch (id) {
    8383            case AUTOCOMP_BEFORE:
    8484                typeStr = "AUTOCOMP_BEFORE";
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetMenu.java

    r18871 r19050  
    3838    public JMenu menu; // set by TaggingPresets
    3939
    40     private static class PresetTextComparator implements Comparator<JMenuItem>, Serializable {
     40    private static final class PresetTextComparator implements Comparator<JMenuItem>, Serializable {
    4141        private static final long serialVersionUID = 1L;
    4242        @Override
  • trunk/src/org/openstreetmap/josm/gui/tagging/presets/TaggingPresetSelector.java

    r18824 r19050  
    7575    private final transient PresetClassifications classifications = new PresetClassifications();
    7676
    77     private static class ResultListCellRenderer implements ListCellRenderer<TaggingPreset> {
     77    private static final class ResultListCellRenderer implements ListCellRenderer<TaggingPreset> {
    7878        private final DefaultListCellRenderer def = new DefaultListCellRenderer();
    7979        @Override
Note: See TracChangeset for help on using the changeset viewer.