diff options
author | Lars Vogel | 2020-01-29 09:19:40 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2020-02-03 12:57:22 +0000 |
commit | 8323362a23ade548a14db071b5c90acbd452b3de (patch) | |
tree | 976c532dedc58fb0aa70b63dd59dfe1f523a1be3 | |
parent | 343a7ceb8a4547c9d71e182383f1abebb148a5d6 (diff) | |
download | eclipse.platform.ui-8323362a23ade548a14db071b5c90acbd452b3de.tar.gz eclipse.platform.ui-8323362a23ade548a14db071b5c90acbd452b3de.tar.xz eclipse.platform.ui-8323362a23ade548a14db071b5c90acbd452b3de.zip |
Bug 559586 - Remove no-op PreferencePageEnhander Tweaklet
Dead code, most likely based on the idea that Tweaklets can be used to
customize preferences based on CSS but this idea seems never to have
landed and our currently preference setting via CSS is not using these
Tweaklets.
Change-Id: Ib0e59e72bb1a387ed375664073eb04e5933f2d94
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
3 files changed, 0 insertions, 103 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java index 5d29340ff76..359f1c12246 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java @@ -57,7 +57,6 @@ import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; -import org.eclipse.swt.SWTException; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; @@ -74,8 +73,6 @@ import org.eclipse.ui.PlatformUI; import org.eclipse.ui.internal.WorkbenchMessages; import org.eclipse.ui.internal.WorkbenchPlugin; import org.eclipse.ui.internal.themes.IThemeDescriptor; -import org.eclipse.ui.internal.tweaklets.PreferencePageEnhancer; -import org.eclipse.ui.internal.tweaklets.Tweaklets; import org.eclipse.ui.internal.util.PrefUtil; import org.eclipse.ui.themes.IThemeManager; import org.osgi.service.prefs.BackingStoreException; @@ -154,11 +151,6 @@ public class ViewsPreferencePage extends PreferencePage implements IWorkbenchPre } else { themeComboDecorator.hide(); } - try { - ((PreferencePageEnhancer) Tweaklets.get(PreferencePageEnhancer.KEY)).setSelection(selection); - } catch (SWTException e) { - WorkbenchPlugin.log("Failed to set CSS preferences", e); //$NON-NLS-1$ - } selectColorsAndFontsTheme(getColorAndFontThemeIdByThemeId(selection.getId())); }); @@ -168,9 +160,6 @@ public class ViewsPreferencePage extends PreferencePage implements IWorkbenchPre createThemeIndependentComposits(comp); - ((PreferencePageEnhancer) Tweaklets.get(PreferencePageEnhancer.KEY)).setSelection(currentTheme); - ((PreferencePageEnhancer) Tweaklets.get(PreferencePageEnhancer.KEY)).createContents(comp); - if (currentTheme != null) { String colorsAndFontsThemeId = getColorAndFontThemeIdByThemeId(currentTheme.getId()); if (colorsAndFontsThemeId != null && !currentColorsAndFontsTheme.getId().equals(colorsAndFontsThemeId)) { @@ -282,7 +271,6 @@ public class ViewsPreferencePage extends PreferencePage implements IWorkbenchPre IPreferenceStore apiStore = PrefUtil.getAPIPreferenceStore(); apiStore.setValue(IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS, enableAnimations.getSelection()); apiStore.setValue(IWorkbenchPreferenceConstants.USE_COLORED_LABELS, useColoredLabels.getSelection()); - ((PreferencePageEnhancer) Tweaklets.get(PreferencePageEnhancer.KEY)).performOK(); IEclipsePreferences prefs = getSwtRendererPreferences(); if (enableMru != null) { @@ -317,7 +305,6 @@ public class ViewsPreferencePage extends PreferencePage implements IWorkbenchPre if (engine != null) { setColorsAndFontsTheme(currentColorsAndFontsTheme); - ((PreferencePageEnhancer) Tweaklets.get(PreferencePageEnhancer.KEY)).performDefaults(); engine.setTheme(defaultTheme, true); if (engine.getActiveTheme() != null) { themeIdCombo.setSelection(new StructuredSelection(engine.getActiveTheme())); diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/DummyPrefPageEnhancer.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/DummyPrefPageEnhancer.java deleted file mode 100644 index 6838c6df0b5..00000000000 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/DummyPrefPageEnhancer.java +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011, 2015 IBM Corporation and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * IBM Corporation - initial API and implementation - ******************************************************************************/ - -package org.eclipse.ui.internal.tweaklets; - -import org.eclipse.swt.widgets.Composite; - -/** - * @since 3.8 - * - */ -public class DummyPrefPageEnhancer extends PreferencePageEnhancer { - - @Override - public void createContents(Composite parent) { - } - - @Override - public void setSelection(Object selection) { - - } - - @Override - public void performOK() { - - } - - @Override - public void performCancel() { - - } - - @Override - public void performDefaults() { - - } - -} diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/PreferencePageEnhancer.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/PreferencePageEnhancer.java deleted file mode 100644 index 3d45b94e7ae..00000000000 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/tweaklets/PreferencePageEnhancer.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011, 2015 IBM Corporation and others. - * - * This program and the accompanying materials - * are made available under the terms of the Eclipse Public License 2.0 - * which accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - * - * Contributors: - * IBM Corporation - initial API and implementation - ******************************************************************************/ - -package org.eclipse.ui.internal.tweaklets; - -import org.eclipse.swt.widgets.Composite; -import org.eclipse.ui.internal.tweaklets.Tweaklets.TweakKey; - -/** - * @since 3.8 - * - */ -public abstract class PreferencePageEnhancer { - public static TweakKey KEY = new Tweaklets.TweakKey(PreferencePageEnhancer.class); - - static { - Tweaklets.setDefault(PreferencePageEnhancer.KEY, new DummyPrefPageEnhancer()); - } - - public abstract void createContents(Composite parent); - - public abstract void setSelection(Object selection); - - public abstract void performOK(); - - public abstract void performCancel(); - - public abstract void performDefaults(); - -} |