Hi,
I had created a GUI with multiple tabs in it. This development was done in Eclipse 3.7.
Few days back I tried to check my GUI on Eclipse 4.2(Juno), and i found that IndexOutOfBounds exception is thrown when I tried to call CTabFolder.getItem(int i) method.
In Eclipse 3.7 this method returns the object of CTabItem, placed at provided index in the CTabFolder.
Please see the snippet of code where the exception is occurring:
if(tabFolderView.getTabList().length > 0) {
System.out.println(tabFolderView.getTabList().length);
for (int i = 0; i < tabFolderView.getTabList().length; i++) {
String tabItemText = tabFolderView.getItem(i).getText();
if(tabItemText.equalsIgnoreCase(peripheralName)) {
return null;
}
}
}
I am unable to figure it out, why this issue arrived.
Kindly guide me to the root-cause of the issue or if possible please provide me the suggestion to fix this issue in my tool.