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 14:03
Aravindhan Annamalai is currently offline Aravindhan Annamalai
Messages: 88
Registered: July 2009
Location: Chennai
Member
Hi,

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();
//resNav.getCommonViewer().refresh(newProject); //doesn't work
} catch (PartInitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

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?

Regards,
Aravind

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

Report message to a moderator

Previous Topic:TreeViewer dispose before performing refresh opertation
Next Topic:First cell inTreeViewer loses focus immediately when selected
Goto Forum:
  


Current Time: Fri Apr 18 22:00:44 EDT 2014

Powered by FUDForum. Page generated in 0.15338 seconds