Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how to fire a PropertyTester between MultiPageEditor pages?(I can use activeEditor, but it doesnt fire the property tester between form pages)
how to fire a PropertyTester between MultiPageEditor pages? [message #493682] Tue, 27 October 2009 14:44 Go to next message
TC  is currently offline TC Friend
Messages: 2
Registered: October 2009
Junior Member
Hi all,

I am creating an RCP app and I am using the command framework to assign menu item actions to perform actions on open editors.

My problem:
I am trying to disable a menu item based on what FormPage is currently active inside a MultiPageEditor.

Inside my MultiPageEditor, I have a FormPageA class and a FormPageB class as my possible types of pages.

I have a menu item in my file menu that I want to be disabled when FormPageA is active, but enabled on FormPageB.

So, I have created a property tester that I am successfully able to set the menu item to disabled when the editor opens and FormPageA is the default page. But when the user clicks on the tab to switch to FormPageB, it does not fire the property tester to enable the menu item again.

I expected this functionality since I am using an 'activeEditor (with)' expressions.definitions. What I am wondering is if there is a similar command to 'activeEditor' that will fire the property tester when the user switches between FormPageA and FormPageB?

if not, is there some other way I can do this?

Thanks,

TC
Re: how to fire a PropertyTester between MultiPageEditor pages? [message #493742 is a reply to message #493682] Tue, 27 October 2009 18:44 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

activeEditor hasn't changed, simply a form page within the editor (hence no update for your property tester).

But you can use org.eclipse.ui.services.IEvaluationService.requestEvaluation (String) to cause your property tester to be re-evaluated when the page changes.

PW


Re: how to fire a PropertyTester between MultiPageEditor pages? [message #493750 is a reply to message #493742] Tue, 27 October 2009 19:48 Go to previous message
TC  is currently offline TC Friend
Messages: 2
Registered: October 2009
Junior Member
worked like a charm, thanks so much, PW!


TC
Previous Topic:update site with http basic authentication
Next Topic:Adding image to initial page Composite on opening of applictaion
Goto Forum:
  


Current Time: Sat Mar 30 00:59:24 GMT 2024

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

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

Back to the top