use of org.jkiss.dbeaver.model.preferences.DBPPreferenceStore in project dbeaver by dbeaver.
the class HexPreferencesPage method getDefaultWidth.
public static String getDefaultWidth() {
DBPPreferenceStore store = DBWorkbench.getPlatform().getPreferenceStore();
String defWidth = store.getString(HexEditorPreferences.HEX_DEF_WIDTH);
return CommonUtils.isEmpty(defWidth) ? "8" : defWidth;
}
use of org.jkiss.dbeaver.model.preferences.DBPPreferenceStore in project dbeaver by dbeaver.
the class HexPreferencesPage method performOk.
/**
* @see HexPreferencesPage#performOk()
*/
@Override
public boolean performOk() {
DBPPreferenceStore store = DBWorkbench.getPlatform().getPreferenceStore();
FontData fontData = preferences.getFontData();
store.setValue(HexEditorPreferences.HEX_FONT_NAME, fontData.getName());
store.setValue(HexEditorPreferences.HEX_FONT_STYLE, fontData.getStyle());
store.setValue(HexEditorPreferences.HEX_FONT_SIZE, fontData.getHeight());
store.firePropertyChangeEvent(PROP_FONT_DATA, null, fontData);
store.setValue(HexEditorPreferences.HEX_DEF_WIDTH, preferences.getDefWidth());
store.firePropertyChangeEvent(PROP_DEF_WIDTH, 0, preferences.getDefWidth());
PrefUtils.savePreferenceStore(store);
return true;
}
use of org.jkiss.dbeaver.model.preferences.DBPPreferenceStore in project dbeaver by dbeaver.
the class QueryLogViewer method reloadEvents.
private void reloadEvents(@Nullable String searchString) {
if (reloadInProgress) {
// $NON-NLS-1$
log.debug("Event reload is in progress. Skip");
return;
}
reloadInProgress = true;
DBPPreferenceStore store = DBWorkbench.getPlatform().getPreferenceStore();
this.entriesPerPage = Math.max(MIN_ENTRIES_PER_PAGE, store.getInt(QMConstants.PROP_ENTRIES_PER_PAGE));
this.defaultFilter = new DefaultEventFilter();
clearLog();
// Extract events
EventHistoryReadService loadingService = new EventHistoryReadService(searchString);
LoadingJob.createService(loadingService, new EvenHistoryReadVisualizer(loadingService)).schedule();
}
use of org.jkiss.dbeaver.model.preferences.DBPPreferenceStore in project dbeaver by dbeaver.
the class SQLEditorBase method loadActivePreferenceSettings.
protected void loadActivePreferenceSettings() {
DBPPreferenceStore preferenceStore = getActivePreferenceStore();
boolean closeSingleQuotes = preferenceStore.getBoolean(SQLPreferenceConstants.SQLEDITOR_CLOSE_SINGLE_QUOTES);
boolean closeDoubleQuotes = preferenceStore.getBoolean(SQLPreferenceConstants.SQLEDITOR_CLOSE_DOUBLE_QUOTES);
boolean closeBrackets = preferenceStore.getBoolean(SQLPreferenceConstants.SQLEDITOR_CLOSE_BRACKETS);
sqlSymbolInserter.setCloseSingleQuotesEnabled(closeSingleQuotes);
sqlSymbolInserter.setCloseDoubleQuotesEnabled(closeDoubleQuotes);
sqlSymbolInserter.setCloseBracketsEnabled(closeBrackets);
}
use of org.jkiss.dbeaver.model.preferences.DBPPreferenceStore in project dbeaver by dbeaver.
the class SQLModelPreferencesInitializer method initializeDefaultPreferences.
@Override
public void initializeDefaultPreferences() {
// Init default preferences
DBPPreferenceStore store = ModelPreferences.getPreferences();
// Common
PrefUtils.setDefaultPreferenceValue(store, SQLModelPreferences.SQL_FORMAT_FORMATTER, SQLFormatterTokenized.FORMATTER_ID);
PrefUtils.setDefaultPreferenceValue(store, SQLModelPreferences.SQL_PROPOSAL_INSERT_TABLE_ALIAS, true);
}
Aggregations