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
}
	
	private boolean isAnnotationIndicationInOverviewRulerEnabled(AnnotationType annotationType) {
		IPreferenceStore store= getPreferenceStore();
		AnnotationInfo info= (AnnotationInfo) ANNOTATION_MAP.get(annotationType);
		if (info != null)
			return store.getBoolean(info.fOverviewRulerPreference);
		return false;
	}
	
	private void showAnnotationIndicationInOverviewRuler(AnnotationType annotationType, boolean show) {
		AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
		OverviewRuler ruler= asv.getOverviewRuler();
		if (ruler != null) {
			ruler.setColor(annotationType, getColor(annotationType));
			ruler.showAnnotation(annotationType, show);
			ruler.update();
		}
	}
	private void setColorInOverviewRuler(AnnotationType annotationType, Color color) {
		AdaptedSourceViewer asv= (AdaptedSourceViewer) getSourceViewer();
		OverviewRuler ruler= asv.getOverviewRuler();
		if (ruler != null) {
			ruler.setColor(annotationType, color);
			ruler.update();
		}
	}
	private void configureTabConverter() {
		if (fTabConverter != null) {
			IDocumentProvider provider= getDocumentProvider();