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

Bug 333792

Summary: MenuContribution with visibleWhen Expression make whole menu disappear
Product: [Eclipse Project] e4 Reporter: Thomas Kratz <eiswind>
Component: UIAssignee: Project Inbox <e4.ui-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: unspecified   
Target Milestone: 4.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Example project
none
application.xmi
none
reproduce the menu disappears in rcp mail app none

Description Thomas Kratz CLA 2011-01-08 03:45:46 EST
Build Identifier: e4 M4a

I contribute a menuItem (regaldsless if to the menu or my toolbar, happens all the way)
<menuContribution
            allPopups="false"
            locationURI="menu:file">
         <command
               commandId="de.eiswind.mango.client.onix.ftp.command"
               icon="icons/ftp.gif"
               label="Onix FTP Transfer"
               
               tooltip="Onix FTP Transfer">
               <visibleWhen>
               	 <with
                     variable="de.eiswind.mango.client.onix.ftp.cansee">
                    <equals
                          value="enabled">
                    </equals>
               </with>
            </visibleWhen>
         </command>
      </menuContribution>

Regardless of the expression result, be it true or false my whole main menu disappears completely when I have the thing in it.

Reproducible: Always
Comment 1 Paul Webster CLA 2011-01-10 12:22:21 EST
Created attachment 186405 [details]
Example project

Thomas, I tried your example (with one minor change) in my 4.1 SDK and I see it working correctly.

Could you take the sample plugin and modify it so it exhibits the same behaviour?  Or are there errors (either in the .log or console) that haven't been attached to this email?

PW
Comment 2 Thomas Kratz CLA 2011-02-19 10:15:38 EST
H
Comment 3 Thomas Kratz CLA 2011-02-19 10:18:40 EST
Created attachment 189345 [details]
application.xmi

Hi Remy, sorry it took me some time to get the last release out on 3.6. Now I'm back. Unfortunately I cannot reproduce this with your example project. Can you hav a look at my application.xmi ? Maybe I have something wrong there.
It still happening on M5. Even when the expression is true, the whole damn main menu is gone.
Comment 4 Thomas Kratz CLA 2011-02-22 06:36:28 EST
I am able to reproduce with the sample RCP mail application. I guess it must be in my application.e4xmi thats wrong.

Can you have a look at it (will attach the mail app, just launch inside e4M5)
It has no menu.
Comment 5 Thomas Kratz CLA 2011-02-22 06:37:31 EST
Created attachment 189472 [details]
reproduce the menu disappears in rcp mail app

I would really appreciate if someone takes a look at this.
Comment 6 Thomas Kratz CLA 2011-02-24 03:20:41 EST
I found the problem in my e4xmi. Closing this one