Modify

Opened 13 years ago

Closed 13 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 13 years ago.

Download all attachments as: .zip

Change History (3)

by simon04, 13 years ago

Attachment: 7370.patch added

comment:1 by bastiK, 13 years ago

Looks good.

comment:2 by simon04, 13 years ago

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. Next status will be 'reopened'.

Add Comment


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