// FIXME Remove once bug 314091 is resolved
Bundle bundle = FrameworkUtil.getBundle(getClass());
BundleContext context = bundle.getBundleContext();
ServiceReference reference = context.getServiceReference(ThemeManager.class.getName());
ThemeManager themeManager = (ThemeManager) context.getService(reference);
List<Theme> themes = themeManager.getAvailableThemes();
if (themes.size() > 0) {
MApplication application = getApplication();
MCommand switchThemeCommand = null;
for (MCommand cmd : application.getCommands()) {