Opened 14 years ago

Last modified 14 years ago

#6535 closed enhancement

Enhancement [patch] Allow plugins to modify default name formatter — at Initial Version

Reported by: Don-vip Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: Cc:

Description

I want to create a plugin that changes some relations name format (add extra info in brackets at the end of the relation type, like the one added on boundaries with admin_level).
It seems currently not possible without patching JOSM (josm.gui.DefaultNameFormatter):

  • Change the prototype of getRelationTypeName() from private to protected
  • Allow JOSM to dynamically instantiate a DefaultNameFormatter sub-class, specified by a plugin or by the user in the preferences. For that, it it possible to modify the getInstance() method.

Please find attached a patch proposal.

Change History (1)

by Don-vip, 14 years ago

Attachment: patch.txt added
Note: See TracTickets for help on using tickets.