Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 17102 | Differences between
and this patch

Collapse All | Expand All

(-)Eclipse UI/org/eclipse/ui/internal/SaveablesList.java (-7 / +9 lines)
Lines 98-106 Link Here
98
			modelsForSource = new HashSet();
98
			modelsForSource = new HashSet();
99
			modelMap.put(source, modelsForSource);
99
			modelMap.put(source, modelsForSource);
100
		}
100
		}
101
		if (modelsForSource.add(model)) {
101
		modelsForSource.add(model);
102
			result = incrementRefCount(modelRefCounts, model);
102
		result = incrementRefCount(modelRefCounts, model);
103
		}
104
		return result;
103
		return result;
105
	}
104
	}
106
105
Lines 150-161 Link Here
150
			modelsForSource = new HashSet();
149
			modelsForSource = new HashSet();
151
			modelMap.put(source, modelsForSource);
150
			modelMap.put(source, modelsForSource);
152
		}
151
		}
153
		if (modelsForSource.remove(model)) {
152
		result = decrementRefCount(modelRefCounts, model);
154
			result = decrementRefCount(modelRefCounts, model);
153
		if (result) {
155
			if (modelsForSource.isEmpty()) {
154
			if (modelsForSource.remove(model)) {
156
				modelMap.remove(source);
155
				if (modelsForSource.isEmpty()) {
156
					modelMap.remove(source);
157
				}
157
			}
158
			}
158
		}
159
		}
160
159
		return result;
161
		return result;
160
	}
162
	}
161
163

Return to bug 17102