When the preference page is created, if it does not specify a location (known as a category
in the plugin.xml
file and manifest editor), it is inserted into the top level. This is appropriate for some kinds of project (for example, Mylyn, Java, and Plug-in Development); but many plug-ins should contribute into an existing location in the preference page tree.
org.eclipse.ui.preferencePages.Workbench
as the category:<extension point="org.eclipse.ui.preferencePages"> <page name="Clock"id="com.packtpub.e4.clock.ui.preference.page"category="org.eclipse.ui.preferencePages.Workbench"class="com.packtpub.e4.clock.ui.ClockPreferencePage"/> </extension>
Preferences
. The Clock preference page should now be under the General tree node instead:The preference page can be placed anywhere in the hierarchy by specifying the parent page's ID in the category attribute. The parent pages can be listed by navigating to Window | Show View | Other | Console and opening a Host OSGI Console, followed by running the following command:
osgi> pt -v org.eclipse.ui.preferencePages Extension point: org.eclipse.ui.preferencePages [from org.eclipse.ui] Extension(s): ------------------- null [from org.eclipse.ant.ui] <page> name = Ant class = org.eclipse.ant.internal.ui.preferences.AntPreferencePage id = org.eclipse.ant.ui.AntPreferencePage </page> ...
Another way of listing the IDs is to use the Browse button via the plugin.xml
editor. From the extension point defining the Clock preference page, the Browse button next to the category field will bring up a dialog containing all the valid IDs, including a search filter to reduce the number of matches:
18.224.39.74