I came across the same and found a solution.
What I did was add the sort sequence prefix to the identifier of the property pages that I entered (basically a three-digit number) and create a ContributionComparator that took the first 3 digits of the identifier and made the main appearance.
The code looks something like this:
@Override public int compare(IComparableContribution c1, IComparableContribution c2) { int result = super.compare(c1, c2); IPluginContribution pc1 = (IPluginContribution)c1; IPluginContribution pc2 = (IPluginContribution)c2; String id1 = pc1.getLocalId().substring(0,3); String id2 = pc2.getLocalId().substring(0,3); result = id1.compareTo(id2); return result; }
Then, in WorkbenchAdvisor , I overridden getComparitorFor to create an instance of ContributionComparator, which I created if the contribType property was:
@Override public ContributionComparator getComparatorFor(String contributionType) { ContributionComparator cc; if (contributionType.equals(IContributionService.TYPE_PROPERTY)) { cc = new MyContributionComparator(); } else { cc = super.getComparatorFor(contributionType); } return cc; }
Now the property pages are displayed in the order I want them.
source share