Examples of ThemeRegistryReader


Examples of org.eclipse.ui.internal.themes.ThemeRegistryReader

     * @return the theme registry
     */
    public IThemeRegistry getThemeRegistry() {
        if (themeRegistry == null) {
            themeRegistry = new ThemeRegistry();
            ThemeRegistryReader reader = new ThemeRegistryReader();
            reader.readThemes(Platform.getExtensionRegistry(),
                    themeRegistry);
        }
        return themeRegistry;
    }
View Full Code Here

Examples of org.eclipse.ui.internal.themes.ThemeRegistryReader

    /**
     * @param ext
     */
    private void loadFontDefinitions(IExtension ext) {
        ThemeRegistryReader reader = new ThemeRegistryReader();
        reader.setRegistry((ThemeRegistry) WorkbenchPlugin.getDefault()
                .getThemeRegistry());
        IConfigurationElement[] elements = ext.getConfigurationElements();
        for (int i = 0; i < elements.length; i++) {
      reader.readElement(elements[i]);
    }

        Collection fonts = reader.getFontDefinitions();
        FontDefinition[] fontDefs = (FontDefinition[]) fonts
                .toArray(new FontDefinition[fonts.size()]);
        ThemeElementHelper.populateRegistry(workbench.getThemeManager()
        .getTheme(IThemeManager.DEFAULT_THEME), fontDefs, PrefUtil
        .getInternalPreferenceStore());
View Full Code Here

Examples of org.eclipse.ui.internal.themes.ThemeRegistryReader

        .getInternalPreferenceStore());
    }

    //TODO: confirm
    private void loadThemes(IExtension ext) {
        ThemeRegistryReader reader = new ThemeRegistryReader();
        ThemeRegistry registry = (ThemeRegistry) WorkbenchPlugin.getDefault()
                .getThemeRegistry();
        reader.setRegistry(registry);
        IConfigurationElement[] elements = ext.getConfigurationElements();
        for (int i = 0; i < elements.length; i++) {
      reader.readElement(elements[i]);
    }

        Collection colors = reader.getColorDefinitions();
        ColorDefinition[] colorDefs = (ColorDefinition[]) colors
                .toArray(new ColorDefinition[colors.size()]);

        ITheme theme = workbench.getThemeManager().getTheme(
                IThemeManager.DEFAULT_THEME);
        ThemeElementHelper.populateRegistry(theme, colorDefs, PrefUtil
        .getInternalPreferenceStore());

        Collection fonts = reader.getFontDefinitions();
        FontDefinition[] fontDefs = (FontDefinition[]) fonts
                .toArray(new FontDefinition[fonts.size()]);
        ThemeElementHelper.populateRegistry(theme, fontDefs, PrefUtil
        .getInternalPreferenceStore());

        Map data = reader.getData();
        registry.addData(data);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.