Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331441 - [Compatibility] 'Search' menu disappears after installing CDT plug-ins
Summary: [Compatibility] 'Search' menu disappears after installing CDT plug-ins
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 4.1 M6   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 330801 331305 (view as bug list)
Depends on:
Blocks: 331444
  Show dependency tree
 
Reported: 2010-11-30 09:46 EST by Remy Suen CLA
Modified: 2011-02-24 16:29 EST (History)
5 users (show)

See Also:


Attachments
Another plugin.xml that shows the problem (8.29 KB, text/xml)
2010-12-14 04:28 EST, Martin Oberhuber CLA
no flags Details
Work in progress v01 (33.77 KB, patch)
2011-02-07 15:44 EST, Paul Webster CLA
no flags Details | Diff
Work in progress v03 (46.38 KB, patch)
2011-02-15 07:57 EST, Paul Webster CLA
no flags Details | Diff
handled menus as shared elements v04 (47.61 KB, patch)
2011-02-23 15:03 EST, Paul Webster CLA
no flags Details | Diff
handled menus as shared elements v05 (48.17 KB, patch)
2011-02-24 15:11 EST, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-11-30 09:46:03 EST
Build id: I20101126-1155

1. Install everything from: http://download.eclipse.org/dsdp/tm/updates/3.3milestones
2. Restart.
3. The 'Search' menu is gone.

Launching an inner with "just" JDT confirms that the menu reappears.

Launching an inner with _all_ plug-ins confirms that the menu is gone.
Comment 1 Remy Suen CLA 2010-11-30 10:00:45 EST
The problem is actually coming from org.eclipse.cdt.ui somewhere.

Get the two CDT bundles from /cvsroot/tools:
org.eclipse.cdt/all/org.eclipse.cdt.core
org.eclipse.cdt/all/org.eclipse.cdt.ui

Launch your inner with just core, the 'Search' menu is there. Add the ui bundle, the 'Search' menu is now gone.
Comment 2 Remy Suen CLA 2010-11-30 10:11:20 EST
The plugin.xml snippet below will reproduce the problem.

<extension point="org.eclipse.ui.actionSets">
  <actionSet
      label="aLabel"
      description="aDescription"
      visible="false"
      id="org.eclipse.e4.test">
    <menu
        label="Search"
        id="org.eclipse.search.menu">
    </menu>
  </actionSet>
</extension>

The important point here is that the menu being defined shares the exact same id as the one that comes from org.eclipse.search and that the 'visible' attribute has been set to 'false' in this case.
Comment 3 Remy Suen CLA 2010-11-30 10:14:57 EST
I have confirmed that this problem occurs in 4.1M3.
Comment 4 Remy Suen CLA 2010-11-30 11:09:28 EST
Note that org.eclipse.jdt.junit defines a similar action set extension (with 'visible' set to 'false').

The difference is that that action set ("org.eclipse.jdt.junit.JUnitActionSet") is active.
Comment 5 Remy Suen CLA 2010-11-30 11:10:07 EST
This bug may be related to bug 330801.
Comment 6 Remy Suen CLA 2010-11-30 11:18:33 EST
*** Bug 330801 has been marked as a duplicate of this bug. ***
Comment 7 Remy Suen CLA 2010-11-30 11:19:36 EST
The 'visible' attribute is set to 'true' in the action set contribution from org.eclipse.search. So, it feels to me like all of the elements defined under that action set should be visible in all perspectives unless it has been explicitly disabled via perspective customization.
Comment 8 Paul Webster CLA 2010-11-30 11:57:41 EST
It probably has to do with menu processing from multiple sources.

We need to make a menu like Search exist as long as the 3 or 4 MMenuContributions exist, and be the "OR" of the visibility of all the MMCs.

PW
Comment 9 Martin Oberhuber CLA 2010-12-14 04:14:12 EST
*** Bug 331305 has been marked as a duplicate of this bug. ***
Comment 10 Martin Oberhuber CLA 2010-12-14 04:28:53 EST
Created attachment 185112 [details]
Another plugin.xml that shows the problem

We have a commercial improvement of Search (a search index, plus improved UI) which also shows the problem of missing toplevel Search menu - although I didn't find any "visible:false" clause. I'm attaching the plugin.xml for reference.
Comment 11 Martin Oberhuber CLA 2010-12-15 18:26:43 EST
Just to mention, this bug is the primary impediment for me using 4.1 as my main development environment. I need CDT installed, but it's pretty hard to live without a Search menu. The Ctrl+H keyboard shortcut is the best workaround I've found so far, but it's not really intuitive.
Comment 12 Thomas Kratz CLA 2010-12-29 09:19:01 EST
I don't know exactly but I found the same when installing subversive plugins
Comment 13 Martin Oberhuber CLA 2011-01-21 08:49:44 EST
Ping, any update on this?

For me, this issue is the #1 problem why I cannot use 4.1 productively.
Comment 14 Paul Webster CLA 2011-01-27 07:13:40 EST
(In reply to comment #13)
> Ping, any update on this?
> 
> For me, this issue is the #1 problem why I cannot use 4.1 productively.

I'm looking at this now, possibly ref counting menus and leaving them visible=true (MenuManager doesn't render if there are no children).

PW
Comment 15 Paul Webster CLA 2011-02-07 15:44:27 EST
Created attachment 188473 [details]
Work in progress v01

This is the "change the generation" part.  Consuming the MMenus by a reference of some kind is next.

PW
Comment 16 Paul Webster CLA 2011-02-15 07:57:01 EST
Created attachment 188989 [details]
Work in progress v03

Start processing the contributions.  Manage visibility as the "OR" of multiple contributions.

PW
Comment 17 Paul Webster CLA 2011-02-23 15:03:31 EST
Created attachment 189631 [details]
handled menus as shared elements v04

This is close, I still need to account for one extra MMenuContribution in my tests.

PW
Comment 18 Paul Webster CLA 2011-02-24 15:11:36 EST
Created attachment 189741 [details]
handled menus as shared elements v05

Resolved the sharing of MMenus.

PW
Comment 19 Paul Webster CLA 2011-02-24 16:29:56 EST
Released for tonight's I build, I20110224-2000

PW