1 11 12 13 package org.eclipse.ui.texteditor; 14 15 16 import org.eclipse.swt.widgets.Composite; 17 18 import org.eclipse.core.runtime.Platform; 19 import org.eclipse.core.runtime.Plugin; 20 21 import org.eclipse.jface.preference.IPreferenceStore; 22 import org.eclipse.jface.resource.JFaceResources; 23 import org.eclipse.jface.text.PropagatingFontFieldEditor; 24 25 import org.eclipse.ui.plugin.AbstractUIPlugin; 26 27 28 42 public class WorkbenchChainedTextFontFieldEditor extends PropagatingFontFieldEditor { 43 44 51 public WorkbenchChainedTextFontFieldEditor(String name, String labelText, Composite parent) { 52 super(name, labelText, parent, EditorMessages.WorkbenchChainedTextFontFieldEditor_defaultWorkbenchTextFont); 53 } 54 55 62 public static void startPropagate(IPreferenceStore target, String targetKey) { 63 Plugin plugin= Platform.getPlugin("org.eclipse.ui.workbench"); if (plugin instanceof AbstractUIPlugin) { 65 AbstractUIPlugin uiPlugin= (AbstractUIPlugin) plugin; 66 IPreferenceStore store= uiPlugin.getPreferenceStore(); 67 if (store != null) 68 PropagatingFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT, target, targetKey); 69 } 70 } 71 } 72 73 | Popular Tags |