Bug 65512 - [Contributions] ordering: incorrect ordering of menu items:
Summary: [Contributions] ordering: incorrect ordering of menu items:
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P2 major (vote)
Target Milestone: 3.3   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 15670
Blocks: 66471
  Show dependency tree
 
Reported: 2004-06-03 05:57 EDT by Dirk Baeumer CLA
Modified: 2007-06-21 07:30 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2004-06-03 05:57:24 EDT
RC1

The ordering of the menu items changed in the global search menu. The two 
action Occurrences in File and Exception Occurrences are placed as follows:

- 2.1.3 at the bottom
- M8 or M9: at top
- a build between M9 and RC1: at the bottom
- RC1: at top

We haven't changed anything here in the plugin.xml file in JDT/UI. Can you 
please advice how we can get a stable ordering here
Comment 1 Dirk Baeumer CLA 2004-06-03 05:57:51 EDT
IMO this has to be addressed for 3.0
Comment 2 Erich Gamma CLA 2004-06-09 08:33:47 EDT
in the latest build (200406082000) the ordering is OK.
Has anything change in the implementation or are we still vulnerable?
Comment 3 Michael Van Meekeren CLA 2004-06-09 16:03:59 EDT
I just tried
2.1 - bottom
M9 - bottom
last night 200406082000 - bottom
Comment 4 Erich Gamma CLA 2004-06-09 16:17:18 EDT
I'm sure that I have seen M9 with the items at the top, so there must be 
another influencing factor - plug-in activation order? 
Comment 5 Nick Edgar CLA 2004-06-09 18:01:49 EDT
Plugin activation order should not affect the order of action set actions.  We
process them in action set id order.
Comment 6 Erich Gamma CLA 2004-06-12 12:49:12 EDT
we have seen the problem again when we tried to fix bug# 66471.

The underlying problem is described in bug# 155684, i.e., an action set that 
want to contribute to a menu contributed by another plug-in needs to redefine 
the target menu.

The issue in this case is that the search menu defined in org.eclipse.search 
and the redefinition in org.eclipse.jdt.ui are not consistent. One separator 
is missing:
            <separator
                  name="internalOccurrencesGroup">
            </separator>

This means depending on which search menu definition "wins" you get a 
different order. For 3.0 we will add this separator to the search menu in 
org.eclipse.search. 

Nick stated that the action sets are processed in action set ID order. If this 
is the case then I would have expected that this could also be fixed by 
prefixing the jdt.ui action set with "aaa", but this didn't help.

I'll mark it for RC3 but the change will happen in org.eclipse.search, leaving 
the bug in org.eclipse.ui since this needs to be revisited after 3.0.
Comment 7 Michael Van Meekeren CLA 2004-06-14 13:45:07 EDT
Erich once you have addressed the search component part of this fix, please 
update the milestone for 3.1
Comment 8 Erich Gamma CLA 2004-06-16 12:23:17 EDT
Here is a reproducable case that illustrates that the search menu appears in 
the wrong order:
1) start a fresh workspace
2) create a Java project, BUT stay in the resource perspective
3) create a java file (File>New>File)
4) the file is opened in the Java editor
5) Open the search menu
-> the order is reverted, also the JUnit Referring Tests action is missing.

Next step is to add the <internalgroup> to the search menu in 
org.eclipse.search.
Comment 9 Tod Creasey CLA 2004-06-16 21:09:44 EDT
Moving to Search for 3.0 work. Please move back to UI and mark for 3.1 when 
you are ready for us to continue.
Comment 10 Erich Gamma CLA 2004-06-17 04:53:54 EDT
added the missing separator: 
     <separator name="internalOccurrencesGroup"/>

fix reviewed by Dirk - released into 20040617*

moving bug back to Platform UI
Comment 11 Markus Keller CLA 2004-08-30 10:49:32 EDT
Looks like another dup of bug 15670.
Comment 12 Michael Van Meekeren CLA 2005-05-16 14:24:24 EDT
I don't think we are going to get to this for 3.1
Comment 13 Michael Van Meekeren CLA 2005-11-16 09:38:06 EST
ccing doug.  This might be something we can address with new commands work.
Comment 14 Michael Van Meekeren CLA 2006-04-21 13:56:33 EDT
Moving Dougs bugs
Comment 15 Boris Bokowski CLA 2006-05-15 14:30:23 EDT
Moving to 3.3
Comment 16 Paul Webster CLA 2007-04-05 19:03:08 EDT
Assigning to component owner
PW
Comment 17 Paul Webster CLA 2007-06-20 14:17:28 EDT
This item has been fixed/superceded by the menu contribution mechanism - bug 154130
Comment 18 Dani Megert CLA 2007-06-21 04:16:28 EDT
>This item has been fixed/superceded by the menu contribution mechanism - bug
Please provide more details. Is it now fixed or not? If not, please explain what clients need to change in order to fix their code.
Comment 19 Paul Webster CLA 2007-06-21 07:30:06 EDT
(In reply to comment #18)
> >This item has been fixed/superceded by the menu contribution mechanism - bug
> Please provide more details. Is it now fixed or not? 

In this case one menu contribution can define the menu structure, and one or more other contributions can be added.  Clients that want the more precise ordering abilities will need to migrate to menu contributions/commands.

I was planning on using bug 15670 to increase the adoption of menu contributions in the platform UI code so that others will be able to do the same thing for platform UI action sets.

(this one was marked early on in our bug sweep ... I've taking to mark the later ones as WONTFIX since it requires a migration to the new code).


PW