Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 265917

Summary: [About] Provide a way for RCP apps to sort installation pages
Product: [Eclipse Project] Platform Reporter: Prakash Rangaraj <prakash>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: bokowski, mistria, pwebster
Version: 3.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Prakash Rangaraj CLA 2009-02-24 01:30:36 EST
Build ID: N20090223-2000

From Bug# 265268, "(*) The order of the tabs are now thru the digits prefixed in their ids. Why can't we have an optional attribute called order in the extension point itself?"

I agree thats been the same behaviour for installation pages & the system configuration extensions and its not a documented behaviour. Its better to add a priority attribute and since it will be useful in RCP apps where their page should come before the features/plugins page
Comment 1 Susan McCourt CLA 2009-02-25 13:48:49 EST
retitling this bug, since the goal is to give RCP apps a way to sort the pages. 

Discussed this with Boris and Paul.  Having an order attribute in the extension point still poses the same problems as the id...an RCP app can't explicitly manage the sort order without hacking the extension of the other plug-ins.

Apparently there is already a mechanism used to sort property pages or something like it.  (Boris/Paul to provide a link).  An RCP app could provide an alternate way to sort the install pages, but the platform would default to using the id. 

Comment 2 Susan McCourt CLA 2009-02-25 17:42:38 EST
info from Paul:

We currently say we support preference and property pages, although the IDE returns the same comparator for all requests.  It allows for us to publish a priority strategy and consume it from org.eclipse.ui.model.IContributionService:

IContributionService cs = (IContributionService) PlatformUI
  .getWorkbench().getActiveWorkbenchWindow().getService(
	IContributionService.class);
treeViewer.setComparator(cs.getComparatorFor(getContributionType()));

It delegates to org.eclipse.ui.application.WorkbenchAdvisor.getComparatorFor(String) in the IDE.

In your case the comparator returned from the IContributionService would sort your extensions for consumption by org.eclipse.ui.internal.about.InstallationDialog.createFolderItems(TabFolder), thus allowing a different WorkbenchAdvisor to sort them differently.

I don't see anything that would preclude this from working, either by wrapping the extensions in an IComparableContribution or providing a slightly different version of the comparator for InstallationPages.
Comment 3 Prakash Rangaraj CLA 2009-02-25 22:21:14 EST
(In reply to comment #2)
> It delegates to
> org.eclipse.ui.application.WorkbenchAdvisor.getComparatorFor(String) in the
> IDE.

    I've created few RCP apps and never knew such a method exists! Will look into this today.
Comment 4 Susan McCourt CLA 2009-06-25 14:16:21 EDT
assigning milestone for investigation in 3.6
Comment 5 Susan McCourt CLA 2009-10-06 17:43:28 EDT
moving to M5 to reevaluate priority against other tasks.
Comment 6 Susan McCourt CLA 2009-12-03 14:01:16 EST
Removing milestone.  This is a good idea, but I don't know yet that we have a real use case where this is needed.  Prakash, please correct me if I'm wrong about that.
Comment 7 Prakash Rangaraj CLA 2009-12-03 14:26:13 EST
(In reply to comment #6)
> Removing milestone.  This is a good idea, but I don't know yet that we have a
> real use case where this is needed.  Prakash, please correct me if I'm wrong
> about that.

   I don't have a real use case with me. So its ok to move out of 3.6.
Comment 8 Mickael Istria CLA 2014-06-26 11:34:46 EDT
What do you call "installation pages" ?
Comment 9 Lars Vogel CLA 2019-11-27 07:41:19 EST
This bug hasn't had any activity in quite some time. Maybe the problem got
resolved, was a duplicate of something else, or became less pressing for some
reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it.
The information can be, for example, that the problem still occurs, that you
still want the feature, that more information is needed, or that the bug is
(for whatever reason) no longer relevant.

If the bug is still relevant, please remove the stalebug whiteboard tag.