From: incastrix Date: Wed, 23 Dec 2009 17:40:54 +0000 (+0000) Subject: Refactory: remove unused classes, imports, fields and methods. X-Git-Url: http://git.phpeclipse.com?hp=e98a517d8540c42dd14df9cc8cd25034e739fded Refactory: remove unused classes, imports, fields and methods. --- diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java index 8c20ba6..3ea10f5 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/php/PHPCompletionProcessor.java @@ -48,7 +48,7 @@ import net.sourceforge.phpdt.internal.ui.text.template.DeclarationEngine; import net.sourceforge.phpdt.internal.ui.text.template.LocalVariableProposal; import net.sourceforge.phpdt.internal.ui.text.template.contentassist.TemplateEngine; import net.sourceforge.phpdt.ui.IWorkingCopyManager; -import net.sourceforge.phpeclipse.PHPeclipsePlugin; +//import net.sourceforge.phpeclipse.PHPeclipsePlugin; import net.sourceforge.phpeclipse.builder.IdentifierIndexManager; import net.sourceforge.phpeclipse.phpeditor.PHPEditor; import net.sourceforge.phpeclipse.phpeditor.PHPSyntaxRdr; @@ -744,7 +744,7 @@ public class PHPCompletionProcessor implements IContentAssistProcessor { } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); - PHPeclipsePlugin.log(e); + WebUI.log(e); } } return unitVariables; @@ -770,7 +770,7 @@ public class PHPCompletionProcessor implements IContentAssistProcessor { } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); - PHPeclipsePlugin.log(e); + WebUI.log(e); } } return methodVariables; diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/preferences/OverlayPreferenceStore.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/preferences/OverlayPreferenceStore.java index 917e813..f29b683 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/preferences/OverlayPreferenceStore.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/preferences/OverlayPreferenceStore.java @@ -8,7 +8,7 @@ package net.sourceforge.phpeclipse.preferences; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.preference.PreferenceStore; import org.eclipse.jface.util.IPropertyChangeListener; -import org.eclipse.jface.util.PropertyChangeEvent; +//import org.eclipse.jface.util.PropertyChangeEvent; /** * An overlaying preference store. @@ -44,17 +44,17 @@ public class OverlayPreferenceStore implements IPreferenceStore { } }; - private class PropertyListener implements IPropertyChangeListener { - - /* - * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent) - */ - public void propertyChange(PropertyChangeEvent event) { - OverlayKey key = findOverlayKey(event.getProperty()); - if (key != null) - propagateProperty(fParent, key, fStore); - } - }; +// private class PropertyListener implements IPropertyChangeListener { +// +// /* +// * @see IPropertyChangeListener#propertyChange(PropertyChangeEvent) +// */ +// public void propertyChange(PropertyChangeEvent event) { +// OverlayKey key = findOverlayKey(event.getProperty()); +// if (key != null) +// propagateProperty(fParent, key, fStore); +// } +// }; private IPreferenceStore fParent; @@ -62,7 +62,7 @@ public class OverlayPreferenceStore implements IPreferenceStore { private OverlayKey[] fOverlayKeys; - private PropertyListener fPropertyListener; + //private PropertyListener fPropertyListener; public OverlayPreferenceStore(IPreferenceStore parent, OverlayKey[] overlayKeys) { @@ -83,66 +83,66 @@ public class OverlayPreferenceStore implements IPreferenceStore { return (findOverlayKey(key) != null); } - private void propagateProperty(IPreferenceStore orgin, OverlayKey key, - IPreferenceStore target) { - - if (orgin.isDefault(key.fKey)) { - if (!target.isDefault(key.fKey)) - target.setToDefault(key.fKey); - return; - } - - TypeDescriptor d = key.fDescriptor; - if (BOOLEAN == d) { - - boolean originValue = orgin.getBoolean(key.fKey); - boolean targetValue = target.getBoolean(key.fKey); - if (targetValue != originValue) - target.setValue(key.fKey, originValue); - - } else if (DOUBLE == d) { - - double originValue = orgin.getDouble(key.fKey); - double targetValue = target.getDouble(key.fKey); - if (targetValue != originValue) - target.setValue(key.fKey, originValue); - - } else if (FLOAT == d) { - - float originValue = orgin.getFloat(key.fKey); - float targetValue = target.getFloat(key.fKey); - if (targetValue != originValue) - target.setValue(key.fKey, originValue); - - } else if (INT == d) { - - int originValue = orgin.getInt(key.fKey); - int targetValue = target.getInt(key.fKey); - if (targetValue != originValue) - target.setValue(key.fKey, originValue); - - } else if (LONG == d) { - - long originValue = orgin.getLong(key.fKey); - long targetValue = target.getLong(key.fKey); - if (targetValue != originValue) - target.setValue(key.fKey, originValue); - - } else if (STRING == d) { - - String originValue = orgin.getString(key.fKey); - String targetValue = target.getString(key.fKey); - if (targetValue != null && originValue != null - && !targetValue.equals(originValue)) - target.setValue(key.fKey, originValue); - - } - } - - public void propagate() { - for (int i = 0; i < fOverlayKeys.length; i++) - propagateProperty(fStore, fOverlayKeys[i], fParent); - } +// private void propagateProperty(IPreferenceStore orgin, OverlayKey key, +// IPreferenceStore target) { +// +// if (orgin.isDefault(key.fKey)) { +// if (!target.isDefault(key.fKey)) +// target.setToDefault(key.fKey); +// return; +// } +// +// TypeDescriptor d = key.fDescriptor; +// if (BOOLEAN == d) { +// +// boolean originValue = orgin.getBoolean(key.fKey); +// boolean targetValue = target.getBoolean(key.fKey); +// if (targetValue != originValue) +// target.setValue(key.fKey, originValue); +// +// } else if (DOUBLE == d) { +// +// double originValue = orgin.getDouble(key.fKey); +// double targetValue = target.getDouble(key.fKey); +// if (targetValue != originValue) +// target.setValue(key.fKey, originValue); +// +// } else if (FLOAT == d) { +// +// float originValue = orgin.getFloat(key.fKey); +// float targetValue = target.getFloat(key.fKey); +// if (targetValue != originValue) +// target.setValue(key.fKey, originValue); +// +// } else if (INT == d) { +// +// int originValue = orgin.getInt(key.fKey); +// int targetValue = target.getInt(key.fKey); +// if (targetValue != originValue) +// target.setValue(key.fKey, originValue); +// +// } else if (LONG == d) { +// +// long originValue = orgin.getLong(key.fKey); +// long targetValue = target.getLong(key.fKey); +// if (targetValue != originValue) +// target.setValue(key.fKey, originValue); +// +// } else if (STRING == d) { +// +// String originValue = orgin.getString(key.fKey); +// String targetValue = target.getString(key.fKey); +// if (targetValue != null && originValue != null +// && !targetValue.equals(originValue)) +// target.setValue(key.fKey, originValue); +// +// } +// } + +// public void propagate() { +// for (int i = 0; i < fOverlayKeys.length; i++) +// propagateProperty(fStore, fOverlayKeys[i], fParent); +// } private void loadProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target, boolean forceInitialization) { @@ -197,24 +197,24 @@ public class OverlayPreferenceStore implements IPreferenceStore { loadProperty(fParent, fOverlayKeys[i], fStore, true); } - public void loadDefaults() { - for (int i = 0; i < fOverlayKeys.length; i++) - setToDefault(fOverlayKeys[i].fKey); - } - - public void start() { - if (fPropertyListener == null) { - fPropertyListener = new PropertyListener(); - fParent.addPropertyChangeListener(fPropertyListener); - } - } - - public void stop() { - if (fPropertyListener != null) { - fParent.removePropertyChangeListener(fPropertyListener); - fPropertyListener = null; - } - } +// public void loadDefaults() { +// for (int i = 0; i < fOverlayKeys.length; i++) +// setToDefault(fOverlayKeys[i].fKey); +// } + +// public void start() { +// if (fPropertyListener == null) { +// fPropertyListener = new PropertyListener(); +// fParent.addPropertyChangeListener(fPropertyListener); +// } +// } + +// public void stop() { +// if (fPropertyListener != null) { +// fParent.removePropertyChangeListener(fPropertyListener); +// fPropertyListener = null; +// } +// } /* * @see IPreferenceStore#addPropertyChangeListener(IPropertyChangeListener)