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());
}
5 comments:
Thanks, your blog helped me a lot !
Thanks for your help!
Thank you very much! That was very useful.
How to do this in Eclipse e4 (http://www.eclipse.org/e4/) ??
Thank you very much! I needed exactly this.
Post a Comment