List of usage examples for org.eclipse.jface.preference IPreferenceStore getInt
int getInt(String name);
From source file:com.bdaum.zoom.ui.internal.views.ZuiView.java
License:Open Source License
protected IPreferenceStore applyPreferences() { final IPreferenceStore preferenceStore = UiActivator.getDefault().getPreferenceStore(); showLabelDflt = preferenceStore.getInt(PreferenceConstants.SHOWLABEL); labelTemplateDflt = preferenceStore.getString(PreferenceConstants.THUMBNAILTEMPLATE); labelFontsizeDflt = preferenceStore.getInt(PreferenceConstants.LABELFONTSIZE); return preferenceStore; }
From source file:com.bdaum.zoom.ui.internal.widgets.AnimatedGallery.java
License:Open Source License
protected IPreferenceStore applyPreferences() { final IPreferenceStore preferenceStore = UiActivator.getDefault().getPreferenceStore(); showRotateButtons = preferenceStore.getBoolean(PreferenceConstants.SHOWROTATEBUTTONS); showColorCode = !PreferenceConstants.COLORCODE_NO .equals(preferenceStore.getString(PreferenceConstants.SHOWCOLORCODE)); showLocation = preferenceStore.getBoolean(PreferenceConstants.SHOWLOCATION); String rating = preferenceStore.getString(PreferenceConstants.SHOWRATING); showRating = PreferenceConstants.SHOWRATING_NO.equals(rating) ? RATING_NO : PreferenceConstants.SHOWRATING_COUNT.equals(rating) ? RATING_COUNT : RATING_SIZE; showDoneMark = preferenceStore.getBoolean(PreferenceConstants.SHOWDONEMARK); showVoicenoteButton = preferenceStore.getBoolean(PreferenceConstants.SHOWVOICENOTE); showRegions = preferenceStore.getInt(PreferenceConstants.MAXREGIONS); return preferenceStore; }
From source file:com.boothen.jsonedit.core.editors.JsonTextEditor.java
License:Open Source License
private void doAutoFormatOnSave() { IPreferenceStore store = getPreferenceStore(); boolean autoFormatOnSave = store.getBoolean(JsonPreferenceStore.AUTO_FORMAT_ON_SAVE); if (autoFormatOnSave) { boolean spaces = store.getBoolean(JsonPreferenceStore.SPACES_FOR_TABS); int numSpaces = store.getInt(JsonPreferenceStore.NUM_SPACES); FormatTextHandler.formatText(this, spaces, numSpaces); }/*from w w w .j av a2 s .c o m*/ }
From source file:com.boothen.jsonedit.preferences.JsonPreferenceStore.java
License:Open Source License
public int getTabWidth() { IPreferenceStore preferenceStore = getIPreferenceStore(); if (preferenceStore.getBoolean(OVERRIDE_TAB_SETTING)) { return preferenceStore.getInt(NUM_SPACES); }/*ww w. ja va2 s. c om*/ IPreferenceStore editorPreferenceStore = getEditorPreferenceStore(); return editorPreferenceStore.getInt("tabWidth"); }
From source file:com.centurylink.mdw.plugin.preferences.MdwPreferencePage.java
License:Apache License
protected void initializeValues() { IPreferenceStore store = getPreferenceStore(); int reportingLevel = store.getInt(PREFS_MDW_REPORTING_LEVEL); mdwReportingLevelCombo/*from w w w .j av a2 s .c o m*/ .setText(reportingLevel + " - " + PluginMessages.MESSAGE_LEVELS.get(new Integer(reportingLevel))); logTimingsCheckbox.setSelection(store.getBoolean(PREFS_LOG_TIMINGS)); logConnectErrorsCheckbox.setSelection(store.getBoolean(PREFS_LOG_CONNECT_ERRORS)); copyrightNoticeTextArea.setText(store.getString(PREFS_COPYRIGHT_NOTICE)); jdbcFetchSizeText.setText(String.valueOf(store.getInt(PREFS_JDBC_FETCH_SIZE))); eventManagerCheckbox.setSelection(store.getBoolean(PREFS_SWING_LAUNCH_EVENT_MANAGER)); threadPoolManagerCheckbox.setSelection(store.getBoolean(PREFS_SWING_LAUNCH_THREAD_POOL_MANAGER)); useDiscoveredVcsCredsCheckbox.setSelection(store.getBoolean(PREFS_USE_DISCOVERED_VCS_CREDS)); }
From source file:com.centurylink.mdw.plugin.preferences.model.MdwSettings.java
License:Apache License
public void initialize() { setDefaultValues();//from w w w.j a v a 2 s . c om IPreferenceStore store = MdwPlugin.getDefault().getPreferenceStore(); String relUrl = store.getString(PREFS_MDW_RELEASES_URL); if (relUrl.endsWith("/")) relUrl = relUrl.substring(0, relUrl.length() - 1); setMdwReleasesUrl(relUrl); if (getMdwReleasesUrl().length() == 0) setMdwReleasesUrl(store.getDefaultString(PREFS_MDW_RELEASES_URL)); setWorkspaceSetupUrl(store.getString(PREFS_WORKSPACE_SETUP_URL)); if (getWorkspaceSetupUrl().length() == 0) setWorkspaceSetupUrl(store.getDefaultString(PREFS_WORKSPACE_SETUP_URL)); setDiscoveryUrl(store.getString(PREFS_DISCOVERY_URL)); if (getDiscoveryUrl().length() == 0) setDiscoveryUrl(store.getDefaultString(PREFS_DISCOVERY_URL)); setIncludePreviewBuilds(store.getBoolean(PREFS_INCLUDE_PREVIEW_BUILDS)); setJdbcFetchSize(store.getInt(PREFS_JDBC_FETCH_SIZE)); if (getJdbcFetchSize() == 0) setJdbcFetchSize(store.getDefaultInt(PREFS_JDBC_FETCH_SIZE)); setCopyrightNotice(store.getString(PREFS_COPYRIGHT_NOTICE)); if (getCopyrightNotice().length() == 0) setCopyrightNotice(store.getDefaultString(PREFS_COPYRIGHT_NOTICE)); setInPlaceLabelEditing(store.getBoolean(PREFS_IN_PLACE_LABEL_EDITING)); setCompareConflictingAssetsDuringImport(store.getBoolean(PREFS_COMPARE_CONFLICTING_ASSETS)); setAllowDeleteArchivedProcesses(store.getBoolean(PREFS_ALLOW_DELETE_ARCHIVED_PROCESSES)); setAllowAssetNamesWithoutExtensions(store.getBoolean(PREFS_ALLOW_ASSETS_WITHOUT_EXTENSIONS)); setUseEmbeddedEditorForExcelAssets(store.getBoolean(PREFS_EMBEDDED_EDITOR_FOR_EXCEL)); setDoubleClickOpensSubprocessesAndScripts( store.getBoolean(PREFS_DOUBLE_CLICK_OPENS_SUBPROCESSES_AND_SCRIPTS)); setInferSmartSubprocVersionSpec(store.getBoolean(PREFS_INFER_SMART_SUBPROC_VERSION_SPEC)); setMdwReportingLevel(store.getInt(PREFS_MDW_REPORTING_LEVEL)); int red = store.getInt(PREFS_READONLY_BG_RED); int green = store.getInt(PREFS_READONLY_BG_GREEN); int blue = store.getInt(PREFS_READONLY_BG_BLUE); setReadOnlyBackground(new RGB(red, green, blue)); setTempResourceLocation(store.getString(PREFS_TEMP_RESOURCE_DIRECTORY)); if (getTempResourceLocation().length() == 0) setTempResourceLocation(store.getDefaultString(PREFS_TEMP_RESOURCE_DIRECTORY)); setTempFilesToKeep(store.getInt(PREFS_PREVIOUS_TEMP_FILE_VERSIONS_TO_KEEP)); if (getTempFilesToKeep() == 0) setTempFilesToKeep(store.getDefaultInt(PREFS_PREVIOUS_TEMP_FILE_VERSIONS_TO_KEEP)); setLoadScriptLibsOnEdit(store.getBoolean(PREFS_LOAD_SCRIPT_LIBS_ON_EDIT)); setWarnOverrideAttrsNotCarriedForward(store.getBoolean(PREFS_WARN_OVERRIDE_ATTRS_NOT_CARRIED_FORWARD)); logTimings = store.getBoolean(PREFS_LOG_TIMINGS); logConnectErrors = store.getBoolean(PREFS_LOG_CONNECT_ERRORS); swingLaunchEventManager = store.getBoolean(PREFS_SWING_LAUNCH_EVENT_MANAGER); swingLaunchThreadPoolManager = store.getBoolean(PREFS_SWING_LAUNCH_THREAD_POOL_MANAGER); useDiscoveredVcsCredentials = store.getBoolean(PREFS_USE_DISCOVERED_VCS_CREDS); setHttpConnectTimeout(store.getInt(PREFS_HTTP_CONNECT_TIMEOUT_MS)); setHttpReadTimeout(store.getInt(PREFS_HTTP_READ_TIMEOUT_MS)); setSmtpHost(store.getString(PREFS_SMTP_HOST)); setSmtpPort(store.getInt(PREFS_SMTP_PORT)); }
From source file:com.centurylink.mdw.plugin.preferences.model.ServerConsoleSettings.java
License:Apache License
/** * initialize attribute values from preferences *//*from ww w. j av a 2s . c o m*/ public void initialize() { setDefaultValues(); IPreferenceStore store = MdwPlugin.getDefault().getPreferenceStore(); bufferSize = store.getInt(PREFS_SERVER_CONSOLE_BUFFER_SIZE); if (bufferSize == 0) bufferSize = store.getDefaultInt(PREFS_SERVER_CONSOLE_BUFFER_SIZE); FontData fd = new FontData(store.getString(PREFS_SERVER_CONSOLE_FONT)); if (fd.equals(new FontData("Courier New", 10, SWT.NORMAL))) fd = new FontData(store.getDefaultString(PREFS_SERVER_CONSOLE_FONT)); setFontData(fd); int red = store.getInt(PREFS_SERVER_CONSOLE_FONT_RED); if (red == 0) red = store.getDefaultInt(PREFS_SERVER_CONSOLE_FONT_RED); int green = store.getInt(PREFS_SERVER_CONSOLE_FONT_GREEN); if (green == 0) green = store.getDefaultInt(PREFS_SERVER_CONSOLE_FONT_GREEN); int blue = store.getInt(PREFS_SERVER_CONSOLE_FONT_BLUE); if (blue == 0) blue = store.getDefaultInt(PREFS_SERVER_CONSOLE_FONT_BLUE); setFontRgb(new RGB(red, green, blue)); red = store.getInt(PREFS_SERVER_CONSOLE_BG_RED); if (red == 255) red = store.getDefaultInt(PREFS_SERVER_CONSOLE_BG_RED); green = store.getInt(PREFS_SERVER_CONSOLE_BG_GREEN); if (green == 255) green = store.getDefaultInt(PREFS_SERVER_CONSOLE_BG_GREEN); blue = store.getInt(PREFS_SERVER_CONSOLE_BG_BLUE); if (blue == 255) blue = store.getDefaultInt(PREFS_SERVER_CONSOLE_BG_BLUE); setBackgroundRgb(new RGB(red, green, blue)); String clientShell = store.getString(PREFS_SERVER_CLIENT_SHELL); if (clientShell == null || clientShell.isEmpty()) clientShell = store.getDefaultString(PREFS_SERVER_CLIENT_SHELL); setClientShell(ClientShell.valueOf(clientShell)); String clientShellExePath = store.getString(PREFS_SERVER_CLIENT_SHELL_EXE_PATH); if (clientShellExePath != null && !clientShellExePath.isEmpty()) setClientShellExe(new File(clientShellExePath)); else setClientShellExe(null); }
From source file:com.centurylink.mdw.plugin.preferences.ProcessDesignPreferencePage.java
License:Apache License
protected void initializeValues() { IPreferenceStore store = getPreferenceStore(); allowAssetNamesWithoutExtensionsCheckbox .setSelection(store.getBoolean(PREFS_ALLOW_ASSETS_WITHOUT_EXTENSIONS)); inPlaceLabelEditingCheckbox.setSelection(store.getBoolean(PREFS_IN_PLACE_LABEL_EDITING)); compareConflictingAssetsCheckbox.setSelection(store.getBoolean(PREFS_COMPARE_CONFLICTING_ASSETS)); allowDeleteArchivedProcessesCheckbox.setSelection(store.getBoolean(PREFS_ALLOW_DELETE_ARCHIVED_PROCESSES)); doubleClickOpensSubprocsAndScriptsCheckbox .setSelection(store.getBoolean(PREFS_DOUBLE_CLICK_OPENS_SUBPROCESSES_AND_SCRIPTS)); inferSmartSubprocVersionSpecCheckbox.setSelection(store.getBoolean(PREFS_INFER_SMART_SUBPROC_VERSION_SPEC)); showBamEventDataFieldCheckbox.setSelection(store.getBoolean(PREFS_SHOW_BAM_EVENT_DATA_INPUT_FIELD)); warnOverrideAttrsNotCarriedForwardCheckbox .setSelection(store.getBoolean(PREFS_WARN_OVERRIDE_ATTRS_NOT_CARRIED_FORWARD)); embeddedEditorForExcelCheckbox.setSelection(store.getBoolean(PREFS_EMBEDDED_EDITOR_FOR_EXCEL)); int red = store.getInt(PREFS_READONLY_BG_RED); int green = store.getInt(PREFS_READONLY_BG_GREEN); int blue = store.getInt(PREFS_READONLY_BG_BLUE); readOnlyBackgroundRgb = new RGB(red, green, blue); colorDialog.setRGB(readOnlyBackgroundRgb); tempResourceLocationText.setText(store.getString(PREFS_TEMP_RESOURCE_DIRECTORY)); previousTempFileVersionsSpinner.setSelection(store.getInt(PREFS_PREVIOUS_TEMP_FILE_VERSIONS_TO_KEEP)); loadScriptLibsOnEditCheckbox.setSelection(store.getBoolean(PREFS_LOAD_SCRIPT_LIBS_ON_EDIT)); }
From source file:com.centurylink.mdw.plugin.preferences.ProcessDesignPreferencePage.java
License:Apache License
protected void initializeFromDefaults() { IPreferenceStore store = getPreferenceStore(); allowAssetNamesWithoutExtensionsCheckbox .setSelection(store.getDefaultBoolean(PREFS_ALLOW_ASSETS_WITHOUT_EXTENSIONS)); inPlaceLabelEditingCheckbox.setSelection(store.getDefaultBoolean(PREFS_IN_PLACE_LABEL_EDITING)); compareConflictingAssetsCheckbox.setSelection(store.getDefaultBoolean(PREFS_COMPARE_CONFLICTING_ASSETS)); allowDeleteArchivedProcessesCheckbox .setSelection(store.getDefaultBoolean(PREFS_ALLOW_DELETE_ARCHIVED_PROCESSES)); doubleClickOpensSubprocsAndScriptsCheckbox .setSelection(store.getDefaultBoolean(PREFS_DOUBLE_CLICK_OPENS_SUBPROCESSES_AND_SCRIPTS)); inferSmartSubprocVersionSpecCheckbox .setSelection(store.getDefaultBoolean(PREFS_INFER_SMART_SUBPROC_VERSION_SPEC)); showBamEventDataFieldCheckbox.setSelection(store.getDefaultBoolean(PREFS_SHOW_BAM_EVENT_DATA_INPUT_FIELD)); warnOverrideAttrsNotCarriedForwardCheckbox .setSelection(store.getDefaultBoolean(PREFS_WARN_OVERRIDE_ATTRS_NOT_CARRIED_FORWARD)); embeddedEditorForExcelCheckbox.setSelection(store.getDefaultBoolean(PREFS_EMBEDDED_EDITOR_FOR_EXCEL)); int red = store.getDefaultInt(PREFS_READONLY_BG_RED); int green = store.getDefaultInt(PREFS_READONLY_BG_GREEN); int blue = store.getDefaultInt(PREFS_READONLY_BG_BLUE); readOnlyBackgroundRgb = new RGB(red, green, blue); colorDialog.setRGB(readOnlyBackgroundRgb); tempResourceLocationText.setText(store.getDefaultString(PREFS_TEMP_RESOURCE_DIRECTORY)); previousTempFileVersionsSpinner.setSelection(store.getInt(PREFS_PREVIOUS_TEMP_FILE_VERSIONS_TO_KEEP)); loadScriptLibsOnEditCheckbox.setSelection(store.getDefaultBoolean(PREFS_LOAD_SCRIPT_LIBS_ON_EDIT)); }
From source file:com.centurylink.mdw.plugin.preferences.ServerConsolePreferencePage.java
License:Apache License
@Override protected void initializeValues() { IPreferenceStore store = getPreferenceStore(); bufferSize = store.getInt(PREFS_SERVER_CONSOLE_BUFFER_SIZE); bufferSizeText.setText(String.valueOf(bufferSize)); String font = store.getString(PREFS_SERVER_CONSOLE_FONT); fontData = new FontData(font); fontDialog.setFontList(new FontData[] { fontData }); int red = store.getInt(PREFS_SERVER_CONSOLE_FONT_RED); int green = store.getInt(PREFS_SERVER_CONSOLE_FONT_GREEN); int blue = store.getInt(PREFS_SERVER_CONSOLE_FONT_BLUE); fontRgb = new RGB(red, green, blue); fontDialog.setRGB(fontRgb);/*from w w w. j ava2s . co m*/ red = store.getInt(PREFS_SERVER_CONSOLE_BG_RED); green = store.getInt(PREFS_SERVER_CONSOLE_BG_GREEN); blue = store.getInt(PREFS_SERVER_CONSOLE_BG_BLUE); backgroundRgb = new RGB(red, green, blue); colorDialog.setRGB(backgroundRgb); String csPref = store.getString(PREFS_SERVER_CLIENT_SHELL); if (ClientShell.Putty.toString().equals(csPref)) clientShell = ClientShell.Putty; else clientShell = ClientShell.Karaf; if (clientShell == ClientShell.Putty) { puttyClientRadio.setSelection(true); puttyExeText.setText(store.getString(PREFS_SERVER_CLIENT_SHELL_EXE_PATH)); } else { karafClientRadio.setSelection(true); puttyExeText.setEnabled(false); } }