1 18 package org.visualcontent.authentication.simplecredentials.preferences; 19 20 import org.eclipse.jface.preference.FieldEditorPreferencePage; 21 import org.eclipse.jface.preference.FileFieldEditor; 22 import org.eclipse.jface.preference.StringFieldEditor; 23 import org.eclipse.ui.IWorkbench; 24 import org.eclipse.ui.IWorkbenchPreferencePage; 25 import org.visualcontent.authentication.simplecredentials.SimplecredentialsPlugin; 26 27 28 public class SimpleCredentialsPreferencePage 29 extends FieldEditorPreferencePage 30 implements IWorkbenchPreferencePage { 31 32 public SimpleCredentialsPreferencePage() { 33 super(GRID); 34 setPreferenceStore(SimplecredentialsPlugin.getDefault().getPreferenceStore()); 35 setDescription("Configuration for the session of a repository"); 36 } 37 38 44 public void createFieldEditors() { 45 addField(new FileFieldEditor(PreferenceConstants.P_REP_AUTH_CONFIG, 46 "Repository &authorization configuration file:", getFieldEditorParent())); 47 addField(new StringFieldEditor(PreferenceConstants.P_REP_USER_NAME, 48 "&User Name:", getFieldEditorParent())); 49 addField(new StringFieldEditor(PreferenceConstants.P_REP_PASSWORD, 50 "&Password:", getFieldEditorParent())); 51 addField(new StringFieldEditor(PreferenceConstants.P_REP_WORKSPACE, 52 "&Workspace (empty for using the default workspace):", getFieldEditorParent())); 53 } 54 55 58 public void init(IWorkbench workbench) { 59 } 60 61 } | Popular Tags |