/**
* 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",
};
}
1 回答
这取决于您的编辑器派生自哪个类 . 如果它是从
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
或其众多子类之一派生的,那么您可以覆盖collectContextMenuPreferencePages
. 默认值为: