I have a condition using which I display an entry in the toolbar. I use menuContribution + command + visibleWhen to display this entry. As soon as I switch to another perspective my entry in the toolbar vanishes even though I have that project/project node selected in my project explorer.
Is it because I use
<visibleWhen> <with variable="selection"> in my plugin.xml ?
How can I keep my toolbar entry visible even if perspectives are switched ,at least it should display in certain fixed perspectives if not all of them....
I want to avoid using actionSets to display my entry in the toolbar as they are not friendly with the propertyTester I am using.
Any help in this regard will be really appreciated,
Thanks !
I am guessing when you shift perspectives, the selection is lost and that is the reason your contributions are not visible. Even though in the project explorer view (or something), the selection is present, it would sometimes be in grey shade indicating no selection. You need to handle selection via code, not extension points.