1 package freemarker.eclipse.preferences; 2 3 import org.eclipse.jface.preference.BooleanFieldEditor; 4 import org.eclipse.jface.preference.ColorFieldEditor; 5 import org.eclipse.jface.preference.FieldEditorPreferencePage; 6 import org.eclipse.ui.IWorkbench; 7 import org.eclipse.ui.IWorkbenchPreferencePage; 8 9 import freemarker.eclipse.FreemarkerPlugin; 10 11 24 25 public class EditorPreferencePage 26 extends FieldEditorPreferencePage 27 implements IWorkbenchPreferencePage, IPreferenceConstants { 28 29 public EditorPreferencePage() { 30 super(GRID); 31 setPreferenceStore(FreemarkerPlugin.getDefault().getPreferenceStore()); 32 setDescription("Highlighting Settings"); 33 } 34 35 41 42 public void createFieldEditors() { 43 44 addField(new ColorFieldEditor(COLOR_DIRECTIVE, 45 "Directive:", getFieldEditorParent())); 46 addField(new ColorFieldEditor(COLOR_INTERPOLATION, 47 "Interpolation:", getFieldEditorParent())); 48 addField(new ColorFieldEditor(COLOR_TEXT, 49 "Text:", getFieldEditorParent())); 50 addField(new ColorFieldEditor(COLOR_COMMENT, 51 "Comment:", getFieldEditorParent())); 52 addField(new ColorFieldEditor(COLOR_STRING, 53 "String:", getFieldEditorParent())); 54 addField(new BooleanFieldEditor(XML_HIGHLIGHTING, 55 "HTML/XML Highlighting", getFieldEditorParent())); 56 addField(new ColorFieldEditor(COLOR_XML_TAG, 57 "HTML/XML Tag:", getFieldEditorParent())); 58 addField(new ColorFieldEditor(COLOR_XML_COMMENT, 59 "HTML/XML Comment:", getFieldEditorParent())); 60 } 61 62 public void init(IWorkbench workbench) { 63 } 64 } | Popular Tags |