pawan garia Messages: 20 Registered: February 2013
Junior Member
Hi All
I have a Tree which is in a Table Format and i want to expand the Tree. Problem is Tree nodes dont have a name, its just Signs.
Please Find the Snapshot for more understanding
The code i am trying is Simple :
SWTBotTreeItem[] items = bot.tree().getAllItems();
System.out.println("Size of the Tree : "+items.length);
for (SWTBotTreeItem item : items) {
item.select();
System.out.println("First Row WF Name "+item.select().cell(3).toString());
SWTBotTreeItem[] item1 = item.getItems();
System.out.println("Size of the second Tree : "+item1.length);
Thread.sleep(2000);
for (SWTBotTreeItem item2 : item1) {
Thread.sleep(2000);
item2.select().expand();
Thread.sleep(2000);
System.out.println("Second Row WF Name "+item2.select().cell(3).toString());
SWTBotTreeItem[] item3 = item2.getItems();
for (SWTBotTreeItem item4 : item3) {
Thread.sleep(2000);
item4.select().expand();
System.out.println("Third Row WF Name "+item4.select().cell(3).toString());
}
}
}
}
Every Time i try to click it is throwing
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
Mickael Istria Messages: 676 Registered: July 2009 Location: Grenoble, France
Senior Member
On 08/05/2013 09:58 AM, pawan garia wrote:
> org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
> at org.eclipse.swt.SWT.error(SWT.java:3884)
> at org.eclipse.swt.SWT.error(SWT.java:3799)