[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Auto-Refresh

Hi,

I have copied a file from one location to another location. I have to display the file in a tree node. the file is being copied well and get struck in node.
But to view the file in the node i will have to refresh the tree node manually by pressing F5 key.then only its getting displayed.


i have used 1. MyNavigator nav = MyData.getInstance().getMyView(true);
nav.getViewer().refresh(); // refreshes the view part


2.
try
{
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject myProj = root.getProject(Const.MY_PROJECT);
myFolder = myApp.getFolder(Const.MY_FOLDER);
IFolder folder = myFolder;
folder.refreshLocal(IResource.FORCE, null); }
catch(Exception ex)
{
ex.printStackTrace();
}
}


i have tried with given 1, 2 steps but its not getting refreshed automatically.
i have used java.nio.channels.FileChannel to copy the files.


FileChannel dstChannel = new FileOutputStream(path1).getChannel();
dstChannel.transferFrom(source, 0, source.size());


please let me know

Thanks in advance.