MCPcopy
hub / github.com/arduino/Arduino / getThemeResource

Method getThemeResource

app/src/processing/app/Theme.java:653–668  ·  view source on GitHub ↗

@param name @return

(String name)

Source from the content-addressed store, hash-verified

651 * @return
652 */
653 static public Resource getThemeResource(String name) {
654 File defaultfile = getDefaultFile(name);
655 Resource resource = new Resource(Resource.PRIORITY_DEFAULT, name, getUrl(defaultfile), defaultfile);
656
657 ZipEntry themeZipEntry = getThemeZipEntry(name);
658 if (themeZipEntry != null) {
659 resource = new Resource(Resource.PRIORITY_USER_ZIP, name, getUrl(themeZipEntry), zipTheme, themeZipEntry).withParent(resource);
660 }
661
662 File themeFile = getThemeFile(name);
663 if (themeFile != null) {
664 resource = new Resource(Resource.PRIORITY_USER_FILE, name, getUrl(themeFile), themeFile).withParent(resource);
665 }
666
667 return resource;
668 }
669
670 static private File getThemeFile(String name) {
671 File sketchBookThemeFolder = new File(BaseNoGui.getSketchbookFolder(), THEME_DIR);

Callers 4

getLibImageMethod · 0.95
loadFromResourceMethod · 0.95
setThemeMethod · 0.80

Calls 5

getDefaultFileMethod · 0.95
getUrlMethod · 0.95
getThemeZipEntryMethod · 0.95
getThemeFileMethod · 0.95
withParentMethod · 0.80

Tested by

no test coverage detected