[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Hide MenuItems with Keybindings

Wow, this is good stuff! Thanks again. 


> Slide 42. 
> 
> Tom 
> 
> Tom Schindl schrieb: 
>> ISources. 
>> 
>> Tom 
>> Wim Jongman schrieb: 
>>> Hi Tom, 
>>> 
>>> It is difficult to find the correct place in your presentation. By "add 
your 
>>> own variables" do you mean variables in the ISources sense or as Property 
>>> Testers? 
>>> 
>>> Best regards, 
>>> 
>>> Wim Jongman 
>>> 
>>> 
>>>> The solution to this is to add your own variables to the Expression 
>>>> framework disable the command based upon them which will automatically 
>>>> disable the Menu-Item (if you want to hide it simply check the 
>>>> checkEnabled on the visibleWhen). 
>>>> 
>>>> If you want to know how to plug in yourself you can take a look at my 
>>>> EclipseCon-Presentation: 
>>>> * http://live.eclipse.org/node/742 
>>>> * 
>>>> 
>>> 
https://www.linkedx.com/eclipse/#requestedContent=contentID://EclipseConferences/EC2009/446 
>>>> Tom 
>>>> 
>>>> T. Wilhelm schrieb: 
>>>>> Hey all, 
>>>>> 
>>>>> i have an application with a user/rights management. Lets say my 
>>>>> application has the views "a", "b" and "c". For each view there is a 
>>>>> command to open that view, this command is placed in a menu and HAS A 
>>>>> KEYBINDING. 
>>>>> Now if the user has only the right to see view "a" the other two menu 
>>>>> entries should be invisible and the keybinding should not work anymore. 
>>>>> How can i do that? I found the visibleWhen attribute but i have the 
>>>>> problem that i dont know how to check my "user Rights" if the user has 
>>>>> the permission to see that menu entry. In addition i have the problem 
if 
>>>>> i set the menu entry visible the keybinding still works. Thanks alot. 
>>>>> Thomas 
>>>>>