in src/main/java/idea/plugin/psiviewer/util/Helpers.java [45:69]
public static Icon getIcon(String path)
{
URL url = Helpers.class.getResource(path); // pull icon from jar first
if (url == null)
{
try
{
url = new URL(path); // now try from a url
}
catch (MalformedURLException e)
{
LOG.debug("Could not find icon " + path);
return DEFAULT_ICON;
}
}
Icon icon = new ImageIcon(url);
if (icon.getIconWidth() < 0 || icon.getIconHeight() < 0)
{
LOG.debug("Bad icon data " + path);
return DEFAULT_ICON;
}
return icon;
}