Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 05:23 Go to next message
Messages: 1
Registered: April 2011
Junior Member

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?

Re: How to refresh my CNF for custom object model? [message #667726 is a reply to message #667144] Sun, 01 May 2011 18:47 Go to previous message
Francis Upton IV is currently offline Francis Upton IVFriend
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
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: Fri May 25 13:06:03 GMT 2018

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

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

Back to the top