Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Enable handler based on active page in multi-page editor
Enable handler based on active page in multi-page editor [message #772471] Thu, 29 December 2011 21:32 Go to next message
Timothy Vogel is currently offline Timothy VogelFriend
Messages: 82
Registered: July 2009
Member
Does anyone have an example of enabling a command handler based on the active page of a multi-page editor?

I can enable based on the overall editor via activeEditorId but can't figure out a way to discriminate between pages of the editor. I have tried activePartId in an expression as below, where each <value> in the <or> is a section or page that I want the handler enabled. The handler is still always inactive.

Thanks for reading my question and any help you can provide!

      <definition
            id="rewindPageActive">
         <with
               variable="activePartId">
            <or>
               <equals
                     value="editor.RedesignWireSection">
               </equals>
               <equals
                     value="editor.RedesignWindingSection">
               </equals>
               <equals
                     value="editor.RedesignElectricalSection">
               </equals>
               <equals
                     value="editor.RedesignDensitiesSection">
               </equals>
               <equals
                     value="editor.RedesignCoilsSection">
               </equals>
               <equals
                     value="editor.RedesignCircMilSection">
               </equals>
               <equals
                     value="editor.RewindMotor">
               </equals></or>
         </with>
      </definition>

Re: Enable handler based on active page in multi-page editor [message #774512 is a reply to message #772471] Wed, 04 January 2012 04:00 Go to previous message
Duncan Krebs is currently offline Duncan KrebsFriend
Messages: 31
Registered: June 2011
Location: Bay Area / Mexico
Member

Not sure but when you add editor pages in code, there has to be some method to add a listener I would imagine. Might want to look there. Might also be a method to override on the editor page that is called on focus or onVisible. - Duncan Krebs
Previous Topic:Workaround for TreeViewer bug
Next Topic:Dynamically create eclipse main menu item or global toolbar item
Goto Forum:
  


Current Time: Fri Apr 26 18:35:35 GMT 2024

Powered by FUDForum. Page generated in 0.03114 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top