Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 325274

Summary: [EEF] PropertiesEditionViewer resetTab() doesn't dispose all Controls
Product: [Modeling] EEF Reporter: Harald Loehnert <harald>
Component: GeneralAssignee: EEF Inbox <emft.eef-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: goulwen.lefur
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Harald Loehnert CLA 2010-09-14 12:02:47 EDT
Build Identifier: 20100618-0524

The resetTab() method in PropertiesEditionViewer doesn't dispose the CTabItem-Controls. So I get a "No more handles" exception after changing the selection in the master-section frequently.
After modifing the method as follows, I didn't run out of handles anymore:

/**
 * Reset all the tabs of the folder.
*/
private void resetTab() {
 if (folder.getItemCount() > 0) {
  CTabItem[] items = folder.getItems();
  for (int i = 0; i < items.length; i++) {
   CTabItem cTabItem = items[i];
   cTabItem.getControl().dispose(); //adding this line solves my problem.
   cTabItem.dispose();
  }
 }
}

Reproducible: Always

Steps to Reproduce:
1. use the worlcupforecast-application.
2. change the selection in the master-section serveral times.
3.
Comment 1 Goulwen Le Fur CLA 2011-01-06 04:29:48 EST
Applyied