Commit caf1a6d2 authored by Mikhail Filippov's avatar Mikhail Filippov Committed by Vladimir.Orlov
Browse files

Add fallback to findURL icon by class if findURL by ClassLoader couldn't found icon.

(cherry picked from commit 6acb7660)

Review: https://upsource.jetbrains.com/IDEA/review/IDEA-CR-33799

(cherry picked from commit d7cb5308)
parent d004f5c8
Branches unavailable Tags unavailable
Showing with 4 additions and 0 deletions
+4 -0
......@@ -194,6 +194,10 @@ public final class IconLoader {
if (isReflectivePath(path)) return getReflectiveIcon(path, classLoader);
URL myURL = findURL(path, classLoader);
// Some plugins use findIcon("icon.png",IconContainer.class)
if (myURL == null) {
myURL = findURL(path, aClass);
}
if (myURL == null) {
if (strict) throw new RuntimeException("Can't find icon in '" + path + "' near " + aClass);
return null;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment