Package org.python.pydev.core.cache

Examples of org.python.pydev.core.cache.PyPreferencesCache


    /**
     * @return a cache for the preferences.
     */
    private PyPreferencesCache getCache() {
        if (cache == null) {
            cache = new PyPreferencesCache(PydevPlugin.getDefault().getPreferenceStore());
        }
        return cache;
    }
View Full Code Here


    /**
     * Not singleton (each pyedit may force to use tabs or not).
     */
    public DefaultIndentPrefs() {
        PyPreferencesCache c = getCache();
        useSpaces = c.getBoolean(PydevEditorPrefs.SUBSTITUTE_TABS);
        tabWidth = c.getInt(PydevEditorPrefs.TAB_WIDTH, 4);
    }
View Full Code Here

        useSpaces = c.getBoolean(PydevEditorPrefs.SUBSTITUTE_TABS);
        tabWidth = c.getInt(PydevEditorPrefs.TAB_WIDTH, 4);
    }

    public boolean getUseSpaces(boolean considerForceTabs) {
        PyPreferencesCache c = getCache();
        if (useSpaces != c.getBoolean(PydevEditorPrefs.SUBSTITUTE_TABS)) {
            useSpaces = c.getBoolean(PydevEditorPrefs.SUBSTITUTE_TABS);
            regenerateIndentString();
        }
        if (considerForceTabs && getForceTabs()) {
            return false; //forcing tabs.
        }
View Full Code Here

        }
        return w;
    }

    public int getTabWidth() {
        PyPreferencesCache c = getCache();
        if (tabWidth != c.getInt(PydevEditorPrefs.TAB_WIDTH, 4)) {
            tabWidth = c.getInt(PydevEditorPrefs.TAB_WIDTH, 4);
            regenerateIndentString();
        }
        return tabWidth;
    }
View Full Code Here

        }
        return tabWidth;
    }

    public void regenerateIndentString() {
        PyPreferencesCache c = getCache();
        c.clear(PydevEditorPrefs.TAB_WIDTH);
        c.clear(PydevEditorPrefs.SUBSTITUTE_TABS);
        indentString = super.getIndentationString();
    }
View Full Code Here

    public void init(IWorkbench workbench) {
    }

    public static boolean useMarkOccurrences() {
        if (cache == null) {
            cache = new PyPreferencesCache(RefactoringPlugin.getDefault().getPreferenceStore());
        }
        return cache.getBoolean(USE_MARK_OCCURRENCES);
    }
View Full Code Here

        return cache.getBoolean(USE_MARK_OCCURRENCES);
    }

    public static boolean useMarkOccurrencesInStrings() {
        if (cache == null) {
            cache = new PyPreferencesCache(RefactoringPlugin.getDefault().getPreferenceStore());
        }
        return cache.getBoolean(USE_MARK_OCCURRENCES_IN_STRINGS);
    }
View Full Code Here

TOP

Related Classes of org.python.pydev.core.cache.PyPreferencesCache

Copyright © 2018 www.massapicom. 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.