Package org.playframework.playclipse.preferences

Source Code of org.playframework.playclipse.preferences.PlayEditorPreferencePage

package org.playframework.playclipse.preferences;

import java.util.Iterator;
import java.util.Map;

import org.eclipse.jface.preference.ColorFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.playframework.playclipse.PlayPlugin;

public abstract class PlayEditorPreferencePage
  extends FieldEditorPreferencePage
  implements IWorkbenchPreferencePage {

  public PlayEditorPreferencePage() {
    super(GRID);
    setPreferenceStore(PlayPlugin.getDefault().getPreferenceStore());
  }

  public void createFieldEditors() {
    Iterator<Map.Entry<String, String>> it = getColorFields().entrySet().iterator();
    while (it.hasNext()) {
      Map.Entry<String, String> pairs = it.next();
      addField(new ColorFieldEditor(pairs.getKey(), pairs.getValue(), getFieldEditorParent()));
    }
  }

  public void init(IWorkbench workbench) {
  }

  public abstract Map<String, String> getColorFields();

}
TOP

Related Classes of org.playframework.playclipse.preferences.PlayEditorPreferencePage

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.