Bug 65268 [projection] editor is missing collapse all action for code folding
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
/*
		 * @see org.eclipse.jface.action.IAction#run()
		 */
		public void run() {
			final JavaSourceViewer viewer= (JavaSourceViewer) getSourceViewer();
			if (viewer.isEditable()) {
				final Point selection= viewer.rememberSelection();
				try {
					viewer.setRedraw(false);
					final String type= TextUtilities.getContentType(viewer.getDocument(), IJavaPartitions.JAVA_PARTITIONING, selection.x, true);
					if (type.equals(IDocument.DEFAULT_CONTENT_TYPE) && selection.y == 0) {
						try {
							final IJavaElement element= getElementAt(selection.x, true);
							if (element != null && element.exists()) {
								final int kind= element.getElementType();
								if (kind == IJavaElement.TYPE || kind == IJavaElement.METHOD || kind == IJavaElement.INITIALIZER) {
									final ISourceReference reference= (ISourceReference)element;
									final ISourceRange range= reference.getSourceRange();
									if (range != null) {
										viewer.setSelectedRange(range.getOffset(), range.getLength());
										viewer.doOperation(ISourceViewer.FORMAT);
									}
								}
							}
						} catch (JavaModelException exception) {
							
						}
					} else {
						viewer.setSelectedRange(selection.x, 1);