How I can force evaluation of property tester manually in eclipse 4?

243 Views Asked by At

A application was updated from eclipse 3 to eclipse 4. The evaluation of some property tests are forced manually calling the following lines:

    IEvaluationService service = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class);
    service.requestEvaluation(propertyKey);

This does not work anymore for eclipse 4. So what is the correct way to trigger evaluation?

I have toggle buttons in a toolbar and the toolbar has functionality to edit a graphical component. Commands are used and hooked in tool bar menu as toggle items. Behind each command there are two different handlers and visiblity is managed by property testers (the first ist visible if the other is hidden). After execution the evaluation of property test is forced to set the correct handler executable for next time. Updating all handlers to new @CanExecute method results in much work and tests. It would be good, if there is a way to force evaluation of property testers. It works fine, if selecting another editor/view between two clicks on the same toggle.

0

There are 0 best solutions below