menu - Use of IPageLayout.addActionSet() -


i'm defining own perspective using:

<extension point="org.eclipse.ui.perspectives"> 

in implementation of iperspectivefactory::createinitiallayout() want use ipagelayout.addactionset() points new actionset. actionsets deprecated; recommended alternative?

the reason want add new actionset want run menu display debug actions, not run actions. if use layout.addactionset(idebuguiconstants.launch_action_set) both. figured i'd define own actionset debug variants in. i'd use non deprecated api. what's recom

the alternative use org.eclipse.ui.menus extension point menu items. can't add perspective, instead have use visiblewhen element control when menu shown.

for example how pde plugin adds menu navigate menu when plugin development perspective active or search action set in use:

  <extension          point="org.eclipse.ui.menus">       <menucontribution             locationuri="menu:navigate?after=open.ext2">          <separator                name="org.eclipse.pde.ui.openpluginartifactseparator"                visible="true">          </separator>          <command                commandid="org.eclipse.pde.ui.openpluginartifact"                icon="$nl$/icons/obj16/open_artifact_obj.gif"                label="%pluginsearch.action.menu.name">             <visiblewhen>             <or>                 <with                      variable="activeworkbenchwindow.currentperspective">                     <equals                         value="org.eclipse.pde.ui.pdeperspective">                     </equals>                 </with>                 <with                      variable="activecontexts">                   <iterate                         operator="or">                      <equals                            value="org.eclipse.pde.ui.searchactionset">                      </equals>                   </iterate>                </with>            </or>             </visiblewhen>          </command>       </menucontribution> 

although action sets deprecated not going removed long time lot of eclipse code still uses them, may want stick them.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -