Package org.python.pydev.editor.autoedit

Examples of org.python.pydev.editor.autoedit.DefaultIndentPrefs


            PySourceViewer pySourceViewer = (PySourceViewer) viewer;
            PyEdit pyEdit = pySourceViewer.getEdit();
            this.indentString = pyEdit.getIndentPrefs().getIndentationString();
        } else {
            //happens on compare editor
            this.indentString = new DefaultIndentPrefs().getIndentationString();
        }
        //If the completion is applied with shift pressed, do a local import. Note that the user is only actually
        //able to do that if the popup menu is focused (i.e.: request completion and do a tab to focus it, instead
        //of having the focus on the editor and just pressing up/down).
        if ((stateMask & SWT.SHIFT) != 0) {
View Full Code Here


                        ISelection selection = viewer.getSelection();
                        if (selection instanceof ITextSelection) {

                            //Don't bother in getting the indent prefs from the editor: the default indent prefs are
                            //always global for the settings we want.
                            pyPeerLinker.setIndentPrefs(new DefaultIndentPrefs());
                            PySelection ps = new PySelection(viewer.getDocument(), (ITextSelection) selection);

                            if (pyPeerLinker.perform(ps, event.character, viewer)) {
                                event.doit = false;
                            }
View Full Code Here

    protected void configureTextViewer(TextViewer textViewer) {
        if (!(textViewer instanceof SourceViewer))
            return;
        final SourceViewer sourceViewer = (SourceViewer) textViewer;

        final IIndentPrefs indentPrefs = new DefaultIndentPrefs();

        //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();
View Full Code Here

                            //Only do our custom backspace if we're not in block selection mode.
                            PyBackspace pyBackspace = new PyBackspace();
                            if (edit != null) {
                                pyBackspace.setEditor(edit);
                            } else {
                                pyBackspace.setIndentPrefs(new DefaultIndentPrefs());
                            }
                            PySelection ps = new PySelection(viewer.getDocument(), (ITextSelection) selection);
                            pyBackspace.perform(ps);
                            event.doit = false;
                        }
View Full Code Here

TOP

Related Classes of org.python.pydev.editor.autoedit.DefaultIndentPrefs

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.