Custom Editor: Find result window - F8 - goto next location, fails to open files. RRS feed

  • Question

  • 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


    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?



    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]	

    Saturday, June 7, 2014 1:25 PM

All replies

  • This problem also occurs in the out of the box, Visual Studio Package project with custom editor. So it appears that this is probably a Visual Studio error, or at least it is not an issue with my code.

    Saturday, June 7, 2014 2:17 PM
  • Hi,

    Could you please provide us with a sample code to reproduce this issue?

    Best regards,

    Tuesday, June 10, 2014 10:06 AM