Package tk.eclipse.plugin.htmleditor

Source Code of tk.eclipse.plugin.htmleditor.JSPEditorPreferencePage

package tk.eclipse.plugin.htmleditor;

import org.eclipse.jface.preference.ColorFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

/**
* @author Naoki Takezoe
*/
public class JSPEditorPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
 
  private ColorFieldEditor colorComment;
  private ColorFieldEditor colorString;
  private ColorFieldEditor colorKeyword;

  public JSPEditorPreferencePage() {
    super(GRID); //$NON-NLS-1$
    setPreferenceStore(HTMLPlugin.getDefault().getPreferenceStore());
  }

  public void init(IWorkbench workbench) {
  }
 
  protected void createFieldEditors() {
    setTitle(HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSP"));
   
    Composite parent = getFieldEditorParent();
   
    colorComment = new ColorFieldEditor(HTMLPlugin.PREF_JSP_COMMENT,
          HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPCommentColor"),
          parent); //$NON-NLS-1$
    addField(colorComment);
   
    colorString = new ColorFieldEditor(HTMLPlugin.PREF_JSP_STRING,
          HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPStringColor"),
          parent); //$NON-NLS-1$
    addField(colorString);
   
    colorKeyword = new ColorFieldEditor(HTMLPlugin.PREF_JSP_KEYWORD,
        HTMLPlugin.getResourceString("HTMLEditorPreferencePage.JSPKeywordColor"),
        parent); //$NON-NLS-1$
    addField(colorKeyword);
  }

}
TOP

Related Classes of tk.eclipse.plugin.htmleditor.JSPEditorPreferencePage

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.