views:

41

answers:

2

Currently, when I contribute property pages to Eclipse using the org.eclipse.ui.propertyPages extension point, the individual property pages show up in the property dialog in alphabetical order based on the pages name.

Is there a way to control the order that property pages are listed? I want the basic property page to always show up first, with less important page after it.

I've tried changing the id of the page, but it doesn't appear to have any effect.

Any suggestions?


FWIW: It looks like base eclipse can do it ... in the contributePropertyPage method of RegistryPageContributor, it sets the priority of the PropertyPageNode to -1 if the property page id is "org.eclipse.ui.propertypages.info.file". This is exactly what I want to do.

A: 

You could make the less important page a sub-property page of the basic property page.

You could use a hide / show method to put all the properties on the same page.

Gilbert Le Blanc
Not sure what you mean by 'sub-property page'.
david
@david: Sorry, I was thinking of preference pages when I typed that.
Gilbert Le Blanc
A: 

Figured it out!

What I needed to do is provide my own ContributionComparator in my WorkbenchAdvisor class.

The ContributionComparator has a compare method that allows me to determine the sort order of items in the property page list.

Found the information here.

david