Bug 549415 - Remove useless field
previousColor is not necessary any more as it's the value that's in the
preferenceStore already.
Change-Id: Ia40d18b8dc3adec4354d682045601d72ed02dc79
Signed-off-by: Mickael Istria <mistria@redhat.com>
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
index 0582045..d932500 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java
@@ -658,12 +658,10 @@
private class ColorEntry {
public final String colorKey;
public final String label;
- public RGB previousColor;
public final String isSystemDefaultKey;
public ColorEntry(String colorKey, String label, String isSystemDefaultKey) {
this.colorKey= colorKey;
this.label= label;
- this.previousColor= PreferenceConverter.getColor(fOverlayStore, colorKey);
this.isSystemDefaultKey= isSystemDefaultKey;
}
@@ -680,7 +678,6 @@
}
public void setColor(RGB rgb) {
- this.previousColor= PreferenceConverter.getColor(fOverlayStore, this.colorKey);
PreferenceConverter.setValue(fOverlayStore, this.colorKey, rgb);
}
@@ -965,7 +962,7 @@
SelectionListener colorDefaultSelectionListener= new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- ColorEntry colorEntry = getSelectedAppearanceColorOption();
+ ColorEntry colorEntry= getSelectedAppearanceColorOption();
if (colorEntry.allowSystemDefault()) {
colorEntry.setSystemDefault(fAppearanceColorDefault.getSelection());
handleAppearanceColorListSelection(); // refresh color preview and checkbox state