Changeset 36492 in osm


Ignore:
Timestamp:
2026-02-16T13:56:08+01:00 (39 hours ago)
Author:
stoecker
Message:

fix compiler error and warnings

Location:
applications/editors/josm/plugins/surveyor/src/org
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/surveyor/src/org/dinopolis/util/io/Tokenizer.java

    r34591 r36492  
    251251//----------------------------------------------------------------------
    252252/**
    253  * Get the first delimiter character.
    254  *
    255  * @return the delimiter character.
    256  * @deprecated use the getDelimiters() method now
    257  */
    258   public int getDelimiter()
    259   {
    260     return(delimiters_.charAt(0));
    261   }
    262 
    263 //----------------------------------------------------------------------
    264 /**
    265253 * Set the delimiter characters. All characters in the delimiters are
    266254 * used as delimiter.
     
    281269  public String getDelimiters()
    282270  {
    283     return(delimiters_);
     271    return delimiters_;
    284272  }
    285273
     
    303291  public int getEscapeChar()
    304292  {
    305     return(escapeChar_);
     293    return escapeChar_;
    306294  }
    307295
     
    327315  public boolean respectEscapedCharacters()
    328316  {
    329     return(respectEscapedChars_);
     317    return respectEscapedChars_;
    330318  }
    331319
     
    338326  public int getQuoteChar()
    339327  {
    340     return (quoteChar_);
     328    return quoteChar_;
    341329  }
    342330
     
    373361  public boolean respectQuotedWords()
    374362  {
    375     return(respectQuotedWords_);
     363    return respectQuotedWords_;
    376364  }
    377365
     
    402390  public boolean isEolSignificant()
    403391  {
    404     return(eolIsSignificant_);
     392    return eolIsSignificant_;
    405393  }
    406394
     
    414402  public int getLineNumber()
    415403  {
    416     return(lineCount_);
     404    return lineCount_;
    417405  }
    418406
     
    426414  public String getWord()
    427415  {
    428     return(buffer_.toString());
     416    return buffer_.toString();
    429417  }
    430418
     
    437425  public int getLastToken()
    438426  {
    439     return(lastToken_);
     427    return lastToken_;
    440428  }
    441429
     
    454442        // check for escape mode:
    455443    if(escapeMode_)
    456       return(false);
    457 
    458     return(delimiters_.indexOf(character) >= 0);
     444      return false;
     445
     446    return delimiters_.indexOf(character) >= 0;
    459447  }
    460448
     
    472460  {
    473461    if(!respectQuotedWords_)
    474       return(false);
     462      return false;
    475463
    476464        // check for escape mode:
    477465    if(escapeMode_)
    478       return(false);
    479 
    480     return(character == quoteChar_);
     466      return false;
     467
     468    return character == quoteChar_;
    481469  }
    482470
     
    493481  {
    494482    if(!respectEscapedChars_)
    495       return(false);
     483      return false;
    496484
    497485        // check for escape mode:
    498486    if(escapeMode_)
    499       return(false);
    500 
    501     return(character == escapeChar_);
     487      return false;
     488
     489    return character == escapeChar_;
    502490  }
    503491
     
    520508      if(character == '\n')   // add line count, even if in escape mode!
    521509        lineCount_++;
    522       return(false);
     510      return false;
    523511    }
    524512    if(character == -1)
    525513      eofReached_ = true;
    526514
    527     return((character=='\n') || (character=='\r') || (character == -1));
     515    return (character=='\n') || (character=='\r') || (character == -1);
    528516  }
    529517
     
    584572      next_char = readNextChar();
    585573    }
    586     return(next_char);
     574    return next_char;
    587575  }
    588576
     
    609597    {
    610598      lastToken_ = EOF;
    611       return(EOF);
     599      return EOF;
    612600    }
    613601
     
    619607      {
    620608        lastToken_ = EOL;
    621         return(EOL);
     609        return EOL;
    622610      }
    623611      else
    624612      {
    625613        lastToken_ = DELIMITER;
    626         return(DELIMITER);
     614        return DELIMITER;
    627615      }
    628616    }
     
    632620    {
    633621      lastToken_ = DELIMITER;
    634       return(DELIMITER);
     622      return DELIMITER;
    635623    }
    636624
     
    644632        {
    645633          lastToken_ = ERROR;
    646           return(ERROR);
     634          return ERROR;
    647635        }
    648636        else
     
    651639          {
    652640            lastToken_ = QUOTED_WORD;
    653             return(QUOTED_WORD);
     641            return QUOTED_WORD;
    654642          }
    655643
     
    669657        reader_.unread(next_char);
    670658        lastToken_ = WORD;
    671         return(WORD);
     659        return WORD;
    672660      }
    673661    }
     
    685673  {
    686674    if(lastToken_ == EOF)
    687       return(false);
     675      return false;
    688676
    689677    if((lastToken_ == EOL) || (lastToken_ == NOT_STARTED))
     
    691679      int next_char = readNextChar();
    692680      if(next_char == -1)
    693         return(false);
     681        return false;
    694682
    695683      reader_.unread(next_char);
    696684    }
    697     return(true);
     685    return true;
    698686  }
    699687
     
    735723        case Tokenizer.EOF:
    736724          list.add(word);
    737           return(list);
     725          return list;
    738726        default:
    739727          System.err.println("Unknown Token: "+token);
     
    741729      token = nextToken();
    742730    }
    743 //    return(list);
     731//    return list;
    744732  }
    745733
     
    784772          new_list.add(value);
    785773      }
    786       return(new_list);
     774      return new_list;
    787775    }
    788776}
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/AutoSaveGpsLayerTimerTask.java

    r34591 r36492  
    3636     * Constructor using the file to write to and the name of the layer.
    3737     * @param filename the file to write to.
    38      * @param gpsLayername the name of the layer holding the gps data.
     38     * @param layerName the name of the layer holding the gps data.
    3939     */
    4040    public AutoSaveGpsLayerTimerTask(String filename, String layerName) {
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/ButtonDescription.java

    r35262 r36492  
    4848   
    4949    /**
    50      * @param actions a list of actions to be performed.
     50     * @param label label of the button
     51     * @param hotkey Hotkey for the button action
     52     * @param iconName name of the icon to display
     53     * @param buttonAction the actions to be performed.
    5154     * @param type if <code>null</code> {@link ButtonType#SINGLE} is used.
    5255     */
     
    5659
    5760    /**
    58      * @param actions a list of actions to be performed.
     61     * @param label label of the button
     62     * @param hotkey Hotkey for the button action
     63     * @param iconName name of the icon to display
     64     * @param actionDescription the action to be performed.
    5965     * @param type if <code>null</code> {@link ButtonType#SINGLE} is used.
    6066     */
     
    6571    /**
    6672     * Helper method to create a list from one element.
    67      * @param buttonActionClassName the action's class name.
     73     * @param actionDescription the action's class name.
    6874     * @return a list holding one ButtonActionDescription element.
    6975     */
     
    7581
    7682    /**
     83     * @param label label of the button
     84     * @param hotkey Hotkey for the button action
     85     * @param iconName name of the icon to display
    7786     * @param actions a list of actions to be performed.
    7887     * @param type if <code>null</code> {@link ButtonType#SINGLE} is used.
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/MetaAction.java

    r34591 r36492  
    6767        // toggle on/off
    6868        Boolean selected = (Boolean) getValue(ActionConstants.SELECTED_KEY);
    69         if (selected == null || selected == Boolean.FALSE) {
    70             selected = Boolean.TRUE;
     69        if (selected == null || selected == false) {
     70            selected = true;
    7171        } else {
    72             selected = Boolean.FALSE;
     72            selected = false;
    7373        }
    7474        putValue(ActionConstants.SELECTED_KEY, selected);
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/SurveyorShowAction.java

    r35583 r36492  
    3333
    3434/**
     35 * Show Surveyor menu
    3536 * @author cdaller
    36  *
    3737 */
    3838public class SurveyorShowAction extends JosmAction {
     
    7777                public void actionPerformed(ActionEvent e) {
    7878                    if (MainApplication.getMap() != null && MainApplication.getMap().mapView != null) {
    79                         MainApplication.getMap().mapView.zoomToFactor(1/2);
     79                        MainApplication.getMap().mapView.zoomToFactor(0.5);
    8080                    }
    8181                }
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/AbstractSurveyorAction.java

    r34591 r36492  
    77
    88/**
     9 * Abstract base action
    910 * @author cdaller
    10  *
    1111 */
    1212public abstract class AbstractSurveyorAction implements SurveyorAction {
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/BeepAction.java

    r34591 r36492  
    1111
    1212/**
     13 * Action to issue a Beep
    1314 * @author cdaller
    14  *
    1515 */
    1616public class BeepAction implements SurveyorAction {
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/ConsolePrinterAction.java

    r34591 r36492  
    66
    77/**
     8 * Action to print coordinates to standard output
    89 * @author cdaller
    9  *
    1010 */
    1111public class ConsolePrinterAction extends AbstractSurveyorAction {
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/SystemExecuteAction.java

    r34591 r36492  
    1212
    1313/**
     14 * Action class to execute GPS system command
    1415 * @author cdaller
    15  *
    1616 */
    1717public class SystemExecuteAction extends AbstractSurveyorAction {
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/TaggingPresetAction.java

    r34591 r36492  
    1313
    1414/**
     15 * Tagging action
    1516 * @author cdaller
    16  *
    1717 */
    1818public class TaggingPresetAction implements SurveyorAction {
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/gui/DialogClosingThread.java

    r34591 r36492  
    1515
    1616/**
     17 * Thread for dialog closing
    1718 * @author cdaller
    18  *
    1919 */
    2020public class DialogClosingThread extends Thread implements KeyListener, DocumentListener {
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/gui/WaypointDialog.java

    r35253 r36492  
    88
    99/**
     10 * Dialog for waypoints
    1011 * @author cdaller
    11  *
    1212 */
    1313public class WaypointDialog {
  • applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/util/LayerUtil.java

    r34591 r36492  
    66
    77/**
     8 * Utility class for layer handling
    89 * @author cdaller
    9  *
    1010 */
    1111public final class LayerUtil {
Note: See TracChangeset for help on using the changeset viewer.