Although preferences can be stored programmatically, users will typically change them through the user interface. The canonical way of presenting preferences is through a preference page in Eclipse, which can be accessed through the Preferences menu. A preference page implements the IPreferencePage
interface, but the easiest way is to use the FieldEditorPreferencePage
as a superclass, which provides most of the standard plug-in behavior needed, along with the IWorkbenchPreferencePage
interface.
Open the
plugin.xml
of thecom.packtpub.e4.clock.ui
plug-in. To declare a new preference page, use theorg.eclipse.ui.preferencePages
extension point. Add the following:<extension point="org.eclipse.ui.preferencePages"> <page name="Clock" class="com.packtpub.e4.clock.ui.ClockPreferencePage" id="com.packtpub.e4.clock.ui.preference.page"/> </extension>