Community
Participate
Working Groups
In reference to: http://www.eclipse.org/forums/index.php?t=msg&th=169015&start=0& There is a bug in the handling of IObjectActionDelegate. After testing in 1.2, it is clear that there used to be separate delegate instances per user. In 1.3M7 there is a shared delegate for all users. The implications of this are described in the thread above.
OK, I spoke too soon. Repeated tests show that in both 1.2 and 1.3 there is a shared delegate, it is just that it is "possible" for the instance to be different because of the workbench logic behind it. This is still a very difficult issue for us to grapple with because we have so many object delegates in our code.
Created attachment 170520 [details] Proposed fix It seems that we have missed two singletons in the workbench: Turning the class ObjectActionContributorManager into a session singleton cures the problem, i.e. it results in separate IActionDelegate instances per user session. Since Workbench#shutdown invokes dispose() on this singleton, I think it is clear that it is meant to have Workbench scope. The same is true for PropertyPageContributionManager.
Created attachment 170521 [details] mylyn/context/zip
I'm convinced that the ObjectPluginAction instances (those are passed as parameter to the IObjectActionDelegate) should have session scope, as they contain state that is related to the workbench instance. I'm not quite sure about the solution. Although it is simple and looks reasonable, it leads to reading the extension registry once for every application. Not sure if there is some better way to do it. Please ignore the mylyn context, this slipped in here by accident.
Committed patch to CVS HEAD.