This depends on what class your editor is derived from. If it is derived from org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
or one of its many subclasses then you can override collectContextMenuPreferencePages
. The default for this is:
/**
* Returns the preference page ids of the preference pages to be shown when executing the
* preferences action from the editor context menu. The first page will be selected.
* <p>
* Subclasses may extend or replace.
* </p>
*
* @return the preference page ids to show, may be empty
*/
protected String[] collectContextMenuPreferencePages() {
return new String[] { "org.eclipse.ui.preferencePages.GeneralTextEditor",
"org.eclipse.ui.editors.preferencePages.Annotations",
"org.eclipse.ui.editors.preferencePages.QuickDiff",
"org.eclipse.ui.editors.preferencePages.Accessibility",
"org.eclipse.ui.editors.preferencePages.Spelling",
"org.eclipse.ui.editors.preferencePages.LinkedModePreferencePage",
"org.eclipse.ui.preferencePages.ColorsAndFonts",
};
}