|ViewPart closing - causing content provider to be disposed [message #665749]
||Fri, 15 April 2011 17:54
Registered: February 2011
I hope I am posting this question in the correct forum and express my question clearly.
I have 2 ViewPart(s), say, ViewPart1 and ViewPart2; both implement ISelectionListener.
ViewPart1 has a tree where if a user clicks on a node, it updates a table in ViewPart2.
If a user does that and ViewPart2 had been closed by the user already, I noticed that method ViewPart2::selectionChanged(...) still gets called, without ViewPart2::createPartControl(...) getting called first. ViewPart2::createPartControl(...) is where the table and its content provider get set. When a view, ViewPart2 is closed, why does the content provider get disposed? This causes the problem where a list is getting set as input to the table with an assertion error thrown: "ContentViewer must have a content provider when input is set."
When a ViewPart is closed, can we prevent the content provider from getting disposed?
Thanks so much.
Powered by FUDForum
. Page generated in 0.02107 seconds