Community
Participate
Working Groups
I bind an expression-based activity to a command and try to make it visible and unvisible at runtime with the help of a custom ISourceProvider. It works in principle fine, but the expression is not evaluated at startup. The wanted behavior appears first after the first ISourceProvider.fireSourceChanged(). Another way to get it work was to use IEvaluationService in order to force an evaluation. I have packaged an example workspace with a rcp application which shows this behavior. The IncrementCommand is contributed to a menu and a view toolbar and is binded to an activity. The ChangeRightCommand iterate between a valid expression value and an unvalid value for the mentioned activity.
Created attachment 113602 [details] Workspace with example rcp
Prakash, please investigate the example. Things you are looking for are 1) what happens to source providers when they are added? Do we fire the source change when we instantiate a new source provider? 2) do we create activities after the source provider is created and not evaluate them (this is less likely, as the act of adding an expression to the IEvaluationService should fire the property change event at least once). PW
Created attachment 119243 [details] Patch v01 Paul, You are right. When the source provider is added, the variables are updated, but the source changed is not fired in the ExpressionAutority. If we fire the change, then it works fine. Patch attached.
(In reply to comment #3) > Created an attachment (id=119243) [details] > Patch v01 Released to HEAD >20081204 PW
Verified in I20081208-1800
*** Bug 274285 has been marked as a duplicate of this bug. ***