From: jsurfer Date: Fri, 8 Oct 2004 18:01:27 +0000 (+0000) Subject: fixed TAB_WIDTH preference bug X-Git-Url: http://secure.phpeclipse.com fixed TAB_WIDTH preference bug --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java index 6ae57ad..3545ed0 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/PHPeclipsePlugin.java @@ -272,7 +272,7 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon * * @since 3.0 */ - private IPropertyChangeListener fPropertyChangeListener; +// private IPropertyChangeListener fPropertyChangeListener; /** * The combined preference store. @@ -1081,28 +1081,28 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon * Backwards compatibility: propagate the Java editor tab width from a pre-3.0 plug-in to the new preference key. This is done * only once. */ - final String oldTabWidthKey = PreferenceConstants.EDITOR_TAB_WIDTH; - final String newTabWidthKey = AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH; - String tabWidthPropagatedKey = "tabWidthPropagated"; //$NON-NLS-1$ - if (getPreferenceStore().contains(oldTabWidthKey) && !getPreferenceStore().isDefault(oldTabWidthKey)) { - if (!getPreferenceStore().getBoolean(tabWidthPropagatedKey)) - getPreferenceStore().setValue(newTabWidthKey, getPreferenceStore().getInt(oldTabWidthKey)); - } - getPreferenceStore().setValue(tabWidthPropagatedKey, true); - - /* - * Backwards compatibility: set the Java editor tab width in this plug-in's preference store with the old key to let older - * versions access it. Since 3.0 the tab width is managed by the extended texteditor and uses a new key. - */ - 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); +// final String oldTabWidthKey = PreferenceConstants.EDITOR_TAB_WIDTH; +// final String newTabWidthKey = AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH; +// String tabWidthPropagatedKey = "tabWidthPropagated"; //$NON-NLS-1$ +// if (getPreferenceStore().contains(oldTabWidthKey) && !getPreferenceStore().isDefault(oldTabWidthKey)) { +// if (!getPreferenceStore().getBoolean(tabWidthPropagatedKey)) +// getPreferenceStore().setValue(newTabWidthKey, getPreferenceStore().getInt(oldTabWidthKey)); +// } +// getPreferenceStore().setValue(tabWidthPropagatedKey, true); +// +// /* +// * Backwards compatibility: set the Java editor tab width in this plug-in's preference store with the old key to let older +// * versions access it. Since 3.0 the tab width is managed by the extended texteditor and uses a new key. +// */ +// 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); /* * Backward compatibility for the refactoring preference key. @@ -1117,7 +1117,7 @@ public class PHPeclipsePlugin extends AbstractUIPlugin implements IPreferenceCon */ private void uninstallPreferenceStoreBackwardsCompatibility() { JFaceResources.getFontRegistry().removeListener(fFontPropertyChangeListener); - getPreferenceStore().removePropertyChangeListener(fPropertyChangeListener); +// getPreferenceStore().removePropertyChangeListener(fPropertyChangeListener); } /*