Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » In Eclipse 4.2, CTabFolder API not working same as Eclipse 3.7
In Eclipse 4.2, CTabFolder API not working same as Eclipse 3.7 [message #1005385] Fri, 25 January 2013 03:18 Go to next message
Ashish Rawat is currently offline Ashish Rawat
Messages: 14
Registered: June 2012
Junior Member
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.
Re: In Eclipse 4.2, CTabFolder API not working same as Eclipse 3.7 [message #1005437 is a reply to message #1005385] Fri, 25 January 2013 07:51 Go to previous message
Brian de Alwis is currently offline Brian de Alwis
Messages: 182
Registered: January 2012
Senior Member

That's a pretty strange bug! You'll be best to try debugging it yourself. I you figure it out, or if you can create a small test case to demonstrate the problem, submit a bug report against SWT at:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=SWT

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:How to contribute a new menu item in an existing menu via a fragment?
Next Topic:How to add a new view with a fragment
Goto Forum:
  


Current Time: Tue Sep 02 14:59:05 EDT 2014

Powered by FUDForum. Page generated in 0.01457 seconds