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
return type.isMember();
		} catch (JavaModelException x) {
			IJavaElement parent= type.getParent();
			if (parent != null) {
				int parentType= parent.getElementType();
				return (parentType != IJavaElement.COMPILATION_UNIT && parentType != IJavaElement.CLASS_FILE);
			}
		}
		
		return false;		
	}
	private IRegion[] computeProjectionRanges(IJavaElement element) {
		
		try {
			if (element instanceof ISourceReference) {
				ISourceReference reference= (ISourceReference) element;
				ISourceRange range= reference.getSourceRange();
				String contents= reference.getSource();
				if (contents == null)
					return null;
				
				IScanner scanner= ToolFactory.createScanner(true, false, false, false);
				scanner.setSource(contents.toCharArray());
				List regions= new ArrayList();
				int shift= range.getOffset();
				int start= shift;
				while (true) {
					
					int token= scanner.getNextToken();
					start= shift + scanner.getCurrentTokenStartPosition();