Modify

Opened 23 months ago

#22756 new enhancement

Eliminate code duplication [patch]

Reported by: kolesar Owned by: kolesar
Priority: normal Milestone:
Component: Plugin ImproveWay Version:
Keywords: Cc:

Description

[ImproveWay](https://github.com/JOSM/improve-way) plugin used same code base as [ImproveWayAccuracy](https://josm.openstreetmap.de/wiki/Help/Action/ImproveWayAccuracy) mode. Half of code was unnecessary duplication with _old_ code. Moreover, both action in core and plugin needed to be maintained. Common code parts have diverged in years.

ImproveWay plugin was refactored to extend ImproveWayAccuracyAction class from core. This change eliminates code duplication. Also fixed NPE bugs.

ImproveWayAccuracyAction class at core needs some changes to be extendible, mostly protected instead of private. I have made a [pull request](https://github.com/JOSM/josm/pull/108) in core repository.

This refactored plugin uses a copy of base class and its modified helper class. This allows to use with current stable JOSM version. Revert commit 97a988332f0c3cc1001e5e1a06e27a080aa06561 after base class patch have been merged into core.

https://github.com/JOSM/improve-way/pull/5

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain kolesar.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from kolesar to the specified user.
Next status will be 'needinfo'. The owner will be changed from kolesar to kolesar.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from kolesar to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.