mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Help - Added a task to find unused help images; fixed showing in-memory
images in help
This commit is contained in:
parent
e8dcb3d0c4
commit
49436c44a9
12 changed files with 275 additions and 131 deletions
|
@ -400,14 +400,18 @@ public class ResourceManager {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the name of this icon. If icon is an ImageIcon, its getDescription() is called to
|
||||
* get the name
|
||||
* Get the name of this icon. The value is usually going to be the URL from which the icon
|
||||
* was loaded
|
||||
*
|
||||
* @param icon the icon for which the name is desired
|
||||
* @return the name
|
||||
* @return the name
|
||||
*/
|
||||
public static String getIconName(Icon icon) {
|
||||
String iconName = icon.toString();
|
||||
|
||||
if (icon instanceof FileBasedIcon) {
|
||||
return ((FileBasedIcon) icon).getFilename();
|
||||
}
|
||||
if (icon instanceof ImageIcon) {
|
||||
iconName = ((ImageIcon) icon).getDescription();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue