Package org.nodeclipse.mongodb.preferences

Source Code of org.nodeclipse.mongodb.preferences.MongodbPreferencePage

package org.nodeclipse.mongodb.preferences;

import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.FileFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.nodeclipse.ui.Activator;
import org.nodeclipse.ui.preferences.PreferenceConstants;

/**
* @author Paul Verest
* @since 0.11 moved from NodePreferencePage
*/
public class MongodbPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

    private FileFieldEditor mongoDBShellPath;
    private StringFieldEditor mongoDBShellOptions;
   
  public MongodbPreferencePage(){
      super(GRID);
      setPreferenceStore(org.nodeclipse.ui.Activator.getDefault().getPreferenceStore());
      setImageDescriptor(org.nodeclipse.mongodb.Activator.getImageDescriptor("icons/mongodb.png"));
      setDescription("Mongodb Shell settings");
  }
 
  @Override
  public void init(IWorkbench workbench) {
  }

  @Override
  protected void createFieldEditors() {
        mongoDBShellPath = new FileFieldEditor(PreferenceConstants.MONGODB_SHELL_PATH, "MongoDB Shell path:", getFieldEditorParent());
        addField(mongoDBShellPath);
       
        mongoDBShellOptions = new StringFieldEditor(PreferenceConstants.MONGODB_SHELL_OPTIONS, "MongoDB Shell options:", getFieldEditorParent());
        addField(mongoDBShellOptions);
       
  }

}
TOP

Related Classes of org.nodeclipse.mongodb.preferences.MongodbPreferencePage

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.