Search in sources :

Example 1 with PydevDebugPlugin

use of org.python.pydev.debug.core.PydevDebugPlugin in project Pydev by fabioz.

the class PyCoveragePreferences method getNameNumberOfColumns.

public static int getNameNumberOfColumns() {
    if (SharedCorePlugin.inTestMode()) {
        return DEFAULT_NUMBER_OF_COLUMNS_FOR_NAME;
    }
    PydevDebugPlugin plugin = PydevDebugPlugin.getDefault();
    IPreferenceStore preferenceStore = plugin.getPreferenceStore();
    int i = preferenceStore.getInt("PY_COVERAGE_NAME_COLUMNS_TO_USE");
    if (i <= 5) {
        return DEFAULT_NUMBER_OF_COLUMNS_FOR_NAME;
    }
    if (i > 256) {
        i = 256;
    }
    return i;
}
Also used : IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) PydevDebugPlugin(org.python.pydev.debug.core.PydevDebugPlugin)

Example 2 with PydevDebugPlugin

use of org.python.pydev.debug.core.PydevDebugPlugin in project Pydev by fabioz.

the class PyVariablesPreferences method addPropertyChangeListener.

public static void addPropertyChangeListener(IPropertyChangeListener listener) {
    if (SharedCorePlugin.inTestMode()) {
    // ignore add
    } else {
        PydevDebugPlugin plugin = PydevDebugPlugin.getDefault();
        plugin.getPreferenceStore().addPropertyChangeListener(listener);
    }
}
Also used : PydevDebugPlugin(org.python.pydev.debug.core.PydevDebugPlugin)

Example 3 with PydevDebugPlugin

use of org.python.pydev.debug.core.PydevDebugPlugin in project Pydev by fabioz.

the class PyVariablesPreferences method setDefaultHelper.

private static void setDefaultHelper(String key, boolean value) {
    if (SharedCorePlugin.inTestMode()) {
    // ignore set
    } else {
        PydevDebugPlugin plugin = PydevDebugPlugin.getDefault();
        IPreferenceStore preferenceStore = plugin.getPreferenceStore();
        preferenceStore.setDefault(key, value);
    }
}
Also used : IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) PydevDebugPlugin(org.python.pydev.debug.core.PydevDebugPlugin)

Example 4 with PydevDebugPlugin

use of org.python.pydev.debug.core.PydevDebugPlugin in project Pydev by fabioz.

the class PyVariablesPreferences method getHelper.

private static boolean getHelper(String key, boolean defaultValue) {
    if (SharedCorePlugin.inTestMode()) {
        return defaultValue;
    }
    PydevDebugPlugin plugin = PydevDebugPlugin.getDefault();
    IPreferenceStore preferenceStore = plugin.getPreferenceStore();
    return preferenceStore.getBoolean(key);
}
Also used : IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) PydevDebugPlugin(org.python.pydev.debug.core.PydevDebugPlugin)

Example 5 with PydevDebugPlugin

use of org.python.pydev.debug.core.PydevDebugPlugin in project Pydev by fabioz.

the class ColorManager method getPreferenceColor.

/**
 * @param type: see constants at {@link PydevConsoleConstants}
 * @return a color to be used.
 */
public Color getPreferenceColor(String type) {
    if (SharedCorePlugin.inTestMode()) {
        return null;
    }
    PydevDebugPlugin plugin = PydevDebugPlugin.getDefault();
    IPreferenceStore preferenceStore = plugin.getPreferenceStore();
    return getColor(PreferenceConverter.getColor(preferenceStore, type));
}
Also used : IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore) PydevDebugPlugin(org.python.pydev.debug.core.PydevDebugPlugin)

Aggregations

PydevDebugPlugin (org.python.pydev.debug.core.PydevDebugPlugin)8 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)5