5
comments
Wednesday, March 31, 2010
When you use some of the Eclipse IDE plugins they may contribute preference pages that you may not necessarily want to show to your users.
Remove them in the ApplicationWorkbenchWindowAdvisor.postWindowCreate():
PreferenceManager pm = PlatformUI.getWorkbench( ).getPreferenceManager();
pm.remove("org.eclipse.ui.preferencePages.Workbench");
The "org.eclipse.ui.preferencePages.Workbench" id removes the "General" preference page group. If you do not know the id for the page you want to remove. You can first print them like this:
PreferenceManager pm = PlatformUI.getWorkbench( ).getPreferenceManager();
IPreferenceNode[] arr = pm.getRootSubNodes();
for(IPreferenceNode pn:arr){
System.out.println("Label:" + pn.getLabelText() + " ID:" + pn.getId());
}
