Bug 560259 - NPE in
InlinedAnnotationSupport$UpdateStylesWidth.applyTextPresentation

Added null check for ISourceViewer.getAnnotationModel() return value
that allowed to be null.

Change-Id: Ib0ffbbd3cdec18dc24a0c9de4a8c32ab8f24abe7
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
index c74ff5e..6682ad7 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/inlined/InlinedAnnotationSupport.java
@@ -103,6 +103,9 @@
 		@Override
 		public void applyTextPresentation(TextPresentation textPresentation) {
 			IAnnotationModel annotationModel= fViewer.getAnnotationModel();
+			if (annotationModel == null) {
+				return;
+			}
 			IRegion region= textPresentation.getExtent();
 			((IAnnotationModelExtension2) annotationModel)
 					.getAnnotationIterator(region.getOffset(), region.getLength(), true, true)