Get an icon decoration which can be used when presenting a small icon for the URL in a resource explorer tree.
For example if the URL ends in ".xml", this utility returns a small XML-symbol image.
This is only implemented in the Swing-based application.
resource - The resource URL.
An icon decoration or null.
java.lang.Object loadIcon(java.net.URL resource)
Load an icon from a specified URL resource location.
When running on a retina or HiDPI display, the application will try to load a corresponding image for the current display.
Also when running in a dark theme the dark icon will be loaded if available.
This topic explains how the application tries to load an image based on the initial given image location and on the display type:
For the Swing-based application, the returned icon is an instance of javax.swing.ImageIcon.
For the Eclipse-based plugin the returned icon is an instance of org.eclipse.jface.resource.ImageDescriptor.
An example of loading an icon from Oxygen's existing set of icons: