try { if (input instanceof IFileEditorInput) editorDescriptor= IDE.getEditorDescriptor(((IFileEditorInput)input).getFile()); else { String name= input.getName(); if (name == null) return null; editorDescriptor= IDE.getEditorDescriptor(name); } } catch (PartInitException e) { return null;
if (input instanceof IFileEditorInput) editorDescriptor= IDE.getEditorDescriptor(((IFileEditorInput)input).getFile()); else { String name= input.getName(); if (name == null) throwPartInitException(JavaEditorMessages.EditorUtility_could_not_find_editorId); editorDescriptor= IDE.getEditorDescriptor(name);
	private static String getEditorID(IEditorInput input, Object inputObject) {		IEditorDescriptor editorDescriptor;		try {			if (input instanceof IFileEditorInput)				editorDescriptor= IDE.getEditorDescriptor(((IFileEditorInput)input).getFile());			else {				String name= input.getName();				if (name == null)					return null;				editorDescriptor= IDE.getEditorDescriptor(name);			}		} catch (PartInitException e) {			return null;		}		if (editorDescriptor != null)			return editorDescriptor.getId();		return null;	}