locked
Using code editor in your window RRS feed

  • Question

  • Hello,
    I need to create an application which allows the user to write short pieces of C# code, compile them and execute them.

    To get full language support like intellisense, colorizing, syntax checking etc. I thought I could use the Visual Studio's code editor and because I believe it is not possible to use it in an external program, I've decided to integrate the application into Visual Studio Shell.

    Now, I have two questions:
    1) Is it possible to host the code editor in your own window? Like to have my own Windows Form, and have the editor as a control on it?

    2) Is it possible to restrict the scope of code editor eg. to a method body only? You know, I need only short pieces to be entered, like "return a + b;"...

    Thanks,
    Jan
    Sunday, August 10, 2008 11:10 AM

Answers

  • Hello Jan,

    Is it possible to host the code editor in your own window?

    Please chck out the following references to get started:
    Hosting text editor in managed control
    Hosting the standard editor..



    intellisense, colorizing, syntax checking
    These functionality are actually provided by C# language service and the C# project system. Those are not available in isolated shell.

    Thanks.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Proposed as answer by Feng Chen Monday, August 11, 2008 5:09 AM
    • Marked as answer by Jan Kučera Monday, August 11, 2008 12:30 PM
    Monday, August 11, 2008 5:09 AM