[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.cdt] How to refresh data model with changes?

Hello,

I am using CDT to add support of a new language in Eclipse, so I am using a contributed model builder to fill some IContributedCElements under the translation unit.

The problem is that there is a lengthy process that needs to be performed once on the project while opening and I need to do that before my model builder is called. If I put that initialization code in the model builder it blocks the GUI until done. If I run it in a job and display a nice progress to the user the model builder can't return any correct data.

I like the usability of the CDT outline view where it shows "Pending ..." until data is ready, so I extended CView and added a content provider that checks if the translation unit is open or not and display "Pending ...", the content provider also has a listener on the CModel changes, and tries to refresh the tree viewer for any change.

The problem is that the isOpenned state never changes.

Is the problem that I want to tell the CModel to refresh itself and update its internal "info" objects thus changing the status of isOpen and by consequence refresh all the views with listeners on it. Or is it an issue that I have old data and I need to do setInput again?

I am sure that I have something missing, or I am not doing the right thing, but it is very hard to look for documentation on this.

Any help will be highly appreciated.

Thanks in advance,
Mamado.