Changeset 36492 in osm
- Timestamp:
- 2026-02-16T13:56:08+01:00 (39 hours ago)
- Location:
- applications/editors/josm/plugins/surveyor/src/org
- Files:
-
- 13 edited
-
dinopolis/util/io/Tokenizer.java (modified) (26 diffs)
-
openstreetmap/josm/plugins/surveyor/AutoSaveGpsLayerTimerTask.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/ButtonDescription.java (modified) (4 diffs)
-
openstreetmap/josm/plugins/surveyor/MetaAction.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/SurveyorShowAction.java (modified) (2 diffs)
-
openstreetmap/josm/plugins/surveyor/action/AbstractSurveyorAction.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/action/BeepAction.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/action/ConsolePrinterAction.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/action/SystemExecuteAction.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/action/TaggingPresetAction.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/action/gui/DialogClosingThread.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/action/gui/WaypointDialog.java (modified) (1 diff)
-
openstreetmap/josm/plugins/surveyor/util/LayerUtil.java (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/surveyor/src/org/dinopolis/util/io/Tokenizer.java
r34591 r36492 251 251 //---------------------------------------------------------------------- 252 252 /** 253 * Get the first delimiter character.254 *255 * @return the delimiter character.256 * @deprecated use the getDelimiters() method now257 */258 public int getDelimiter()259 {260 return(delimiters_.charAt(0));261 }262 263 //----------------------------------------------------------------------264 /**265 253 * Set the delimiter characters. All characters in the delimiters are 266 254 * used as delimiter. … … 281 269 public String getDelimiters() 282 270 { 283 return (delimiters_);271 return delimiters_; 284 272 } 285 273 … … 303 291 public int getEscapeChar() 304 292 { 305 return (escapeChar_);293 return escapeChar_; 306 294 } 307 295 … … 327 315 public boolean respectEscapedCharacters() 328 316 { 329 return (respectEscapedChars_);317 return respectEscapedChars_; 330 318 } 331 319 … … 338 326 public int getQuoteChar() 339 327 { 340 return (quoteChar_);328 return quoteChar_; 341 329 } 342 330 … … 373 361 public boolean respectQuotedWords() 374 362 { 375 return (respectQuotedWords_);363 return respectQuotedWords_; 376 364 } 377 365 … … 402 390 public boolean isEolSignificant() 403 391 { 404 return (eolIsSignificant_);392 return eolIsSignificant_; 405 393 } 406 394 … … 414 402 public int getLineNumber() 415 403 { 416 return (lineCount_);404 return lineCount_; 417 405 } 418 406 … … 426 414 public String getWord() 427 415 { 428 return (buffer_.toString());416 return buffer_.toString(); 429 417 } 430 418 … … 437 425 public int getLastToken() 438 426 { 439 return (lastToken_);427 return lastToken_; 440 428 } 441 429 … … 454 442 // check for escape mode: 455 443 if(escapeMode_) 456 return (false);457 458 return (delimiters_.indexOf(character) >= 0);444 return false; 445 446 return delimiters_.indexOf(character) >= 0; 459 447 } 460 448 … … 472 460 { 473 461 if(!respectQuotedWords_) 474 return (false);462 return false; 475 463 476 464 // check for escape mode: 477 465 if(escapeMode_) 478 return (false);479 480 return (character == quoteChar_);466 return false; 467 468 return character == quoteChar_; 481 469 } 482 470 … … 493 481 { 494 482 if(!respectEscapedChars_) 495 return (false);483 return false; 496 484 497 485 // check for escape mode: 498 486 if(escapeMode_) 499 return (false);500 501 return (character == escapeChar_);487 return false; 488 489 return character == escapeChar_; 502 490 } 503 491 … … 520 508 if(character == '\n') // add line count, even if in escape mode! 521 509 lineCount_++; 522 return (false);510 return false; 523 511 } 524 512 if(character == -1) 525 513 eofReached_ = true; 526 514 527 return ((character=='\n') || (character=='\r') || (character == -1));515 return (character=='\n') || (character=='\r') || (character == -1); 528 516 } 529 517 … … 584 572 next_char = readNextChar(); 585 573 } 586 return (next_char);574 return next_char; 587 575 } 588 576 … … 609 597 { 610 598 lastToken_ = EOF; 611 return (EOF);599 return EOF; 612 600 } 613 601 … … 619 607 { 620 608 lastToken_ = EOL; 621 return (EOL);609 return EOL; 622 610 } 623 611 else 624 612 { 625 613 lastToken_ = DELIMITER; 626 return (DELIMITER);614 return DELIMITER; 627 615 } 628 616 } … … 632 620 { 633 621 lastToken_ = DELIMITER; 634 return (DELIMITER);622 return DELIMITER; 635 623 } 636 624 … … 644 632 { 645 633 lastToken_ = ERROR; 646 return (ERROR);634 return ERROR; 647 635 } 648 636 else … … 651 639 { 652 640 lastToken_ = QUOTED_WORD; 653 return (QUOTED_WORD);641 return QUOTED_WORD; 654 642 } 655 643 … … 669 657 reader_.unread(next_char); 670 658 lastToken_ = WORD; 671 return (WORD);659 return WORD; 672 660 } 673 661 } … … 685 673 { 686 674 if(lastToken_ == EOF) 687 return (false);675 return false; 688 676 689 677 if((lastToken_ == EOL) || (lastToken_ == NOT_STARTED)) … … 691 679 int next_char = readNextChar(); 692 680 if(next_char == -1) 693 return (false);681 return false; 694 682 695 683 reader_.unread(next_char); 696 684 } 697 return (true);685 return true; 698 686 } 699 687 … … 735 723 case Tokenizer.EOF: 736 724 list.add(word); 737 return (list);725 return list; 738 726 default: 739 727 System.err.println("Unknown Token: "+token); … … 741 729 token = nextToken(); 742 730 } 743 // return (list);731 // return list; 744 732 } 745 733 … … 784 772 new_list.add(value); 785 773 } 786 return (new_list);774 return new_list; 787 775 } 788 776 } -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/AutoSaveGpsLayerTimerTask.java
r34591 r36492 36 36 * Constructor using the file to write to and the name of the layer. 37 37 * @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. 39 39 */ 40 40 public AutoSaveGpsLayerTimerTask(String filename, String layerName) { -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/ButtonDescription.java
r35262 r36492 48 48 49 49 /** 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. 51 54 * @param type if <code>null</code> {@link ButtonType#SINGLE} is used. 52 55 */ … … 56 59 57 60 /** 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. 59 65 * @param type if <code>null</code> {@link ButtonType#SINGLE} is used. 60 66 */ … … 65 71 /** 66 72 * Helper method to create a list from one element. 67 * @param buttonActionClassNamethe action's class name.73 * @param actionDescription the action's class name. 68 74 * @return a list holding one ButtonActionDescription element. 69 75 */ … … 75 81 76 82 /** 83 * @param label label of the button 84 * @param hotkey Hotkey for the button action 85 * @param iconName name of the icon to display 77 86 * @param actions a list of actions to be performed. 78 87 * @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 67 67 // toggle on/off 68 68 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; 71 71 } else { 72 selected = Boolean.FALSE;72 selected = false; 73 73 } 74 74 putValue(ActionConstants.SELECTED_KEY, selected); -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/SurveyorShowAction.java
r35583 r36492 33 33 34 34 /** 35 * Show Surveyor menu 35 36 * @author cdaller 36 *37 37 */ 38 38 public class SurveyorShowAction extends JosmAction { … … 77 77 public void actionPerformed(ActionEvent e) { 78 78 if (MainApplication.getMap() != null && MainApplication.getMap().mapView != null) { 79 MainApplication.getMap().mapView.zoomToFactor( 1/2);79 MainApplication.getMap().mapView.zoomToFactor(0.5); 80 80 } 81 81 } -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/AbstractSurveyorAction.java
r34591 r36492 7 7 8 8 /** 9 * Abstract base action 9 10 * @author cdaller 10 *11 11 */ 12 12 public abstract class AbstractSurveyorAction implements SurveyorAction { -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/BeepAction.java
r34591 r36492 11 11 12 12 /** 13 * Action to issue a Beep 13 14 * @author cdaller 14 *15 15 */ 16 16 public class BeepAction implements SurveyorAction { -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/ConsolePrinterAction.java
r34591 r36492 6 6 7 7 /** 8 * Action to print coordinates to standard output 8 9 * @author cdaller 9 *10 10 */ 11 11 public class ConsolePrinterAction extends AbstractSurveyorAction { -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/SystemExecuteAction.java
r34591 r36492 12 12 13 13 /** 14 * Action class to execute GPS system command 14 15 * @author cdaller 15 *16 16 */ 17 17 public class SystemExecuteAction extends AbstractSurveyorAction { -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/TaggingPresetAction.java
r34591 r36492 13 13 14 14 /** 15 * Tagging action 15 16 * @author cdaller 16 *17 17 */ 18 18 public class TaggingPresetAction implements SurveyorAction { -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/gui/DialogClosingThread.java
r34591 r36492 15 15 16 16 /** 17 * Thread for dialog closing 17 18 * @author cdaller 18 *19 19 */ 20 20 public class DialogClosingThread extends Thread implements KeyListener, DocumentListener { -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/action/gui/WaypointDialog.java
r35253 r36492 8 8 9 9 /** 10 * Dialog for waypoints 10 11 * @author cdaller 11 *12 12 */ 13 13 public class WaypointDialog { -
applications/editors/josm/plugins/surveyor/src/org/openstreetmap/josm/plugins/surveyor/util/LayerUtil.java
r34591 r36492 6 6 7 7 /** 8 * Utility class for layer handling 8 9 * @author cdaller 9 *10 10 */ 11 11 public final class LayerUtil {
Note:
See TracChangeset
for help on using the changeset viewer.
