final String oldTabWidthKey= PreferenceConstants.EDITOR_TAB_WIDTH; final String newTabWidthKey= ExtendedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH; String tabWidthPropagatedKey= "tabWidthPropagated"; if (getPreferenceStore().contains(oldTabWidthKey) && !getPreferenceStore().isDefault(oldTabWidthKey)) { if (!getPreferenceStore().getBoolean(tabWidthPropagatedKey)) getPreferenceStore().setValue(newTabWidthKey, getPreferenceStore().getInt(oldTabWidthKey)); } getPreferenceStore().setValue(tabWidthPropagatedKey, true);   getPreferenceStore().putValue(oldTabWidthKey, getPreferenceStore().getString(newTabWidthKey));  fPropertyChangeListener= new IPropertyChangeListener() { public void propertyChange(PropertyChangeEvent event) { if (newTabWidthKey.equals(event.getProperty())) getPreferenceStore().putValue(oldTabWidthKey, getPreferenceStore().getString(newTabWidthKey)); } }; getPreferenceStore().addPropertyChangeListener(fPropertyChangeListener);
	private void installPreferenceStoreBackwardsCompatibility() {		/*		 * Installs backwards compatibility: propagate the Java editor font from a		 * pre-2.1 plug-in to the Platform UI's preference store to preserve		 * the Java editor font from a pre-2.1 workspace. This is done only		 * once.		 */		String fontPropagatedKey= "fontPropagated"; //$NON-NLS-1$		if (getPreferenceStore().contains(JFaceResources.TEXT_FONT) && !getPreferenceStore().isDefault(JFaceResources.TEXT_FONT)) {			if (!getPreferenceStore().getBoolean(fontPropagatedKey))				PreferenceConverter.setValue(PlatformUI.getWorkbench().getPreferenceStore(), PreferenceConstants.EDITOR_TEXT_FONT, PreferenceConverter.getFontDataArray(getPreferenceStore(), JFaceResources.TEXT_FONT));		}		getPreferenceStore().setValue(fontPropagatedKey, true);		/*		 * Backwards compatibility: set the Java editor font in this plug-in's		 * preference store to let older versions access it. Since 2.1 the		 * Java editor font is managed by the workbench font preference page.		 */		PreferenceConverter.putValue(getPreferenceStore(), JFaceResources.TEXT_FONT, JFaceResources.getFontRegistry().getFontData(PreferenceConstants.EDITOR_TEXT_FONT));		fFontPropertyChangeListener= new IPropertyChangeListener() {			public void propertyChange(PropertyChangeEvent event) {				if (PreferenceConstants.EDITOR_TEXT_FONT.equals(event.getProperty()))					PreferenceConverter.putValue(getPreferenceStore(), JFaceResources.TEXT_FONT, JFaceResources.getFontRegistry().getFontData(PreferenceConstants.EDITOR_TEXT_FONT));			}		};		JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener);	}