- Timestamp:
- 2023-08-07T17:21:45+02:00 (16 months ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/event/DataSetListener.java
r9239 r18792 64 64 */ 65 65 void dataChanged(DataChangedEvent event); 66 67 /** 68 * Call each subevent of a {@link DataChangedEvent}. This should only ever be called from 69 * {@link #dataChanged(DataChangedEvent)}. 70 * @param event The event to call the individual elements from 71 * @implNote Implementors should decide what they want to do with {@code event == null}, 72 * {@code event.getEvents() == null}, and {@code event.getEvents().isEmpty()}. 73 * @since 18792 74 */ 75 default void dataChangedIndividualEvents(DataChangedEvent event) { 76 for (AbstractDatasetChangedEvent subEvent : event.getEvents()) { 77 if (subEvent instanceof PrimitivesAddedEvent) { 78 this.primitivesAdded((PrimitivesAddedEvent) subEvent); 79 } else if (subEvent instanceof PrimitivesRemovedEvent) { 80 this.primitivesRemoved((PrimitivesRemovedEvent) subEvent); 81 } else if (subEvent instanceof TagsChangedEvent) { 82 this.tagsChanged((TagsChangedEvent) subEvent); 83 } else if (subEvent instanceof NodeMovedEvent) { 84 this.nodeMoved((NodeMovedEvent) subEvent); 85 } else if (subEvent instanceof WayNodesChangedEvent) { 86 this.wayNodesChanged((WayNodesChangedEvent) subEvent); 87 } else if (subEvent instanceof RelationMembersChangedEvent) { 88 this.relationMembersChanged((RelationMembersChangedEvent) subEvent); 89 } else { 90 this.otherDatasetChange(subEvent); 91 } 92 } 93 } 66 94 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
r18715 r18792 736 736 @Override 737 737 public void dataChanged(DataChangedEvent event) { 738 initFromData(MainApplication.getLayerManager().getActiveData()); 738 // I have no clue how it would be empty, but just in case use the original code. 739 // {@code null} is used during initialization 740 if (event == null || Utils.isEmpty(event.getEvents())) { 741 initFromData(MainApplication.getLayerManager().getActiveData()); 742 } else { 743 dataChangedIndividualEvents(event); 744 } 739 745 } 740 746 -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r18790 r18792 649 649 650 650 private static void alertJavaUpdateRequired(Component parent, String plugin, int requiredVersion) { 651 final ButtonSpec[] options = new ButtonSpec[]{651 final ButtonSpec[] options = { 652 652 new ButtonSpec(tr("OK"), ImageProvider.get("ok"), tr("Click to close the dialog"), null), 653 653 new ButtonSpec(tr("Update Java"), ImageProvider.get("java"), tr("Update Java"), null)
Note:
See TracChangeset
for help on using the changeset viewer.