* @see AbstractDocumentProvider#createElementInfo(Object)
*/
protected ElementInfo createElementInfo(Object element) throws CoreException {
if (element instanceof IFileEditorInput) {
IFileEditorInput input= (IFileEditorInput) element;
try {
refreshFile(input.getFile());
} catch (CoreException x) {
handleCoreException(x, TextEditorMessages.FileDocumentProvider_createElementInfo);
}
IDocument d= null;
IStatus s= null;
try {
d= createDocument(element);
} catch (CoreException x) {
handleCoreException(x, TextEditorMessages.FileDocumentProvider_createElementInfo);
s= x.getStatus();
d= createEmptyDocument();
}
// Set the initial line delimiter
if (d instanceof IDocumentExtension4) {
String initalLineDelimiter= getLineDelimiterPreference(input.getFile());
if (initalLineDelimiter != null)
((IDocumentExtension4)d).setInitialLineDelimiter(initalLineDelimiter);
}
IAnnotationModel m= createAnnotationModel(element);
FileSynchronizer f= new FileSynchronizer(input);
f.install();
FileInfo info= new FileInfo(d, m, f);
info.fModificationStamp= computeModificationStamp(input.getFile());
info.fStatus= s;
info.fEncoding= getPersistedEncoding(element);
info.fHasBOM= hasBOM(element);
/*