Community
Participate
Working Groups
UIProcess is an extension to the Jobs API of Eclipse. However it is missing the IJobChangeListener equivalent that the Jobs API offers. In this usecase we were looking for a way to offer a method in the SubModuleController called "loadDataForViewInUIProcess" that would return for each controller the instance of a started UIProcess. The superclasses monitors through the new change listener the UIProcess and only when its finished, does it unblock the view. The submoduleController could also make sure that "loadDataForViewInUIProcess" is not called multiple times.
Created attachment 203401 [details] proof of concept but not code to be committed This code was create by Heiko Barth and is not intended to be committed into CVS. It shows an idea on how to address the problem with the SubModuleController which lead to the discussion that the best solution is a IUIProcessChangeListener
Fixed and pushed Usage: UIProcess p = new UIProcess(...); p..addUIProcessChangedListener(new IUIProcessChangeListener() { public void onInitialUpdateUI(final int totalWork) { ... } public void onFinalUpdateUI() { ... } });
Reopening since a predictable execution order is desired. The IUIProcessChangeListeners should be called _after_ the UIProcess.initialUpdateUI() method.
The IUIProcessChangeListener will be always called after the methods UIProcess.initialUpdateUI() and UIProcess.finalUpdateUI() Usage: UIProcess p = new UIProcess(...); p..addUIProcessChangedListener(new IUIProcessChangeListener() { public void afterInitialUpdateUI(final int totalWork) { ... } public void afterFinalUpdateUI() { ... } });