@Override public void addAppThemeDescriptors() throws QuickFixException { DefDescriptor<? extends BaseComponentDef> desc = getLoadingApplicationDescriptor(); if (desc != null && desc.getDefType() == DefType.APPLICATION) { try { // the app themes conceptually precedes themes explicitly added to the context. // this is important for the "last declared theme wins" contract themes.prependAll(((ApplicationDef) desc.getDef()).getThemeDescriptors()); } catch (QuickFixException qfe) { // either the app or a dependency is invalid, nothing we can do about getting the themes in // that case. } } }
@Override public void appendThemeDescriptor(DefDescriptor<ThemeDef> themeDescriptor) throws QuickFixException { themes.append(themeDescriptor); }