Bug 21047 code formatter availability inconsistent
Sometimes the hotkey (ctrl-shift-f) and the menu entry for formatting the source code are disabled, while the entry in the context menu is enabled and works as expected. I didn't find any patterns on when this occurs till now.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitEditor.java
Control control= getControl();
			if (control instanceof Composite) {
				Composite composite= (Composite) control;
				composite.setLayout(new AdaptedRulerLayout(GAP_SIZE, this));
				fOverviewRuler.createControl(composite, this);
			}
		}
		
		private void ensureOverviewHoverManagerInstalled() {
			if (fOverviewRulerHoveringController == null && fAnnotationHover != null && fHoverControlCreator != null)	{
				fOverviewRulerHoveringController= new OverviewRulerHoverManager(fOverviewRuler, this, fAnnotationHover, fHoverControlCreator);
				fOverviewRulerHoveringController.install(fOverviewRuler.getControl());
			}
		}
		
		public void hideOverviewRuler() {
			fIsOverviewRulerVisible= false;
			Control control= getControl();
			if (control instanceof Composite) {
				Composite composite= (Composite) control;
				composite.layout();
			}
			if (fOverviewRulerHoveringController != null) {
				fOverviewRulerHoveringController.dispose();
				fOverviewRulerHoveringController= null;
			}
		}
		
		public void showOverviewRuler() {