Skip to main content



      Home
Home » Newcomers » Newcomers » Focus in Tree Viewer
Focus in Tree Viewer [message #242639] Mon, 10 December 2007 08:24
Eclipse UserFriend
Hi,

In a tree viewer When an data from one model is copied to another model
through some action, the focus from the tree viewer and from workbench is
getting lost.

If the Last focus was in explorer or IDE or mailbox before the action was
executed, the focus is getting returned over there rather than on the
viewer as soon as the action is performed.

The below piece of code is being run in the runnableProgress ,

public void doRefresh() {

IProgressService progressService =
PlatformUI.getWorkbench().getProgressService();


IRunnableWithProgress runnable = new IRunnableWithProgress() {

public void run(IProgressMonitor monitor) {

monitor.setTaskName("Refreshing data.....");
/* try {
Thread.sleep(800);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}*/
diffInput.refresh();
listInput.refresh(); }

};

try {
progressService.run(true, false, runnable);
}
catch (InvocationTargetException e) {
CemPlugin.getDefault().log(e);
}
catch (InterruptedException e) {
CemPlugin.getDefault().log(e);
}

}


As per the above code, if the commented code is uncommented then the focus
is being set to TreeViewer itself irrespective of last focus. Please let
me know if this is right way to handle the problem.

Thanks in Advance.

Regards,

Kiran
Previous Topic:showing duplicate keys in property file
Next Topic:EPF composer
Goto Forum:
  


Current Time: Thu Jul 17 11:22:07 EDT 2025

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

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

Back to the top