have rather have linked the menu to a perspective as opposed to a view,
not sure i understand correctly, but setting the actionset in question to
visible=false and adding it as perspectiveExtension to your desired
perspective in plugin.xml should do the trick:
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="NJVPlugin.shortPerspective"><---the
id of the perspective you wish to have the menu visible
<actionSet id="NJVPlugin.actionTestSet"/>
</perspectiveExtension>
</extension>
...
the menu that should appear or not depending of the perspective:
<actionSet
id="NJVPlugin.actionTestSet"
label="testset"
visible="false">
<menu
id="NJVPlugin.testMenu"
label="TestMenu"/>
<action
class="TestActionPopup"
id="NJVPlugin.actionTest"
label="TestAction"
menubarPath="NJVPlugin.testMenu/actionTest"
style="push"/>
</actionSet>