Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

SDK Package: Visual Studio 2012 quick find adornment reusage.

$
0
0

I develop an extension for Visual Studio that registers a custom non-text document, that allows user to find some elements in it. The window pane implements IVsFindTarget and specifies __VSFINDOPTIONS.FR_Document in its capabilities:

public int GetCapabilities(bool[] pfImage, uint[] pgrfOptions)
{
    if (pfImage != null && pfImage.Length > 0)
        pfImage[0] = false;

    if (pgrfOptions != null && pgrfOptions.Length > 0)
    {
        pgrfOptions[0] = (int)(__VSFINDOPTIONS.FR_None |
          __VSFINDOPTIONS.FR_Plain |
          __VSFINDOPTIONS.FR_RegExpr |
          __VSFINDOPTIONS.FR_Wildcard |
          __VSFINDOPTIONS.FR_MatchCase |
          __VSFINDOPTIONS.FR_WholeWord |
          __VSFINDOPTIONS.FR_Find |
          __VSFINDOPTIONS.FR_Document |
          __VSFINDOPTIONS.FR_Backwards |
          __VSFINDOPTIONS.FR_ResetPosition);
    }

    return VSConstants.S_OK;
}
In Visual Studio 2010 everything works fine - when user presses Ctrl+F, the quick find dialog opens. But in Visual Studio 2012 the Quick Find dialog is gone and the user gets the "Find in Files" dialog, where the default option is "Entire Solution" that is very awkward.

How can I use the new quick find adornment in my editor? If it is not possible, how do I set the "Current Document" option in this dialog programmatically?

Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>