Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Command selected state
Command selected state [message #993118] Sun, 23 December 2012 07:43 Go to previous message
Frank Benoit is currently offline Frank Benoit
Messages: 40
Registered: July 2009
Member
Hi

when I create a checkbox style command ("Cmd1") which shall be visible in the menu bar and the toolbar, the state is not synchronized.

What do I miss, to get the "checked" state maintained by a single state only?

  

// Command decl
<commands xmi:id="_2EdVYEr2EeK2l8Ho1g9J8Q" elementId="e4test2.command.0" commandName="Cmd1" description="Cmd1 Description"/>

// Handler decl
<handlers xmi:id="_bGiy4Er1EeK2l8Ho1g9J8Q" elementId="e4test2.handler.0" contributionURI="bundleclass://E4Test2/e4test2.StdHandler" command="_2EdVYEr2EeK2l8Ho1g9J8Q"/>
  

// main toolbar decl
<trimBars xmi:id="_VOV6ANTAEeGTY-uOtVc6Mg">
      <children xsi:type="menu:ToolBar" xmi:id="toolbar:org.eclipse.ui.main.toolbar" elementId="">
        <children xsi:type="menu:HandledToolItem" xmi:id="_bcx2sEr3EeK2l8Ho1g9J8Q" elementId="e4test2.handleditem.cmd1" label="cmd1lbl" iconURI="platform:/plugin/E4Test2/icons/alt_window_16.gif" type="Check" command="_2EdVYEr2EeK2l8Ho1g9J8Q"/>
   
// main menu decl
    <mainMenu xmi:id="_ydmDwErzEeK2l8Ho1g9J8Q" elementId="e4test2.menu.0">
      <children xsi:type="menu:Menu" xmi:id="_wP9uAEz1EeKq5-u9QAXssw" elementId="e4test2.menu.file" label="File" mnemonics="">
        <children xsi:type="menu:HandledMenuItem" xmi:id="_3EQsUEz1EeKq5-u9QAXssw" elementId="org.eclipse.ui.file.exit" label="Exit" command="_MBOOcEz2EeKq5-u9QAXssw"/>
      </children>
      <children xsi:type="menu:Menu" xmi:id="_7W0uQErzEeK2l8Ho1g9J8Q" elementId="e4test2.menu.0" label="Example">
        <children xsi:type="menu:HandledMenuItem" xmi:id="_809Y0Er2EeK2l8Ho1g9J8Q" elementId="e4test2.handleditem.cmd1" selected="true" type="Check" command="_2EdVYEr2EeK2l8Ho1g9J8Q"/>
      </children>
    </mainMenu>


thanks
Frank
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Workbench Eventing
Next Topic:Close part programmatically
Goto Forum:
  


Current Time: Sat May 18 15:34:28 EDT 2013

Powered by FUDForum. Page generated in 0.01853 seconds