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();

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());


Lance said...

Thanks, your blog helped me a lot !

prusch said...

Thanks for your help!

Ioana said...

Thank you very much! That was very useful.

Kuldeep said...

How to do this in Eclipse e4 ( ??

Sheldon Warkentin said...

Thank you very much! I needed exactly this.

Post a Comment