Bug 111887 [EFS] Provide IFileStoreEditorInput (+ impl) for new IFileStore
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
/**
	 * Return the content type for the given file.
	 * 
	 * @param file the file to test
	 * @return the content type, or <code>null</code> if it cannot be determined.
	 * @since 3.1
	 */
	public static IContentType getContentType(IFile file) {
		try {
			UIStats.start(UIStats.CONTENT_TYPE_LOOKUP, file.getName());
			IContentDescription contentDescription = file.getContentDescription();
			if (contentDescription == null) {
				return null;
			}
			return contentDescription.getContentType();
		} catch (CoreException e) {
			return null;		
		} finally {
			UIStats.end(UIStats.CONTENT_TYPE_LOOKUP, file, file.getName());
		}
	}
	
	
	/**
	 * Guess at the content type of the given file based on the filename.
	 * 
	 * @param file the file to test
	 * @return the content type, or <code>null</code> if it cannot be determined.
	 * @since 3.2
	 */