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 Annamalai
Messages: 89
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 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 MHANNA
Messages: 43
Registered: February 2014
Location: LAVAL
Member
Hi Aravindhan,

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

Kind Regards,

Hussein


ALL4TEC
Previous Topic:Calling refresh() on tableViewer clears the table data
Next Topic:TreeViewer - set a default selection
Goto Forum:
  


Current Time: Fri Sep 19 18:00:20 GMT 2014

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

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