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
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 MHANNAFriend
Messages: 45
Registered: February 2014
Location: LAVAL
Member
Hi Aravindhan,

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

Kind Regards,

Hussein


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


Current Time: Fri Apr 26 18:29:04 GMT 2024

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

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

Back to the top