Although preferences can be stored, providing a user interface is necessary for end users. A preference page implements the IPreferencePage
interface. The easiest way is to use FieldEditorPreferencePage
as a super class, which provides most of the standard plug-in behavior needed. Perform the following steps:
Open the
plugin.xml
of theclock.ui
plug-in. In order to declare a new preference page, use theorg.eclipse.ui.preferencePages
extension point. Add the following code:<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>
The same effect can be achieved by editing the
plugin.xml
in the editor and clicking on Add in the Extensions tab and selecting the preferencePages extension point.Create a class
ClockPreferencePage
that extendsFieldEditorPreferencePage
in thecom.packtpub.e4.clock.ui
package as...