[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Project menu actions don't get enabled/disabled when selecting file from editor view

Hello,

I have a couple of  project menu actions that get enabled and disabled
when the user select a file with a specific extension (*.vxm*) from the
navigator view.  To do this, I have set up my plugin.xml file as
follows:

<extension point="org.eclipse.ui.actionSets">
    <actionSet
        id="com.ibm.voicetools.browser.BrowserActionSet"
        label="Browser"
        visible="true"
        description="Browser Action Set">
        <action
            id="com.ibm.voicetools.browser.text.projectmenu"
            menubarPath="workbench/wbEnd"
            label="%RunTextMode.label"
            icon="icons/run.gif"
            class="com.ibm.voicetools.browser.LaunchBrowserFromProject"
            enablesFor="?">
        <selection class="org.eclipse.core.resources.IFile"
name="*.vxm*"/>
        </action>
        <action id="com.ibm.voicetools.browser.audio.projectmenu"
            menubarPath="workbench/wbEnd"
            label="%RunAudioMode.label"
            icon="icons/run.gif"
            class="com.ibm.voicetools.browser.LaunchBrowserFromProject"
            enablesFor="?">
        <selection class="org.eclipse.core.resources.IFile"
name="*.vxm*"/>
        </action>
    </actionSet>
</extension>

This is all working fine when the user selects a file from the navigator
view.  However, this is not working when the user selects a file from
different editor views.  In this case, the project menu actions don't
get enabled or disabled depending on the extension of the current file
being edited (what I have in my plugin.xml file is being ignored).  I do
notice that the focus on the navigator view changes as the user switches
editors from one file to another, but somehow the focus is not being
taken as a selection.

Is there a way to fix this?

Thanks for your help.
--
Miriam Ford
IBM, Voice Systems Development
8051 Congress Avenue
Boca Raton, Florida  33487
(561)862-3304, T/L 975-3304
email:  miriamf@xxxxxxxxxx