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;
}
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);
}
}
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);
}
}
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);
}
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));
}
Aggregations