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
super.customizeDocumentCommand(command);
			if (!fIgnoreTextConverters && fTextConverters != null) {
				for (Iterator e = fTextConverters.iterator(); e.hasNext();)
					((ITextConverter) e.next()).customizeDocumentCommand(getDocument(), command);
			}
			fIgnoreTextConverters= false;
		}
		
		public IVerticalRuler getVerticalRuler() {
			return fCachedVerticalRuler;
		}
		
		public boolean isVerticalRulerVisible() {
			return fCachedIsVerticalRulerVisible;
		}
		
		public OverviewRuler getOverviewRuler() {
			return fOverviewRuler;
		}
		
		/*
		 * @see TextViewer#createControl(Composite, int)
		 */
		protected void createControl(Composite parent, int styles) {
			
		}
		
		protected void delayedCreateControl(Composite parent, int styles) {
			
			super.createControl(parent, styles);