Bug 173248 [IDE] Failure in IDE.saveAll reports "An error has occurred when closing the workbench...
I20070206-0010. Failure in IDE.saveAll reports "An error has occurred when closing the workbench...
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDE.java
* @return IEditorDescriptor
	 * @throws PartInitException
	 *             if no valid editor can be found
	 * 
	 * @since 3.1
	 */
	private static IEditorDescriptor getEditorDescriptor(String name,
			IEditorRegistry editorReg, IEditorDescriptor defaultDescriptor)
			throws PartInitException {
		if (defaultDescriptor != null) {
			return defaultDescriptor;
		}
		IEditorDescriptor editorDesc = defaultDescriptor;
		
		if (editorReg.isSystemInPlaceEditorAvailable(name)) {
			editorDesc = editorReg
					.findEditor(IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
		}
		
		if (editorDesc == null
				&& editorReg.isSystemExternalEditorAvailable(name)) {
			editorDesc = editorReg
					.findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
		}
		
		if (editorDesc == null) {
			editorDesc = editorReg
					.findEditor(IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID);
		}