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
break;
			case IJavaElement.TYPE:
				collapse= fAllowCollapsing && fCollapseInnerTypes && isInnerType((IType) element);
				createProjection= true;
				break;
			case IJavaElement.METHOD:
				collapse= fAllowCollapsing && fCollapseMethods;
				createProjection= true;
				break;
		}
		
		if (createProjection) {
			IRegion[] regions= computeProjectionRanges(element);
			if (regions != null) {
				
				for (int i= 0; i < regions.length - 1; i++) {
					Position position= createProjectionPosition(regions[i]);
					if (position != null)
						map.put(new JavaProjectionAnnotation(element, fAllowCollapsing && fCollapseJavadoc, true), position);
				}
				
				Position position= createProjectionPosition(regions[regions.length - 1]);
				if (position != null)
					map.put(new JavaProjectionAnnotation(element, collapse, false), position);
			}
		}
	}
	private boolean isInnerType(IType type) {
		
		try {