I am working on a custom file editor using MPF, in VS 2013. After a find in files, the files for the results can be opened successfully using double click. However the files do not open when using F8 - goto next location. In both cases the project node OpenItem method is called with the same parameters, however when invoked via F8, the actual uiShellOpenDocument.OpenStandardEditor call returns E_ABORT.
Having tracked it through it appears that the document state is wrong. The setting of the state occurs before my user code is reached. When gotoEntry is called (see stack below) it calls
CResultList::EstablishNewDocumentStateContext
and then down into CVsUIShellOpenDocument::SetNewDocumentState
which sets the state to a 2 in the case of a double click and a 1 in the case of the F8.
Can anyone tell me about the document states, CVsUIShellOpenDocument::SetNewDocumentState, and the difference between the doble click and goto next?
Thanks,
Jeff
msenv.dll!CVsUIShellOpenDocument::OpenDocumentViaProject2(unsigned short const *,struct _GUID const &,short,struct IServiceProvider * *,struct IVsUIHierarchy * *,unsigned long *,struct IVsWindowFrame * *) Unknown msenv.dll!CVsUIShellOpenDocument::OpenDocumentViaProject(unsigned short const *,struct _GUID const &,struct IServiceProvider * *,struct IVsUIHierarchy * *,unsigned long *,struct IVsWindowFrame * *) Unknown msenv.dll!FindOrOpenFile(unsigned short const *,struct IVsWindowFrame * *) Unknown msenv.dll!GotoFileLocation(unsigned short const *,struct _TextSpan *,bool,struct IVsWindowFrame *,struct IVsWindowFrame * *,bool) Unknown msenv.dll!CResultList::AttemptToNavigate(int,class CLocationSet *,unsigned long,struct IVsWindowFrame *) Unknown msenv.dll!CResultList::GotoEntry(int,unsigned long,struct IVsWindowFrame *) Unknown msenv.dll!CResultList::Exec(struct _GUID const *,unsigned long,unsigned long,struct tagVARIANT *,struct tagVARIANT *) Unknown [External Code]