package com.simonepezzano.hshare.preferences;
import hshare.Activator;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IntegerFieldEditor;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
/**
* the main preference page
* @author Simone Pezzano
*
*/
public class HMainPreferencePage
extends FieldEditorPreferencePage
implements IWorkbenchPreferencePage {
public static final String ID = "HShare.mainPreferencePage";
public HMainPreferencePage() {
super(GRID);
setPreferenceStore(Activator.getDefault().getPreferenceStore());
setDescription("General program preferences");
}
public void createFieldEditors() {
addField(new StringFieldEditor(PreferenceConstants.P_IPURLSERVICE,
"&External IP address service URL:", getFieldEditorParent()));
addField(
new IntegerFieldEditor(
PreferenceConstants.P_LISTENINGPORT,
"&Listening port",
getFieldEditorParent()));
}
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
public void init(IWorkbench workbench) {
}
}