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
fTabConverter= null;
		}
	}
	
	private boolean isTabConversionEnabled() {
		IPreferenceStore store= getPreferenceStore();
		return store.getBoolean(SPACES_FOR_TABS);
	}
	
	private void showOverviewRuler() {
		AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
		asv.showOverviewRuler();
		
		OverviewRuler overviewRuler= asv.getOverviewRuler();
		if (overviewRuler != null) {
			for (int i= 0; i < ANNOTATION_LAYERS.length; i++) {
				AnnotationType type= ANNOTATION_LAYERS[i];
				overviewRuler.setLayer(type, i);	
				if (isAnnotationIndicationInOverviewRulerEnabled(type))
					showAnnotationIndicationInOverviewRuler(type, true);
			}
		}
	}
	
	private void hideOverviewRuler() {
		AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
		asv.hideOverviewRuler();
	}
	
	private boolean isOverviewRulerVisible() {