Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-debug-dev] ElementContentProvider returns some children but IModelSelectionPolicy#replaceInvalidSelection is called as if the children were missing in the tree viewer

Hello,

In some reproducible scenario my implementation of ElementContentProvider returns correct children (stack frames), however when viewer tries to set a selection on a top frame, it is not in the in the viewer's tree. Therefore IModelSelectionPolicy#replaceInvalidSelection method is called. In the latter can confirm that indeed children just returned by the ElementContentProvider did not make it to the tree.

Once the selection calculated by IModelSelectionPolicy has been set, however, I can see the children in question happily attached to their parent (thread) in the LaunchView.

Not being able to set selection on the model's children breaks the debug context, updates of the VariablesView and does other bad things. The user has to know that he must manually select a child in order to proceed with the debugging process.

It seems that the updates from the model somehow get to the viewer AFTER the selection is being attempted to be set for the top child (frame).

How can I prevent this seemingly concurrent issue? From what I read here http://www.slideshare.net/guest3bd2a12/debug-tutorial-custom-integration-presentation-668660 asynchronous ElementContentProvider is supposed to notify its listeners on the completion of the child updates. It seems that somehow this notification happens either out of order, or the content of the child updates is somehow get broken.

Any thoughts would be greatly appreciated.

Thanks.

Vladimir

Back to the top