locked
Light bulb icon shown on each and every line RRS feed

  • Question

  • Hi All,

    I am using in my customized language service where i want to show light bulb only when if any error is present on the line. I am using light bulb feature provided by MSFT.Please find the below link for the code that i am using for light bulb functionality

    https://msdn.microsoft.com/en-us/library/dn903708.asp

    With the current code i am getting light bulb option on every line. but i want to show it only on the error text wih respective suggeted actions. Is there any attribute that i can use to supress above activity.

    I also want to know how  we can add the custom icon on every suggetsed action. I have below implemeted method right now which is present in interface ISuggestedAction interface provided by framework.How i can use ImageMoniker for custome icons present in project.

       public ImageMoniker IconMoniker
            {
                get { return default(ImageMoniker); }
            }

    Thanks in advance

    Hemant



    H.S.Navarkar

    Friday, February 24, 2017 10:46 AM

All replies

  • Hi Hemant Navarkar,

    The link you providing is no longer available.

    In addition, The property named IconMoniker does not have a set method, which we could not set custom icons to it.

    https://msdn.microsoft.com/en-us/library/microsoft.visualstudio.language.intellisense.isuggestedaction.iconmoniker.aspx

    Best regards,

    Cole Wu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 27, 2017 8:27 AM
  • Hi Cole Wu,

    Thanks for quick response. I got second question answer from your reply.

    Can you please provide any solution for below question. 

    I am using in my customized language service where i want to show light bulb only when if any error is present on the line. I am using light bulb feature provided by MSFT.Please find the below link for the code that i am using for light bulb functionality

    https://msdn.microsoft.com/en-us/library/dn903708.asp

    With the current code i am getting light bulb option on every line. but i want to show it only on the error text wih respective suggeted actions. Is there any attribute that i can use to supress above activity.

    Thanks & Regards

    Hemant


    H.S.Navarkar

    Tuesday, February 28, 2017 5:32 AM