Google Summer of Code/2016/AcceptedProjects/JOSM core
During Google Summer of Code 2016, Michael Zangl worked on the core of JOSM.
The main goals of the project were to make the core mode modular and allow for further extensions of JOSM. During the project, the map rendering and bug report systems got big updates.
During the project, several components of JOSM were reworked. Only a few of the changes are visible from a user perspective. The primary focus was on restructuring the core so that it gets more robust and to ease the development of plugins.
A new bug report dialog has been created. The dialog supports ignoring a specific kind of exception and it allows for JOSM to continue working even if there is a problem with the paint code.
To get more detailed bug reports, the bug report system was enhanced to support longer status report texts and to allow components to add their own debug data if an exception occurs. Long bug report texts were truncated after some lines. This missed important information.
To access the layers, one had to access the main view component and get the layers from there. There were synchronization issues with this and getting notified of layer changes was difficult. There was no ability to create multiple layer lists or to use layers outside that main view.
A layer manager was introduced. There is one global instance for the main view but there may be multiple instances to create multiple views. This may later be used to create split views. The access is synchronized correctly.
The imagery paint code has been improved to support multiple map views and to reproject the images correctly when displayed in an other world projection. Image processing is now done in parallel. The code is prepared to support continuous projections.
JOSM used a custom internal copy/paste buffer. This made it impossible to paste between program instances. It was changed to the normal Swing Copy+Paste mechanism. Now the user can copy between program instances.
Java 8 migration
JOSM dropped Java 7 support and switched to Java 8 during the GSoC period. The new code is written in Java 8 and make use of the new possibilities like lambdas and streams.
I will update it with the current progress and the planned features for the next few weeks regularely. . The best place to discuss the changes is there.
May 23 - May 29
Move the layer management to a new class called MainLayerManager and let MapView proxy all calls. Deprecate all layer methods of MapView. Add a new static instance of the LayerManager for the main MapView. Change the LayerListDialog to use it. #12863 #11838 #12882
Add basic bug reporting code that adds more information about the bug in try/catch blocks. #12805
May 30 - June 5
Migrate all of JOSM to use the new MapView interface. #11838
Switch to Java8 on the way. Java 8 has to wait a few more weeks. Patches are delayed until then.
June 6 - June 12
Start implementing the new map view coordinate conversion. #12889 #12934
Migrate to the new LayerChangeListener interface. #12955, #12943
Fix some bugs that were found due to the new listener validation: #12932, #12941, #12936
Investigate use of Java Drag+Drop / CCP.
June 13 - June 19
Implement a way to set up the Test environment faster (JOSMTestRules). #12949 #12977 #13005
This required us to move the code to create the map frame, which in return triggered some problems with plugins: #12964, #12965, #12974, #12976
Do a fist draft of a CCP implementation - Copy + Paste between JOSM instances would be supported. #12478
Use the new coordinate conversion in more places: #12959, #12975
June 20 - June 26
Get all test cases running again, use the JOSMTestRules if required. Make tests work in all time zones. #13017 #13018 #12974 #13033 #13037 #13045 #13047 #13048
More work on cleaning up main window. #12925 #13001 #13009 #13019 #13029 #13046 #13024 #13038 #13049 #13003 #12941
Code cleanup and fixing duplicate listeners. #13023 #13013 #12999 #13079
June 27 - July 3
Chreate a first draft of a new paint() mechanism for the mapView where the state is passed on to the paint method. #13072 #13058
Small bug fixes that make the code more robust. #13078 #13040 #13058 #13102
Fix more time zone issues #13071
July 4 - July 10
(few new tickets this week due to the JOSM release cycle).
Implement a new MemoryManager so that there can be multiple tile caches per layer.
Work out a way to separate TileCache from the imagery layer.
Fix some tests #13163 #13079
July 11 - July 17
Start separating TileCache from the imagery layer so that it can be re-used. #13159 #13163
Finish the Copy+Paste patch. It has gotten quite big.
July 18 - July 24
More work on separating the tile cache from the imagery layer. The layer settings have been moved to a new class. #13169 #13171 #13174 #13178 #13172 #12910
Since JOSM switched to Java 8, the Java 8 patches could be applied. #13190 #12905 #12478
Java 8 migration of presets code and predicates. #13191 #13192
FImplement correct copy+paste for relation members. #12565 #11114 #13199
Fix an IU issues where buttons were hidden. #13198
Make the map view listen to layer invalidations. #13175
July 25 - July 31
Extract tile source coordinate conversion to a new class. #13210 #13241 #13255 #13222
The new bug report dialog was added. #13193
More Java 8 migrations. #13206 #13239 #13240
August 1 - August 7
Fix tag paste conflict management. #12900, #13271
Update projection code to support continuous projections and fix an old 180°-imagery bug. #13287 #12681
August 8 - August 14
Split imagery layer drawing to support multiple map views. #13386
Add a new paste at source position action. #13290
Switch the map paint code to double coordinates. #13306
August 15 - August 21
Add a bug report queue to prevent multiple bug report windows form opening at once. #13352
The main switch of the tile source layers to the new paint system.
Final code cleanup, fixing multiple small bugs.
Clean up MapView by using a temporary layer for the playHeadMarker. #12804