public static IEditorPart openInEditor(Object inputElement, boolean activate) throws JavaModelException, PartInitException {  if (inputElement instanceof IFile) return openInEditor((IFile) inputElement, activate);  IEditorInput input= getEditorInput(inputElement); if (input instanceof IFileEditorInput) { IFileEditorInput fileInput= (IFileEditorInput) input; return openInEditor(fileInput.getFile(), activate); }  if (input != null) return openInEditor(input, getEditorID(input, inputElement), activate);  return null;
public static IEditorPart openInEditor(Object inputElement) throws JavaModelException, PartInitException { return openInEditor(inputElement, true);
	public static IEditorPart openInEditor(Object inputElement, boolean activate) throws JavaModelException, PartInitException {				if (inputElement instanceof IFile)			return openInEditor((IFile) inputElement, activate);				IEditorInput input= getEditorInput(inputElement);		if (input instanceof IFileEditorInput) {			IFileEditorInput fileInput= (IFileEditorInput) input;			return openInEditor(fileInput.getFile(), activate);		}				if (input != null)			return openInEditor(input, getEditorID(input, inputElement), activate);					return null;	}