locked
How Do I Create My Own Intellisense RRS feed

  • Question

  • Greetings:

    I am trying to create a TL1 Cut-Through program that will autocomplete the commands, like Intellisense, as you type them.  Is there any way of using the Intellisense in the IDE and directing it to another list of commands.  I do not want any of the C#, VB, etc commands to show up in the list, only TL1 commands.  Honestly, I am doing this because I can never remember the proper commands and I hate having to look them up as I am doing a cut-through.

    PS:  As a completely irrelevant side comment, I just did a spell check on my post and VB, C#, IDE, and Intellisense are not recognized by the spell checker.  Didn't Microsoft make the spell checker, and IDE?

    Sunday, November 23, 2008 8:04 PM

Answers

  • The IS engine in VS is not available outside of VS.  You can build your own if you want but it is quite a bit of work.  The general behavior is rather simple though.  You start with a list of all available commands.  As the user types you filter the list down.  You would trap the key press event in your text editor and (after a delay perhaps) display the filtered list.  Each time the user types a new character you need to refresh the list.  Performance is going to be an issue for you so you'll spend a lot of time optimizing the behavior.  The actual IS engine doesn't use autocompletion AFAIK but you could actually implement the behavior through it because it works the same way.  I'm not sure which way is easiest.

    An alternative approach is to use VS as your shell.  Starting with VS 2008 the VS shell can be used as your application frontend.  You'll need to go to Microsoft's site and review the licensing and restrictions on using the shell.  However you can then take full advantage of IS and other features.  Creating your own language service (including color highlighting, undo, editor and IS support) is not hard once you are inside the VS shell.  Refer to the following site for more information: http://msdn.microsoft.com/en-us/vsx/default.aspx  Of course tying yourself to the VS shell just to get IS support is probably a little overkill but if you need other features as well then it might be worth it.

    I believe there might also be a couple third-party libraries that can provide IS-like support but I haven't used any of them.

    Michael Taylor - 11/24/08
    http://p3net.mvps.org
    Monday, November 24, 2008 2:59 PM
    Moderator

All replies

  •  IntelliSense is a compound word, sort of a local programming slang, perhaps MS invention. I bet an encircled R is standing next to it whle they are talking about it. It is not in Encarta. If it is not in Encarta then you cannot hope the spell checker react to it. Make it custom if you can. Obviously with threads in here your options are nil.

    Incidentally, what is TL1 command?

    AlexB
    Monday, November 24, 2008 1:24 AM
  • Alex:

    I am sorry, I should have said what TL1 commands are in my original entry.  They are the serial commands for SONET and DWDM systems.  These are used to carry "circuits above router" between metropolitan area networks.  Unfortunately they are long and confusing.  The syntax is verb-modifier-modifier:TID:AID:UID:PID:CTAG:::;  Most equipment has a GUI that will perform these commands for you, but if you have multiple systems on your ring they are often not compatible and you have to use TL1 commands.

    Tony
    Destroying the network, one circuit at a time.
    Monday, November 24, 2008 1:59 AM
  • The IS engine in VS is not available outside of VS.  You can build your own if you want but it is quite a bit of work.  The general behavior is rather simple though.  You start with a list of all available commands.  As the user types you filter the list down.  You would trap the key press event in your text editor and (after a delay perhaps) display the filtered list.  Each time the user types a new character you need to refresh the list.  Performance is going to be an issue for you so you'll spend a lot of time optimizing the behavior.  The actual IS engine doesn't use autocompletion AFAIK but you could actually implement the behavior through it because it works the same way.  I'm not sure which way is easiest.

    An alternative approach is to use VS as your shell.  Starting with VS 2008 the VS shell can be used as your application frontend.  You'll need to go to Microsoft's site and review the licensing and restrictions on using the shell.  However you can then take full advantage of IS and other features.  Creating your own language service (including color highlighting, undo, editor and IS support) is not hard once you are inside the VS shell.  Refer to the following site for more information: http://msdn.microsoft.com/en-us/vsx/default.aspx  Of course tying yourself to the VS shell just to get IS support is probably a little overkill but if you need other features as well then it might be worth it.

    I believe there might also be a couple third-party libraries that can provide IS-like support but I haven't used any of them.

    Michael Taylor - 11/24/08
    http://p3net.mvps.org
    Monday, November 24, 2008 2:59 PM
    Moderator
  •  Thanks for explaining, Tony.
    AlexB
    Monday, November 24, 2008 3:59 PM
  •  Taylor:

    I was afraid that would be the answer.  Unfortunately I am doing this out of laziness and designing my own language sounds like a lot of work just to be lazy.  I will try looking up some third party libraries.

    Alex:

    You are very welcome.



    Tony
    Destroying the network, one circuit at a time.
    Tuesday, November 25, 2008 12:24 AM
  •  Unfortunately I am doing this out of laziness and designing my own language sounds like a lot of work just to be lazy.

    Tony, I love your style!

    AlexB
    Tuesday, November 25, 2008 12:54 AM