Java Code Examples for org.eclipse.core.runtime.preferences.IEclipsePreferences#putBoolean()

The following examples show how to use org.eclipse.core.runtime.preferences.IEclipsePreferences#putBoolean() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PreferenceUtils.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Sets if the new files and folders should update their permissions to specific permissions after transferring.
 * 
 * @param shouldSpecific
 *            true if the permissions should be updated, false otherwise
 * @param direction
 *            indicates if this is for upload or download permissions
 */
public static void setSpecificPermissions(boolean shouldSpecific, PermissionDirection direction)
{
	IEclipsePreferences prefs = EclipseUtil.instanceScope().getNode(CoreIOPlugin.PLUGIN_ID);
	switch (direction)
	{
		case UPLOAD:
			prefs.putBoolean(IPreferenceConstants.UPLOAD_SPECIFIC_PERMISSIONS, shouldSpecific);
			break;
		case DOWNLOAD:
			prefs.putBoolean(IPreferenceConstants.DOWNLOAD_SPECIFIC_PERMISSIONS, shouldSpecific);
			break;
	}
	try
	{
		prefs.flush();
	}
	catch (BackingStoreException e)
	{
		IdeLog.logError(CoreIOPlugin.getDefault(), e);
	}
}
 
Example 2
Source File: ThemeManager.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Set the FG, BG, selection and current line colors on our editors.
 * 
 * @param theme
 */
private void setAptanaEditorColorsToMatchTheme(Theme theme)
{
	IEclipsePreferences prefs = EclipseUtil.instanceScope().getNode("com.aptana.editor.common"); //$NON-NLS-1$
	prefs.putBoolean(AbstractTextEditor.PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT, false);
	prefs.put(AbstractTextEditor.PREFERENCE_COLOR_SELECTION_FOREGROUND, toString(theme.getForeground()));

	prefs.putBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, false);
	prefs.put(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND, toString(theme.getBackground()));

	prefs.putBoolean(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, false);
	prefs.put(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND, toString(theme.getForeground()));

	prefs.put(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR,
			toString(theme.getLineHighlightAgainstBG()));
	try
	{
		prefs.flush();
	}
	catch (BackingStoreException e)
	{
		IdeLog.logError(ThemePlugin.getDefault(), e);
	}
}
 
Example 3
Source File: InvasiveThemeHijacker.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
protected void setToken(IEclipsePreferences prefs, Theme theme, String ourTokenType, String jdtToken,
		boolean revertToDefaults)
{
	if (revertToDefaults)
	{
		prefs.remove(jdtToken);
		prefs.remove(jdtToken + "_bold"); //$NON-NLS-1$
		prefs.remove(jdtToken + "_italic"); //$NON-NLS-1$
		prefs.remove(jdtToken + "_underline"); //$NON-NLS-1$
		prefs.remove(jdtToken + "_strikethrough"); //$NON-NLS-1$
	}
	else
	{
		TextAttribute attr = theme.getTextAttribute(ourTokenType);
		prefs.put(jdtToken, StringConverter.asString(attr.getForeground().getRGB()));
		prefs.putBoolean(jdtToken + "_bold", (attr.getStyle() & SWT.BOLD) != 0); //$NON-NLS-1$
		prefs.putBoolean(jdtToken + "_italic", (attr.getStyle() & SWT.ITALIC) != 0); //$NON-NLS-1$
		prefs.putBoolean(jdtToken + "_underline", (attr.getStyle() & TextAttribute.UNDERLINE) != 0); //$NON-NLS-1$
		prefs.putBoolean(jdtToken + "_strikethrough", (attr.getStyle() & TextAttribute.STRIKETHROUGH) != 0); //$NON-NLS-1$
	}
}
 
Example 4
Source File: PreferenceInitializer.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void initializeDefaultPreferences()
{
	IEclipsePreferences prefs = EclipseUtil.defaultScope().getNode(CSSCorePlugin.PLUGIN_ID);

	prefs.putDouble(IPreferenceConstants.CSS_INDEX_VERSION, 0);

	// Set CSS Stylesheet validator to be on by default for reconcile, off for build, use default set of filters.
	prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(CSSValidator.ID, BuildType.BUILD), false);
	prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(CSSValidator.ID, BuildType.RECONCILE), true);
	prefs.put(PreferenceUtil.getFiltersKey(CSSValidator.ID),
			StringUtil.join(AbstractBuildParticipant.FILTER_DELIMITER, CSSValidator.DEFAULT_FILTERS));

	// Set up CSS Parser validator to be on for build and reconcile
	prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(CSSParserValidator.ID, BuildType.BUILD), true);
	prefs.putBoolean(PreferenceUtil.getEnablementPreferenceKey(CSSParserValidator.ID, BuildType.BUILD), true);
}
 
Example 5
Source File: PreferenceInitializerAddon.java    From saneclipse with Eclipse Public License 1.0 5 votes vote down vote up
private void configurePerformanceMonitoring() {
	IEclipsePreferences prefs = Util.getNode("org.eclipse.ui.monitoring");
	if(null == prefs) {
		return;
	}
	
	prefs.putBoolean("monitoring_enabled", true);
	prefs.putInt("long_event_error_threshold", 800);
	Util.savePrefs(prefs);
}
 
Example 6
Source File: TmfUIPreferenceInitializer.java    From tracecompass with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void initializeDefaultPreferences() {
    IEclipsePreferences defaultPreferences = DefaultScope.INSTANCE.getNode(Activator.PLUGIN_ID);
    defaultPreferences.putBoolean(ITmfUIPreferences.PREF_ALIGN_VIEWS, true);
    defaultPreferences.put(ITmfUIPreferences.SWITCH_TO_PERSPECTIVE, MessageDialogWithToggle.PROMPT);
    defaultPreferences.putBoolean(ITmfUIPreferences.CONFIRM_DELETION_SUPPLEMENTARY_FILES, true);
}
 
Example 7
Source File: HTMLFormatterPreferenceInitializer.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void initializeDefaultPreferences()
{
	IEclipsePreferences store = EclipseUtil.defaultScope().getNode(HTMLFormatterPlugin.PLUGIN_ID);
	store.put(HTMLFormatterConstants.FORMATTER_TAB_CHAR, CodeFormatterConstants.EDITOR);
	store.put(HTMLFormatterConstants.FORMATTER_TAB_SIZE,
			Integer.toString(EditorUtil.getSpaceIndentSize(HTMLPlugin.getDefault().getBundle().getSymbolicName())));
	store.put(HTMLFormatterConstants.FORMATTER_INDENTATION_SIZE, "4"); //$NON-NLS-1$
	store.putBoolean(HTMLFormatterConstants.WRAP_COMMENTS, false);
	store.putBoolean(HTMLFormatterConstants.PLACE_COMMENTS_IN_SEPARATE_LINES, false);
	store.putInt(HTMLFormatterConstants.WRAP_COMMENTS_LENGTH, 80);
	// We add all the 'Void' html tags here as well. They should not trigger an indent increase.
	store.put(
			HTMLFormatterConstants.INDENT_EXCLUDED_TAGS,
			"br,a,i,b,em,strong,h1,h2,h3,h4,h5,h6,area,base,col,command,embed,hr,img,input,keygen,link,param,source,track,wbr,td,th" //$NON-NLS-1$
			.replaceAll(",", IPreferenceDelegate.PREFERECE_DELIMITER)); //$NON-NLS-1$
	store.put(
			HTMLFormatterConstants.NEW_LINES_EXCLUDED_TAGS,
			"a,abbr,acronym,bdo,big,cite,del,dfn,font,img,ins,kbd,label,q,s,samp,small,strike,sub,sup,tt,u,var,span,i,b,em,strong,h1,h2,h3,h4,h5,h6,title,option,td,th" //$NON-NLS-1$
			.replaceAll(",", IPreferenceDelegate.PREFERECE_DELIMITER)); //$NON-NLS-1$
	store.putBoolean(HTMLFormatterConstants.NEW_LINES_EXCLUSION_IN_EMPTY_TAGS, true);
	store.putBoolean(HTMLFormatterConstants.TRIM_SPACES, true);
	store.putInt(HTMLFormatterConstants.LINES_AFTER_ELEMENTS, 0);
	store.putInt(HTMLFormatterConstants.LINES_AFTER_NON_HTML_ELEMENTS, 1);
	store.putInt(HTMLFormatterConstants.LINES_BEFORE_NON_HTML_ELEMENTS, 1);
	store.putInt(HTMLFormatterConstants.PRESERVED_LINES, 0);

	store.putBoolean(HTMLFormatterConstants.FORMATTER_OFF_ON_ENABLED, false);
	store.put(HTMLFormatterConstants.FORMATTER_ON, HTMLFormatterConstants.DEFAULT_FORMATTER_ON);
	store.put(HTMLFormatterConstants.FORMATTER_OFF, HTMLFormatterConstants.DEFAULT_FORMATTER_OFF);

	try
	{
		store.flush();
	}
	catch (BackingStoreException e)
	{
		IdeLog.logError(HTMLFormatterPlugin.getDefault(), e, IDebugScopes.DEBUG);
	}
}
 
Example 8
Source File: TextStylingPreference.java    From goclipse with Eclipse Public License 1.0 5 votes vote down vote up
public static void setToStore(IEclipsePreferences store, String key, TextStyling textStyle) {
	store.putBoolean(getEnabledKey(key), textStyle.isEnabled);
	store.put(getColorKey(key), StringConverter.asString(textStyle.rgb));
	store.putBoolean(getBoldKey(key), textStyle.isBold);
	store.putBoolean(getItalicKey(key), textStyle.isItalic);
	store.putBoolean(getStrikethroughKey(key), textStyle.isStrikethrough);
	store.putBoolean(getUnderlineKey(key), textStyle.isUnderline);
}
 
Example 9
Source File: BuildUtils.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
protected static void enableAutoBuild(boolean enable) {
	String qualifier = ResourcesPlugin.getPlugin().getBundle().getSymbolicName();
	IEclipsePreferences node = InstanceScope.INSTANCE.getNode(qualifier);
	node.putBoolean("description.autobuilding", enable);
	try {
		node.flush();
	} catch (BackingStoreException e) {
		throw new IllegalStateException(e);
	}
}
 
Example 10
Source File: SynchronizePlatformWizard.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
protected void enableAutoBuild( boolean enable )
{
	String qualifier = ResourcesPlugin.getPlugin().getBundle().getSymbolicName();
	IEclipsePreferences node = InstanceScope.INSTANCE.getNode( qualifier );
	node.putBoolean( "description.autobuilding", enable );
	try
	{
		node.flush();
	}
	catch( BackingStoreException e )
	{
		throw new IllegalStateException( e );
	}
}
 
Example 11
Source File: ImportPlatformWizard.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
protected void enableAutoBuild( boolean enable )
{
	String qualifier = ResourcesPlugin.getPlugin().getBundle().getSymbolicName();
	IEclipsePreferences node = InstanceScope.INSTANCE.getNode( qualifier );
	node.putBoolean( "description.autobuilding", enable );
	try
	{
		node.flush();
	}
	catch( BackingStoreException e )
	{
		throw new IllegalStateException( e );
	}
}
 
Example 12
Source File: BaseInitHandler.java    From eclipse.jdt.ls with Eclipse Public License 2.0 5 votes vote down vote up
private void registerWorkspaceInitialized() {
	IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(IConstants.PLUGIN_ID);
	prefs.putBoolean(IConstants.WORKSPACE_INITIALIZED, true);
	try {
		prefs.flush();
	} catch (BackingStoreException e) {
		JavaLanguageServerPlugin.logException(e.getMessage(), e);
	}
}
 
Example 13
Source File: BuildParticipantWorkingCopy.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
private void setPreferences(IEclipsePreferences prefs, Map<String, ? extends Object> preferences)
{
	if (CollectionsUtil.isEmpty(preferences))
	{
		return;
	}

	for (Map.Entry<String, ? extends Object> entry : preferences.entrySet())
	{
		Object value = entry.getValue();
		if (value instanceof Boolean)
		{
			prefs.putBoolean(entry.getKey(), (Boolean) value);
		}
		else if (value instanceof Long)
		{
			prefs.putLong(entry.getKey(), (Long) value);
		}
		else if (value instanceof Integer)
		{
			prefs.putInt(entry.getKey(), (Integer) value);
		}
		else if (value instanceof Double)
		{
			prefs.putDouble(entry.getKey(), (Double) value);
		}
		else if (value != null)
		{
			prefs.put(entry.getKey(), value.toString());
		}
	}
}
 
Example 14
Source File: XtendProjectConfigurator.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
private void writePreferences(OutputConfiguration configuration,
		IProject project) {
	ProjectScope projectPreferences = new ProjectScope(project);
	IEclipsePreferences languagePreferences = projectPreferences
			.getNode("org.eclipse.xtend.core.Xtend");
	languagePreferences.putBoolean(
			OptionsConfigurationBlock.isProjectSpecificPropertyKey(BuilderConfigurationBlock.PROPERTY_PREFIX), true);
	languagePreferences.putBoolean(
			getKey(configuration, INSTALL_DSL_AS_PRIMARY_SOURCE),
			configuration.isInstallDslAsPrimarySource());
	languagePreferences.putBoolean(
			getKey(configuration, HIDE_LOCAL_SYNTHETIC_VARIABLES),
			configuration.isHideSyntheticLocalVariables());
	languagePreferences.putBoolean(
			getKey(configuration, USE_OUTPUT_PER_SOURCE_FOLDER),
			true);
	for (SourceMapping sourceMapping : configuration.getSourceMappings()) {
		languagePreferences.put(
				getOutputForSourceFolderKey(configuration,
						sourceMapping.getSourceFolder()),
				Strings.nullToEmpty(sourceMapping.getOutputDirectory()));
	}

	try {
		languagePreferences.flush();
	} catch (BackingStoreException e) {
		throw new RuntimeIOException(e);
	}
}
 
Example 15
Source File: LibraryChecksPreferenceInitializer.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
private void initializeFormalParameters(final IEclipsePreferences preferences) {
  preferences.put("COM.AVALOQ.TOOLS.DDK.CHECK.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.PARAM1$PARAMETER", GET_FORMAL_PARAMETERS_PARAM_1_DEFAULT);
  preferences.putBoolean("COM.AVALOQ.TOOLS.DDK.CHECK.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.PARAM2$PARAMETER", GET_FORMAL_PARAMETERS_PARAM_2_DEFAULT);
  preferences.putBoolean("COM.AVALOQ.TOOLS.DDK.CHECK.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.PARAM3$PARAMETER", GET_FORMAL_PARAMETERS_PARAM_3_DEFAULT);
  preferences.put("COM.AVALOQ.TOOLS.DDK.CHECK.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.NAMES$PARAMETER", com.avaloq.tools.ddk.check.runtime.configuration.CheckPreferencesHelper.marshalStrings(GET_FORMAL_PARAMETERS_NAMES_DEFAULT));
  preferences.put("COM.AVALOQ.TOOLS.DDK.CHECK.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.INTS$PARAMETER", com.avaloq.tools.ddk.check.runtime.configuration.CheckPreferencesHelper.marshalIntegers(GET_FORMAL_PARAMETERS_INTS_DEFAULT));
  
}
 
Example 16
Source File: LibraryChecksPreferenceInitializer.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
private void initializeFormalParameters(final IEclipsePreferences preferences) {
  preferences.put("COM.AVALOQ.TOOLS.DDK.SAMPLE.HELLOWORLD.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.PARAM1$PARAMETER", GET_FORMAL_PARAMETERS_PARAM_1_DEFAULT);
  preferences.putBoolean("COM.AVALOQ.TOOLS.DDK.SAMPLE.HELLOWORLD.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.PARAM2$PARAMETER", GET_FORMAL_PARAMETERS_PARAM_2_DEFAULT);
  preferences.putBoolean("COM.AVALOQ.TOOLS.DDK.SAMPLE.HELLOWORLD.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.PARAM3$PARAMETER", GET_FORMAL_PARAMETERS_PARAM_3_DEFAULT);
  preferences.put("COM.AVALOQ.TOOLS.DDK.SAMPLE.HELLOWORLD.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.NAMES$PARAMETER", com.avaloq.tools.ddk.check.runtime.configuration.CheckPreferencesHelper.marshalStrings(GET_FORMAL_PARAMETERS_NAMES_DEFAULT));
  preferences.put("COM.AVALOQ.TOOLS.DDK.SAMPLE.HELLOWORLD.VALIDATION.LIBRARYCHECKSISSUECODES.FORMAL.PARAMETERS.INTS$PARAMETER", com.avaloq.tools.ddk.check.runtime.configuration.CheckPreferencesHelper.marshalIntegers(GET_FORMAL_PARAMETERS_INTS_DEFAULT));
  
}
 
Example 17
Source File: TLCPreferenceInitializer.java    From tlaplus with MIT License 5 votes vote down vote up
/**
   * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
   */
  public void initializeDefaultPreferences()
  {
      final IPreferenceStore uiPreferencesStore = TLCUIActivator.getDefault().getPreferenceStore();
      final IPreferenceStore tlcPreferencesStore = TLCActivator.getDefault().getPreferenceStore();

      tlcPreferencesStore.setDefault(TLCActivator.I_TLC_SNAPSHOT_KEEP_COUNT, 10);

      // This is so bad.. we store them in parallel because one is needed by plugin relied upon the PreferencePage
      //      and the other by a plugin which is on the opposite side of the dependency. (TLCModelLaunchDelegate)
      uiPreferencesStore.setDefault(TLCActivator.I_TLC_SNAPSHOT_KEEP_COUNT, 10);

      uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_TRACE_MAX_SHOW_ERRORS, 10000);
      uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_POPUP_ERRORS, true);
      uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_REVALIDATE_ON_MODIFY, true);
      uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_DEFAULT_WORKERS_COUNT,
      							  TLCConsumptionProfile.LOCAL_NORMAL.getWorkerThreads());
      uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_MAXIMUM_HEAP_SIZE_DEFAULT, MAX_HEAP_SIZE_DEFAULT);
      uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_MAXSETSIZE_DEFAULT, TLCGlobals.setBound);
      uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_FPBITS_DEFAULT, 1);
      uiPreferencesStore.setDefault(ITLCPreferenceConstants.I_TLC_FPSETIMPL_DEFAULT, FPSetFactory.getImplementationDefault());
      // store.setDefault(ITLCPreferenceConstants.I_TLC_DELETE_PREVIOUS_FILES, true);

// By default we want the Toolbox to show a modal progress dialog upon TLC
// startup. A user can opt to subsequently suppress the dialog.
// This restores the behavior prior to https://bugs.eclipse.org/146205#c10.
      if (!uiPreferencesStore.contains(ITLCPreferenceConstants.I_TLC_SHOW_MODAL_PROGRESS)) {
	final IEclipsePreferences node = InstanceScope.INSTANCE
			.getNode(WorkbenchPlugin.getDefault().getBundle().getSymbolicName());
	node.putBoolean(IPreferenceConstants.RUN_IN_BACKGROUND, false);
	try {
		node.flush();
	} catch (final BackingStoreException e) {
		TLCUIActivator.getDefault().logError("Error trying to flush the workbench plugin preferences store.",
				e);
	}
	uiPreferencesStore.setValue(ITLCPreferenceConstants.I_TLC_SHOW_MODAL_PROGRESS, true);
}
  }
 
Example 18
Source File: AbstractWizardNewTypeScriptProjectCreationPage.java    From typescript.java with MIT License 5 votes vote down vote up
/** Writes the Node.js settings into the given preferences. */
public void updateNodeJSPreferences(IEclipsePreferences preferences) {
	if (useEmbeddedNodeJs) {
		preferences.putBoolean(TypeScriptCorePreferenceConstants.USE_NODEJS_EMBEDDED, true);
		preferences.put(TypeScriptCorePreferenceConstants.NODEJS_EMBEDDED_ID, embeddedNodeJsId);
	} else {
		preferences.putBoolean(TypeScriptCorePreferenceConstants.USE_NODEJS_EMBEDDED, false);
		preferences.put(TypeScriptCorePreferenceConstants.NODEJS_PATH, customNodeJsPath);
	}
}
 
Example 19
Source File: PropertySectionHistory.java    From bonita-studio with GNU General Public License v2.0 4 votes vote down vote up
public void save() throws BackingStoreException {
    final IEclipsePreferences node = preferenceNode();
    node.putBoolean(descriptionVisibilityProperty(), isDescriptionVisible());
    node.flush();
}
 
Example 20
Source File: ThemeManager.java    From APICloud-Studio with GNU General Public License v3.0 4 votes vote down vote up
private void setAnnotationColorsToMatchTheme(Theme theme)
{
	IEclipsePreferences prefs = EclipseUtil.instanceScope().getNode("org.eclipse.ui.editors"); //$NON-NLS-1$
	if (!theme.hasEntry("override.searchResultIndication")) //$NON-NLS-1$
	{
		prefs.put("searchResultIndicationColor", toString(theme.getSearchResultColor())); //$NON-NLS-1$
	}
	// TODO Use markup.changed bg color for "decoration color" in Prefs>General>Appearance>Colors and Fonts

	// TODO Move this stuff over to theme change listeners in the XML/HTML/Ruby editor plugins?
	if (!theme.hasEntry("override.xmlTagPairOccurrenceIndication")) //$NON-NLS-1$
	{
		prefs.putBoolean("xmlTagPairOccurrenceIndicationHighlighting", false); //$NON-NLS-1$
		prefs.putBoolean("xmlTagPairOccurrenceIndication", true); //$NON-NLS-1$
		prefs.put("xmlTagPairOccurrenceIndicationColor", toString(theme.getOccurenceHighlightColor())); //$NON-NLS-1$
		prefs.put("xmlTagPairOccurrenceIndicationTextStyle", AnnotationPreference.STYLE_BOX); //$NON-NLS-1$
	}
	if (!theme.hasEntry("override.htmlTagPairOccurrenceIndication")) //$NON-NLS-1$
	{
		prefs.putBoolean("htmlTagPairOccurrenceIndicationHighlighting", false); //$NON-NLS-1$
		prefs.putBoolean("htmlTagPairOccurrenceIndication", true); //$NON-NLS-1$
		prefs.put("htmlTagPairOccurrenceIndicationColor", toString(theme.getOccurenceHighlightColor())); //$NON-NLS-1$
		prefs.put("htmlTagPairOccurrenceIndicationTextStyle", AnnotationPreference.STYLE_BOX); //$NON-NLS-1$
	}
	if (!theme.hasEntry("override.rubyBlockPairOccurrenceIndication")) //$NON-NLS-1$
	{
		prefs.putBoolean("rubyBlockPairOccurrenceIndicationHighlighting", false); //$NON-NLS-1$
		prefs.putBoolean("rubyBlockPairOccurrenceIndication", true); //$NON-NLS-1$
		prefs.put("rubyBlockPairOccurrenceIndicationColor", toString(theme.getOccurenceHighlightColor())); //$NON-NLS-1$
		prefs.put("rubyBlockPairOccurrenceIndicationTextStyle", AnnotationPreference.STYLE_BOX); //$NON-NLS-1$
	}
	// PyDev Occurrences (com.python.pydev.occurrences)
	// Override them if pydev is set to use our themes
	if (Platform.getPreferencesService().getBoolean("org.python.pydev.red_core", "PYDEV_USE_APTANA_THEMES", true, //$NON-NLS-1$ //$NON-NLS-2$
			null))
	{
		if (!theme.hasEntry("override.pydevOccurrenceIndication")) //$NON-NLS-1$
		{
			MarkerAnnotationPreferences preferences = new MarkerAnnotationPreferences();
			AnnotationPreference pydevOccurPref = null;
			for (Object obj : preferences.getAnnotationPreferences())
			{
				AnnotationPreference pref = (AnnotationPreference) obj;
				Object type = pref.getAnnotationType();
				if ("com.python.pydev.occurrences".equals(type)) //$NON-NLS-1$
				{
					pydevOccurPref = pref;
				}
			}
			if (pydevOccurPref != null)
			{
				if (pydevOccurPref.getTextStylePreferenceKey() != null)
				{
					// Now that pydev supports text style, use the box style and don't highlight.
					prefs.putBoolean("pydevOccurrenceHighlighting", false); //$NON-NLS-1$
					prefs.putBoolean("pydevOccurrenceIndication", true); //$NON-NLS-1$
					prefs.put("pydevOccurrenceIndicationColor", toString(theme.getOccurenceHighlightColor())); //$NON-NLS-1$
					prefs.put("pydevOccurrenceIndicationTextStyle", AnnotationPreference.STYLE_BOX); //$NON-NLS-1$
				}
				else
				{
					// Must use highlighting, since we're against older pydev that had no text style
					prefs.putBoolean("pydevOccurrenceHighlighting", true); //$NON-NLS-1$
					prefs.putBoolean("pydevOccurrenceIndication", true); //$NON-NLS-1$
					prefs.put("pydevOccurrenceIndicationColor", toString(theme.getSearchResultColor())); //$NON-NLS-1$
				}
			}
		}
	}

	try
	{
		prefs.flush();
	}
	catch (BackingStoreException e)
	{
		IdeLog.logError(ThemePlugin.getDefault(), e);
	}
}