@Override public void map(Map<String, ColorThemeSetting> theme, Map<String, ColorThemeMapping> overrideMappings) { // put preferences according to mappings IPreferenceStore store = Activator.getDefault().getPreferenceStore(); if (store.getBoolean("forceDefaultBG")) { defaultBackground = theme.get("background"); } else { defaultBackground = new ColorThemeSetting(); } for (String pluginKey : mappings.keySet()) { ColorThemeMapping mapping = (overrideMappings != null && overrideMappings.containsKey(pluginKey)) ? overrideMappings.get(pluginKey) : mappings.get(pluginKey); ColorThemeSetting setting = theme.get(mapping.getThemeKey()); if (setting != null) { mapping.putPreferences(preferences, setting); } } }
forceDefaultBG.setSelection(getPreferenceStore().getBoolean("forceDefaultBG")); forceDefaultBG.setToolTipText("Forces the background color of all color styles to be 'background' color of the theme");
/** * Tells whether the margin is shown. * * @return <code>true</code> if the margin is shown */ private boolean isMarginShown() { if (fPreferenceStore != null && fMarginPainterEnableKey != null) return fPreferenceStore.getBoolean(fMarginPainterEnableKey); return false; }
/** * Tells whether character at caret location is shown. * * @return <code>true</code> if character at caret location is shown */ private boolean isCharacterAtCaretLocationShown() { if (fPreferenceStore != null && fMatchingCharacterPainterHighlightCharacterAtCaretLocationKey != null) return fPreferenceStore.getBoolean(fMatchingCharacterPainterHighlightCharacterAtCaretLocationKey); return false; }
/** * Tells whether enclosing peer characters are shown. * * @return <code>true</code> if the enclosing peer characters are shown */ private boolean areEnclosingPeerCharactersShown() { if (fPreferenceStore != null && fMatchingCharacterPainterEnclosingPeerCharactersKey != null) return fPreferenceStore.getBoolean(fMatchingCharacterPainterEnclosingPeerCharactersKey); return false; }
/** * Tells whether this proposal can ask to * configure a user dictionary. * * @return <code>true</code> if it can ask the user */ static boolean canAskToConfigure() { return !PreferenceConstants.getPreferenceStore().getBoolean(PREF_KEY_DO_NOT_ASK); }
/** * Returns whether the overwrite mode is enabled according to the preference * store settings. Subclasses may override this method to provide a custom * preference setting. * * @return <code>true</code> if overwrite mode is enabled * @since 3.1 */ protected boolean isOverwriteModeEnabled() { IPreferenceStore store= getPreferenceStore(); return store != null ? !store.getBoolean(DISABLE_OVERWRITE_MODE) : true; }
public void run() { if (fStore.getBoolean(PreferenceConstants.EDITOR_ANNOTATION_ROLL_OVER)) return; runWithEvent(null); }
@Override protected void doLoad() { if (checkBox != null) { boolean value = getPreferenceStore().getBoolean(getPreferenceName()); checkBox.setSelection(value); wasSelected = value; } }
private int getCaretWidthPreference() { if (getPreferenceStore() != null && getPreferenceStore().getBoolean(PREFERENCE_WIDE_CARET)) return WIDE_CARET_WIDTH; return SINGLE_CARET_WIDTH; }
/** * Returns whether quick diff info should be visible upon opening an editor * according to the preference store settings. * * @return <code>true</code> if the line numbers should be visible */ protected boolean isPrefQuickDiffAlwaysOn() { IPreferenceStore store= getPreferenceStore(); boolean setting= store != null ? store.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.QUICK_DIFF_ALWAYS_ON) : false; return setting && isEditorInputModifiable(); }
public FillArgumentNamesCompletionProposalCollector(JavaContentAssistInvocationContext context) { super(context.getCompilationUnit(), true); setInvocationContext(context); IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore(); fIsGuessArguments= preferenceStore.getBoolean(PreferenceConstants.CODEASSIST_GUESS_METHOD_ARGUMENTS); if (preferenceStore.getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES)) { setRequireExtendedContext(true); } }
private void initializeAutoTesting() { InfinitestPlugin plugin = InfinitestPlugin.getInstance(); boolean autoTest = plugin.getPreferenceStore().getBoolean(AUTO_TEST); if (autoTest) { plugin.startContinuouslyTesting(); } } }
@Override public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) { boolean isChecked= fStore.getBoolean(getPreferenceKey()); if (isChecked != isChecked()) { Boolean value= Boolean.valueOf(isChecked); fStore.firePropertyChangeEvent(getPreferenceKey(), value, value); } }
/** * Constructs a new action. */ public ToggleLinkingAction() { boolean isLinkingEnabled= PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE); setChecked(isLinkingEnabled); fOpenAndLinkWithEditorHelper.setLinkWithEditor(isLinkingEnabled); }
public void update() { boolean showHover= fStore != null && fStore.getBoolean(PreferenceConstants.EDITOR_SHOW_HOVER); setChecked(showHover); setEnabled(getTextEditor() != null); }
private static void configureJavaDocProcessor(ContentAssistant assistant, IPreferenceStore store) { JavadocCompletionProcessor jdcp= getJavaDocProcessor(assistant); if (jdcp == null) return; String triggers= store.getString(AUTOACTIVATION_TRIGGERS_JAVADOC); if (triggers != null) jdcp.setCompletionProposalAutoActivationCharacters(triggers.toCharArray()); boolean enabled= store.getBoolean(CASE_SENSITIVITY); jdcp.restrictProposalsToMatchingCases(enabled); }
/** * Creates the collector used to get proposals from core. * * @param context the context * @return the collector */ protected CompletionProposalCollector createCollector(JavaContentAssistInvocationContext context) { if (PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.CODEASSIST_FILL_ARGUMENT_NAMES)) return new FillArgumentNamesCompletionProposalCollector(context); else return new CompletionProposalCollector(context.getCompilationUnit(), true); }
@Override protected void installCodeMiningProviders() { if (JavaPlugin.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_CODEMINING_ENABLED)) { super.installCodeMiningProviders(); } else { ((JavaSourceViewer) getSourceViewer()).resetCodeMinings(); } }
protected final void internalDoOperation() { if (PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_IMPORTS_ON_PASTE) && isSmartInsertMode()) { if (fOperationCode == ITextOperationTarget.PASTE) { doPasteWithImportsOperation(); } else { doCutCopyWithImportsOperation(); } } else { fOperationTarget.doOperation(fOperationCode); } }