private void initializeSourceViewer(final IEditorInput input) { final IDocumentProvider documentProvider = getDocumentProvider(); final IAnnotationModel model = documentProvider.getAnnotationModel(input); final IDocument document = documentProvider.getDocument(input); if (document != null) { fSourceViewer.setDocument(document, model); fSourceViewer.setEditable(isEditable()); fSourceViewer.showAnnotations(model != null); } if (fElementStateListener instanceof IElementStateListenerExtension) { boolean isStateValidated = false; if (documentProvider instanceof IDocumentProviderExtension) isStateValidated = ((IDocumentProviderExtension) documentProvider).isStateValidated(input); final IElementStateListenerExtension extension = (IElementStateListenerExtension) fElementStateListener; extension.elementStateValidationChanged(input, isStateValidated); } }
private void initializeSourceViewer(IEditorInput input) { IDocumentProvider documentProvider = getDocumentProvider(); IAnnotationModel model = documentProvider.getAnnotationModel(input); IDocument document = documentProvider.getDocument(input); if (document != null) { fSourceViewer.setDocument(document, model); fSourceViewer.setEditable(isEditable()); fSourceViewer.showAnnotations(model != null); } if (fElementStateListener instanceof IElementStateListenerExtension) { boolean isStateValidated = false; if (documentProvider instanceof IDocumentProviderExtension) isStateValidated = ((IDocumentProviderExtension) documentProvider) .isStateValidated(input); IElementStateListenerExtension extension = (IElementStateListenerExtension) fElementStateListener; extension.elementStateValidationChanged(input, isStateValidated); } }