locked
extending Intellisense RRS feed

  • Question

  • I have some business specific code type, it's a sort of javascript, we written our own compiler. I want to prompt the user with their coding options. How can I tell a Visual Studio WinForm or editor of my business class function signatures?

    Is Intellisense of any use or whatever Intellisense uses to tell the editor of the possibilities. How can I extend intellisense in order for Visual Studio to recognise my own file/content types.
    How does Intellisense work?
    Monday, June 26, 2006 1:36 PM

Answers

  • Add XML comments to get the tooltips of you functions signatures.

    Simple as prior to the signature adding three single quotes and then filling in the template.

    XML Comments are a new feature available in 2005/Express not in earlier versions.

     

    Monday, June 26, 2006 1:50 PM
  • It sounds like you are trying to get intellisense from a class that is not registered. It is unclear how VS is interfacing with your custom script based engine. You might check out the work of Fesersoft (http://www.fesersoft.com/Products/). They offered a solution to add intellisense to XSLT back in VS2002. Essentially, you create an XML file and add it to the appropraite VS folder. My memory is somewhat fuzzy on the details. The trick would be registering the file type with VS for your custom language created classes.

    Jim Wooley
    http://devauthority.cim/blogs/jwooley/default.aspx

    Monday, June 26, 2006 3:51 PM
    Moderator

All replies

  • Add XML comments to get the tooltips of you functions signatures.

    Simple as prior to the signature adding three single quotes and then filling in the template.

    XML Comments are a new feature available in 2005/Express not in earlier versions.

     

    Monday, June 26, 2006 1:50 PM
  • I've just tried that and saw nothing.
    The files I wish to add the intellisense or extend the intellisense on are presently in a type of javascript and are saved as .js files.
    The xml type commenting I have just tried is

    ''' <summary>
    ''' Get the  value given the name and value name.
    ''' </summary>
    ''' <param name="param1"></param>
    ''' <param name="param2"></param>
    ''' <returns></returns>

    I'm using VS 2005.

    Also, I see that when you try to edit the same file as the function is in then some sort of intellisense appears, the function signature appears when you type the full function name, but this only works when working within the same file.
    Monday, June 26, 2006 2:43 PM
  • if you want intellisense to recognize the methods of a class then the class must have a project level reference...you will only get intellisense options for those classes that are properly reference, which means you may also have to include an imports statement in your other classes.

     

    HTH

    Monday, June 26, 2006 3:10 PM
    Moderator
  • I don't think that is an option for me, Any know how the Intellisense works, in C# code you don't even have to save the file an it knows you function signature and that's also without any XML comments!

    Monday, June 26, 2006 3:33 PM
  • It sounds like you are trying to get intellisense from a class that is not registered. It is unclear how VS is interfacing with your custom script based engine. You might check out the work of Fesersoft (http://www.fesersoft.com/Products/). They offered a solution to add intellisense to XSLT back in VS2002. Essentially, you create an XML file and add it to the appropraite VS folder. My memory is somewhat fuzzy on the details. The trick would be registering the file type with VS for your custom language created classes.

    Jim Wooley
    http://devauthority.cim/blogs/jwooley/default.aspx

    Monday, June 26, 2006 3:51 PM
    Moderator
  • Thanks Jim. I've come across some articles in the VS 2005 SDK on "Language Services", looks like I should go about creating a VSProject along with implementing a TextEditor. Looks quite complicated, anyone have any experience with this?
    I have created a default VS Project and built a couple of the SDK examples and it does work.

    Tuesday, June 27, 2006 2:13 PM