Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8547349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:14:51+00:00 2026-06-11T13:14:51+00:00

Following this link I have a set of code snippets. But the snippet insertion

  • 0

Following this link I have a set of code snippets.

But the snippet insertion has to be w.r.t the context, viz. if I do ‘Insert Snippet’ before declaring a class, it shouldn’t show ‘method declaration’ snippet.
Also required is to filter snippets as per managed or unmanaged code.

In short I am looking for a mechanism as follows:

if <condition>
{
 modify list of snippets visible in the menu
}

Do we have such a mechanism or something similar? Ideas welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:14:52+00:00Added an answer on June 11, 2026 at 1:14 pm

    I found a solution to my question. Hope it helps someone.

    I followed the instructions on the links:
    Video on Code Snippets &
    Code Element

    Got the snippet.xml file to contain the following:

    <Code Language="Language"
        Kind="method decl">
            Code to insert
    </Code>
    

    Then called the expansionProvider.DisplayExpansionBrowser in the FilterView class (refer to the video):

    string[] kind = new string[1];                            
    kind[0] = "method decl";
    return expansionProvider.DisplayExpansionBrowser(TextView, 
                                                     snippets, 
                                                     null, false, kind, false);
    

    Thus the specific snippet will appear in ‘method declaration’ context. Thus other snippets can be done. The xml has to hold the context information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a static library following this link . But I am facing
I have tried to do this refering to following link. http://skypher.com/index.php/2008/07/28/function-list-for-php/ But no success.
I have the following bit of code, simply: $(function() { $('a.add-photos-link').live('click', function(e) { $(this).colorbox({
I have found the following code from this link: iphone - How to draw
Following the advice in this link, Eclipse, classpath and subversion , I have setup
I have seen the following links before posting this question http://www.devx.com/wireless/Article/40792/1954 Saving Android Activity
SO I have the following set of code parsing delicious information. It prints data
SO I have the following set of code parsing delicious information. It prints data
Following this question: Weird MIPS assembler behavior with jump (and link) instruction I have
I have the following bit of code to set a parameter that will be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.