Bug 63485 [projection] DefaultJavaFoldingStructureProvider's element changes listener not removed
I200405211200 For each Java editor opened a DefaultJavaFoldingStructureProvider is leaked as an element change listener is not getting removed from JavaCore. When the editor is closed, a new element changed listener is added when the document is set to null. The original element changes listener (added when the editor is first opened) is never removed.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/folding/DefaultJavaFoldingStructureProvider.java
additionsIterator.remove();
						
						break;
					}
				}
			}
		}
		
		deletions.addAll(newDeletions);
		changes.addAll(newChanges);
	}
	private Map createAnnotationMap(IAnnotationModel model) {
		Map map= new HashMap();
		Iterator e= model.getAnnotationIterator();
		while (e.hasNext()) {
			Object annotation= e.next();
			if (annotation instanceof JavaProjectionAnnotation) {
				JavaProjectionAnnotation java= (JavaProjectionAnnotation) annotation;
				List list= (List) map.get(java.getElement());
				if (list == null) {
					list= new ArrayList(2);
					map.put(java.getElement(), list);
				}
				list.add(java);
			}
		}
		return map;
	}
}