Open (simulate "double-clicking") a file from an Editor script.

Is there a way to simulate “double-clicking” a file from Editor script? I am programmatically generating an AnimatorController and would like to open it once it is created. I tried this command: UnityEditorInternal.InternalEditorUtility.OpenFileAtLineExternal(path, 0); But that seems to open the file in MonoDevelop no matter what type of a file it is.

Could it be that you are looking for AssetDatabase.OpenAsset()?