Modify

#7370 closed enhancement (fixed)

[Patch] Refactor Command.getDescription

Reported by: simon04 Owned by: team
Priority: normal 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 16 months ago.

Download all attachments as: .zip

Change History (3)

Changed 16 months ago by simon04

comment:1 Changed 16 months ago by bastiK

Looks good.

comment:2 Changed 16 months ago by simon04

  • Resolution set to fixed
  • Status changed from new to closed

In 4918/josm:

fix #7370 - Refactor Command.getDescription

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.