Examples of PydevPlugin


Examples of org.python.pydev.plugin.PydevPlugin

    /**
     * Constructor... registers itself as a python nature listener
     */
    public PythonBaseModelProvider() {
        PythonNatureListenersManager.addPythonNatureListener(this);
        PydevPlugin plugin = PydevPlugin.getDefault();
        if (plugin != null) {
            IPreferenceStore preferenceStore = plugin.getPreferenceStore();
            preferenceStore.addPropertyChangeListener(this);
        }

        //just leave it created
        topLevelChoice = new TopLevelProjectsOrWorkingSetChoice();
View Full Code Here

Examples of org.python.pydev.plugin.PydevPlugin

     *
     * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getContextType(org.eclipse.jface.text.ITextViewer,
     *      org.eclipse.jface.text.IRegion)
     */
    protected TemplateContextType getContextType(ITextViewer viewer, IRegion region) {
        PydevPlugin plugin = PydevPlugin.getDefault();
        if (plugin == null) {
            //just for tests
            return new TemplateContextType();
        }
        return TemplateHelper.getContextTypeRegistry().getContextType(PyContextType.PY_COMPLETIONS_CONTEXT_TYPE);
View Full Code Here

Examples of org.python.pydev.plugin.PydevPlugin

    public static boolean applyCompletionOnRParen() {
        return getPreferences().getBoolean(PyCodeCompletionPreferencesPage.APPLY_COMPLETION_ON_RPAREN);
    }

    private static Preferences getPreferences() {
        PydevPlugin plugin = PydevPlugin.getDefault();
        if (plugin == null) {
            //always create a new one for tests.
            return getPreferencesForTests.call(null);
        }
        return plugin.getPluginPreferences();
    }
View Full Code Here

Examples of org.python.pydev.plugin.PydevPlugin

        //        file = new File(interpreter);
        //        if(file.exists() == false){
        //            throw new RuntimeException("The interpreter passed for execution ("+interpreter+") does not exist.");
        //        }

        PydevPlugin plugin = PydevPlugin.getDefault();
        String defaultVmArgs;
        if (plugin == null) {
            //in tests
            defaultVmArgs = IInterpreterManager.IRONPYTHON_DEFAULT_INTERNAL_SHELL_VM_ARGS;
        } else {
            IPreferenceStore preferenceStore = plugin.getPreferenceStore();
            defaultVmArgs = preferenceStore.getString(IInterpreterManager.IRONPYTHON_INTERNAL_SHELL_VM_ARGS);
        }
        List<String> defaultVmArgsSplit = new ArrayList<String>();
        if (defaultVmArgs != null) {
            defaultVmArgsSplit = StringUtils.split(defaultVmArgs, ' ');
View Full Code Here

Examples of org.python.pydev.plugin.PydevPlugin

        super.setForceTabs(forceTabs);
        regenerateIndentString(); //When forcing tabs, we must update the cache.
    }

    public static int getStaticTabWidth() {
        PydevPlugin default1 = PydevPlugin.getDefault();
        if (default1 == null) {
            return 4;
        }
        int w = default1.getPluginPreferences().getInt(PydevEditorPrefs.TAB_WIDTH);
        if (w <= 0) { //tab width should never be 0 or less (in this case, let's make the default 4)
            w = 4;
        }
        return w;
    }
View Full Code Here

Examples of org.python.pydev.plugin.PydevPlugin

        // In event of problems, return false
        return -1;
    }

    private boolean getAlignRight() {
        PydevPlugin plugin = PydevPlugin.getDefault();
        if (plugin != null) {
            return plugin.getPluginPreferences().getBoolean(CommentBlocksPreferences.SINGLE_BLOCK_COMMENT_ALIGN_RIGHT);

        } else { //tests env
            return this.alignRight;
        }
    }
View Full Code Here

Examples of org.python.pydev.plugin.PydevPlugin

     * Getter for the preferred docstring character. Only a shortcut.
     *
     * @return
     */
    public static String getPreferredDocstringCharacter() {
        PydevPlugin plugin = PydevPlugin.getDefault();
        if (plugin == null) {
            return "'";//testing...

        }
        IPreferenceStore preferences = PydevPrefs.getPreferences();
View Full Code Here

Examples of org.python.pydev.plugin.PydevPlugin

        IPreferenceStore preferences = PydevPrefs.getPreferences();
        return preferences.getString(P_DOCSTRINGCHARACTER);
    }

    public static String getPreferredDocstringStyle() {
        PydevPlugin plugin = PydevPlugin.getDefault();
        if (plugin == null) {
            return ":"; //testing
        }
        IPreferenceStore preferences = PydevPrefs.getPreferences();
        return preferences.getString(P_DOCSTRINGSTYLE);
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.