如何将menuListener添加到由以下xml生成的菜单中,以便在焦点位于特定菜单(未点击)时我可以执行某些操作。
<extension
point="org.eclipse.ui.editorActions">
<editorContribution
targetID="net.sourceforge.texlipse.TexEditor"
id="net.sourceforge.texlipse.editor.editorContribution">
<menu
label="&TTS Settings"
id="net.sourceforge.texlipse.menus.tts">
<separator name="sourceGroup"/>
<separator name="latexGroup"/>
<separator name="commentGroup"/>
<separator name="spellGroup"/>
</menu>
<action
class="net.sourceforge.texlipse.actions.TTSPdfModeAction"
icon="icons/start.png"
id="net.sourceforge.texlipse.actions.TTSPdfModeAction"
definitionId="net.sourceforge.texlipse.commands.PDF"
label="&PDF"
menubarPath="net.sourceforge.texlipse.menus.tts/sourceGroup"
style="push"
toolbarPath="latexGroup"
tooltip="PDF"/>
<action
class="net.sourceforge.texlipse.actions.TTSStopAction"
icon="icons/stop.png"
id="net.sourceforge.texlipse.actions.TTSStopAction"
definitionId="net.sourceforge.texlipse.commands.TTSStop"
label="&Stop"
menubarPath="net.sourceforge.texlipse.menus.tts/sourceGroup"
style="push"
toolbarPath="latexGroup"
tooltip="Stop"/>
</editorContribution>
</extension>