Modify

Opened 7 years ago

Closed 7 years ago

#7370 closed enhancement (fixed)

[Patch] Refactor Command.getDescription

Reported by: simon04 Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: refactoring Cc:

Description

As discussed in the course of #7327, the Command.getDescription method should be refactored:

Currently each Command must provide a JLabel getDescription() method. I'd consider it better to request String getDescriptionText() and ImageIcon getDescriptionIcon() instead as this allows to use the data in other places as well without doing quirks.

See the attached patch for the refactoring. Especially, take a look at the changes in PseudoCommand, which allow a smooth transition (as plugins also need to be updated).

Attachments (1)

7370.patch (38.5 KB) - added by simon04 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by simon04

Attachment: 7370.patch added

comment:1 Changed 7 years ago by bastiK

Looks good.

comment:2 Changed 7 years ago by simon04

Resolution: fixed
Status: newclosed

In 4918/josm:

fix #7370 - Refactor Command.getDescription

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.