How to remove unwanted Preference Pages

by Jay Jonas

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 don’t know the id for the page you want to remove, so you can first try to 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());

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: