Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325274 - [EEF] PropertiesEditionViewer resetTab() doesn't dispose all Controls
Summary: [EEF] PropertiesEditionViewer resetTab() doesn't dispose all Controls
Status: RESOLVED FIXED
Alias: None
Product: EEF
Classification: Modeling
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal
Target Milestone: ---   Edit
Assignee: EEF Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-14 12:02 EDT by Harald Loehnert CLA
Modified: 2016-05-05 10:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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