Examples of ColorAndStyleCache


Examples of org.python.pydev.ui.ColorAndStyleCache

        });
        debugItem.setText("Debug");
        tree.setMenu(menu);

        if (PydevPlugin.getDefault() != null) {
            colorAndStyleCache = new ColorAndStyleCache(PydevPrefs.getChainedPrefStore());
            prefListener = new IPropertyChangeListener() {

                public void propertyChange(PropertyChangeEvent event) {
                    if (tree != null) {
                        String property = event.getProperty();
View Full Code Here

Examples of org.python.pydev.ui.ColorAndStyleCache

    /**
     * @return a styled text that can be used to show code with the colors based on the color cache received.
     */
    public StyledText createStyledTextForCodePresentation(Composite parent) {
        styledText = new StyledText(parent, SWT.BORDER | SWT.READ_ONLY);
        this.backgroundColorCache = new ColorAndStyleCache(new PreferenceStore());
        this.colorCache = new ColorAndStyleCache(null);

        try {
            styledText.setFont(new Font(parent.getDisplay(), FontUtils.getFontData(IFontUsage.STYLED, true)));
        } catch (Throwable e) {
            //ignore
View Full Code Here

Examples of org.python.pydev.ui.ColorAndStyleCache

                editListeners = ExtensionHelper.getParticipants(ExtensionHelper.PYDEV_PYEDIT_LISTENER);
            }
            notifier.notifyEditorCreated();

            modelListeners = new ArrayList<IModelListener>();
            colorCache = new ColorAndStyleCache(PydevPrefs.getChainedPrefStore());

            editConfiguration = new PyEditConfiguration(colorCache, this, PydevPrefs.getChainedPrefStore());
            setSourceViewerConfiguration(editConfiguration);
            indentStrategy = editConfiguration.getPyAutoIndentStrategy();
            setRangeIndicator(new DefaultRangeIndicator()); // enables standard
View Full Code Here

Examples of org.python.pydev.ui.ColorAndStyleCache

        //Hack to provide the source viewer configuration that'll only be created later (there's a cycle there).
        final WeakReference<PyEditConfigurationWithoutEditor>[] sourceViewerConfigurationObj = new WeakReference[1];

        IPreferenceStore chainedPrefStore = PydevPrefs.getChainedPrefStore();
        final ColorAndStyleCache c = new ColorAndStyleCache(chainedPrefStore);
        this.getColorCache().add(c); //add for it to be disposed later.

        IPySyntaxHighlightingAndCodeCompletionEditor editor = new IPySyntaxHighlightingAndCodeCompletionEditor() {

            public void resetForceTabs() {
View Full Code Here

Examples of org.python.pydev.ui.ColorAndStyleCache

        store.putValue(PydevEditorPrefs.FUNC_NAME_COLOR, StringConverter.asString(new RGB(6, 0, 0)));
        store.putValue(PydevEditorPrefs.CLASS_NAME_COLOR, StringConverter.asString(new RGB(7, 0, 0)));
        store.putValue(PydevEditorPrefs.OPERATORS_COLOR, StringConverter.asString(new RGB(8, 0, 0)));
        store.putValue(PydevEditorPrefs.PARENS_COLOR, StringConverter.asString(new RGB(9, 0, 0)));

        this.colorCache = new ColorAndStyleCache(store);
        PyCodeScanner scanner = new PyCodeScanner(colorCache);
        return scanner;
    }
View Full Code Here

Examples of org.python.pydev.ui.ColorAndStyleCache

    protected ColorAndStyleCache colorCache;

    public ColorAndStyleCache getColorCache() {
        if (colorCache == null) {
            IPreferenceStore prefStore = PydevPrefs.getChainedPrefStore();
            colorCache = new ColorAndStyleCache(prefStore);
            prefStore.addPropertyChangeListener(new IPropertyChangeListener() {

                public void propertyChange(PropertyChangeEvent event) {
                    String property = event.getProperty();
                    if (ColorAndStyleCache.isColorOrStyleProperty(property)) {
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.