Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333792 - MenuContribution with visibleWhen Expression make whole menu disappear
Summary: MenuContribution with visibleWhen Expression make whole menu disappear
Status: CLOSED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-08 03:45 EST by Thomas Kratz CLA
Modified: 2011-05-30 10:47 EDT (History)
1 user (show)

See Also:


Attachments
Example project (3.80 KB, application/zip)
2011-01-10 12:22 EST, Paul Webster CLA
no flags Details
application.xmi (5.44 KB, application/octet-stream)
2011-02-19 10:18 EST, Thomas Kratz CLA
no flags Details
reproduce the menu disappears in rcp mail app (113.01 KB, application/x-zip-compressed)
2011-02-22 06:37 EST, Thomas Kratz CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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