Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » View extending CommonNavigator(Project not displayed in the view)
View extending CommonNavigator [message #894120] Fri, 06 July 2012 18:03 Go to next message
Aravindhan Annamalai is currently offline Aravindhan AnnamalaiFriend
Messages: 89
Registered: July 2009
Location: Chennai

I am having a view which extends CommonNavigator.

I am creating a custom project through a CustomProjectCreation wizard.

Only refresh as given below works, but it refreshes all the projects each time a new project is created which should be avoided,

CommonNavigator resNav;
try {
resNav = (CommonNavigator)activePage.showView("view id");
//resNav.getCommonViewer().refresh(newProject); //doesn't work
} catch (PartInitException e) {
// TODO Auto-generated catch block

ContentProvider looks as below
if(parentElement instanceof IWorkspaceRoot){
List customProjects = getCustomProjects();
return customProjects.toArray(new CustomProject[customProjects.size()]);

On Debug, getCommonViewer().refresh() calls the getChildren() method in the content provider.
getCommonViewer().refresh(newProject) doesn't make a call to ContentProvider

How to achieve refresh in particular to the newly created project?


[Updated on: Fri, 06 July 2012 18:04]

Report message to a moderator

Re: View extending CommonNavigator [message #1401879 is a reply to message #894120] Wed, 16 July 2014 07:47 Go to previous message
Hussein MHANNA is currently offline Hussein MHANNAFriend
Messages: 45
Registered: February 2014
Location: LAVAL
Hi Aravindhan,

Are you sure that getCommonViewer().refresh(newProject) doesn't work?

Kind Regards,


Previous Topic:First cell inTreeViewer loses focus immediately when selected
Next Topic:TreeViewer EditElement Question
Goto Forum:

Current Time: Mon May 28 05:27:48 GMT 2018

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

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

Back to the top