Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to refresh my CNF for custom object model?
How to refresh my CNF for custom object model? [message #667144] Wed, 27 April 2011 01:23 Go to next message
Eclipse UserFriend
Hi,

I am using Eclipse 3.6. I have custom object model. I followed some tutorial to use CNF with content/label providers. So far, it works as the model is displayed on the tree viewer in CNF, with initial data model.

My model is extending the modelObject (PropertyChangeSupport) and i have bind the class attributes and UI properties in the wizard page. So changes in the wizard page UI is reflected on the model.

However, my wizard allows user to add new object into the model. How do I refresh the treeviewer once he/she has added it?

do i add listener in my MyCommonNavigator (extends CommonNavigator) ? which listeners?

Thanks.
Andy
Re: How to refresh my CNF for custom object model? [message #667726 is a reply to message #667144] Sun, 01 May 2011 14:47 Go to previous message
Eclipse UserFriend
Have a look at the ResourceExtensionContentProvider class in org.eclipse.ui.navigator.resources

This makes the necessary viewer calls to update things when the model has changed.

Essentially you just update the viewer (CommonViewer) just like any other JFace Viewer. You can get the viewer using CommonNagivator.getCommonViewer()
Previous Topic:Need custom icons in Export Wizard and Working Set Project Selection Dialog
Next Topic:Open external files in RCP Application
Goto Forum:
  


Current Time: Tue Jul 22 19:35:14 EDT 2025

Powered by FUDForum. Page generated in 0.03397 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top