/** * @deprecated Use getImportNumberThreshold(IJavaProject) instead */ public static int getImportNumberThreshold(IPreferenceStore prefs) { int threshold= prefs.getInt(PreferenceConstants.ORGIMPORTS_ONDEMANDTHRESHOLD); if (threshold < 0) { threshold= Integer.MAX_VALUE; } return threshold; }
public int getTabWidth(ISourceViewer sourceViewer) { if (fPreferenceStore == null) return super.getTabWidth(sourceViewer); return fPreferenceStore.getInt(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH); }
@Override public int getRecentWorkingSetsLength() { IPreferenceStore store = PrefUtil.getAPIPreferenceStore(); return store.getInt(IWorkbenchPreferenceConstants.RECENTLY_USED_WORKINGSETS_SIZE); } }
@Override public int getTabWidth(ISourceViewer sourceViewer) { if (fPreferenceStore == null) return super.getTabWidth(sourceViewer); return fPreferenceStore.getInt(CodeFormatterConstants.FORMATTER_TAB_SIZE); }
/** * Initialize with the given spelling problem collector. * * @param collector the spelling problem collector * @param document the document */ public SpellEventListener(ISpellingProblemCollector collector, IDocument document) { fCollector= collector; fDocument= document; fProblemsThreshold= PreferenceConstants.getPreferenceStore().getInt(SpellingEngine.SPELLING_PROBLEMS_THRESHOLD); }
/** * Returns the maximum number of chars to display in the details area or 0 if * there is no maximum. * * @return maximum number of chars to display or 0 for no max */ private static int getMaxDetailLength() { return DebugUITools.getPreferenceStore().getInt(IDebugUIConstants.PREF_MAX_DETAIL_LENGTH); }
/** * Returns the maximum number of entries allowed in this history * * @return the maximum number of entries allowed in this history */ protected int getMaxHistorySize() { return DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugUIConstants.PREF_MAX_HISTORY_SIZE); }
private void getPageSizeFromPreference() { fPageSize = DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PAGE_SIZE); fPreBuffer = DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_TABLE_RENDERING_PRE_BUFFER_SIZE); fPostBuffer = DebugUIPlugin.getDefault().getPreferenceStore().getInt(IDebugPreferenceConstants.PREF_TABLE_RENDERING_POST_BUFFER_SIZE); }
/** * @return */ public int getEditorReuseThreshold() { IPreferenceStore store = WorkbenchPlugin.getDefault() .getPreferenceStore(); return store.getInt(IPreferenceConstants.REUSE_EDITORS); }
/** * Gets the entry label, one of BrowserWidgetsConstants.SHOW_DN, * BrowserWidgetsConstants.SHOW_RDN or BrowserWidgetsConstants.SHOW_RDN_VALUE. * * @return the entry label */ public int getEntryLabel() { return BrowserCommonActivator.getDefault().getPreferenceStore().getInt( BrowserCommonConstants.PREFERENCE_BROWSER_ENTRY_LABEL ); }
/** * Gets the search result label, one of BrowserWidgetsConstants.SHOW_DN, * BrowserWidgetsConstants.SHOW_RDN or BrowserWidgetsConstants.SHOW_RDN_VALUE. * * @return the entry label */ public int getSearchResultLabel() { return BrowserCommonActivator.getDefault().getPreferenceStore().getInt( BrowserCommonConstants.PREFERENCE_BROWSER_SEARCH_RESULT_LABEL ); }
/** * Gets the folding threshold. * * @return the folding threshold */ public int getFoldingThreshold() { return BrowserCommonActivator.getDefault().getPreferenceStore().getInt( BrowserCommonConstants.PREFERENCE_ENTRYEDITOR_FOLDING_THRESHOLD ); }
/** * Instantiates a new annotation document. */ public AnnotationDocument() { IPreferenceStore prefStore = CasEditorPlugin.getDefault().getPreferenceStore(); lineLengthHint = prefStore.getInt(AnnotationEditorPreferenceConstants.EDITOR_LINE_LENGTH_HINT); if (lineLengthHint == 0) lineLengthHint = 80; }
@Override protected SynchronizeModelOperation getSubscriberOperation( ISynchronizePageConfiguration configuration, IDiffElement[] elements) { final int timeout = Activator.getDefault().getPreferenceStore() .getInt(UIPreferences.REMOTE_CONNECTION_TIMEOUT); return new SynchronizeModelOperation(configuration, elements) { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { runPushOperation(timeout); } }; }
@Override public int getEditorReuseThreshold() { IPreferenceStore store = WorkbenchPlugin.getDefault().getPreferenceStore(); return store.getInt(IPreferenceConstants.REUSE_EDITORS); }
@Override protected void doLoad() { Text text = getTextControl(); if (text != null) { int value = getPreferenceStore().getInt(getPreferenceName()); text.setText("" + value);//$NON-NLS-1$ oldValue = "" + value; //$NON-NLS-1$ } }
protected void doLoad() { Text text = getTextControl(); if (text != null) { int value = getPreferenceStore().getInt(getPreferenceName()); text.setText("" + value);//$NON-NLS-1$ oldValue = "" + value; //$NON-NLS-1$ } }
@Override protected void doLoad() { if (scale != null) { int value = getPreferenceStore().getInt(getPreferenceName()); scale.setSelection(value); oldValue = value; } }
@Override public int getHyperlinkStateMask(ISourceViewer sourceViewer) { if (fPreferenceStore == null) return super.getHyperlinkStateMask(sourceViewer); String modifiers= fPreferenceStore.getString(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER); int modifierMask= computeStateMask(modifiers); if (modifierMask == -1) { // Fall back to stored state mask modifierMask= fPreferenceStore.getInt(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINK_KEY_MODIFIER_MASK); } return modifierMask; }
/** * @param modelId the {@link String} model id * @return default number of addressable units per column for the model */ private int getDefaultColumnSizeByModel(String modelId) { int col = DebugUITools.getPreferenceStore().getInt(getColumnPrefId(modelId)); if (col == 0) { DebugUITools.getPreferenceStore().setValue(getColumnPrefId(modelId), IDebugPreferenceConstants.PREF_COLUMN_SIZE_DEFAULT); } col = DebugUITools.getPreferenceStore().getInt(getColumnPrefId(modelId)); return col; }