SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Adding file associations and IDE for script engine...

Last post 05-19-2008 8:19 AM by MattWard. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-16-2008 9:12 PM

    Adding file associations and IDE for script engine...

    Hello,

        I am working on an open-source project that is a script engine for the .NET Framework 2.0.  I currently have it being hosted on Google Code.

    http://code.google.com/p/windowsscripthostdotnet/

        This script engine supports C# and VB.NET plus a couple of others.  What I would like to do is to setup SharpDevelop as an IDE for the script engine.  I have the script engine associated with different file extensions (NCS for C# and NVB for VBNET) to avoid any conflict with regular coding files.  How can I add this association to SharpDevelop and have it treat the files as code?

     TIA...

    The 3 sentences that will get you through life:
    1) "Pssst! Cover for me."
    2) "Oh, good idea, boss."
    3) "Well, it was like that when I got here."
    -- Homer J. Simpson
  • 05-17-2008 3:50 PM In reply to

    Re: Adding file associations and IDE for script engine...

    Create an NScript.addin file as shown below and put it in SharpDevelop AddIns folder. 

     <AddIn name        = "NScript binding"
           author      = ""
           copyright   = ""
           url         = "http://icsharpcode.net"
           description = "Binding for the NScript.">
        
        <Manifest>
            <Identity name = "ICSharpCode.NScriptBinding"/>
            <Dependency addin = "ICSharpCode.CSharpBinding" requirePreload = "true"/>
        </Manifest>

        <Runtime>
            <Import assembly = "$ICSharpCode.CSharpBinding/CSharpBinding.dll"/>
            <Import assembly = "$ICSharpCode.VBNetBinding/VBNetBinding.dll"/>
            <Import assembly = ":ICSharpCode.TextEditor"/>
        </Runtime>

        <Path name = "/AddIns/DefaultTextEditor/CodeCompletion">
            <CodeCompletionBinding id = "NCSharp" extensions = ".ncs" class = "CSharpBinding.CSharpCompletionBinding"/>
        </Path>

        <Path name = "/AddIns/DefaultTextEditor/CodeCompletion">
            <CodeCompletionBinding id = "NVBNet" extensions = ".nvb" class = "VBNetBinding.VBNetCompletionBinding"/>
        </Path>

        <Path name = "/AddIns/DefaultTextEditor/Formatter/NC#">
            <Class id ="CSharpFormatter" class = "CSharpBinding.FormattingStrategy.CSharpFormattingStrategy"/>
        </Path>

        <Path name = "/AddIns/DefaultTextEditor/Formatter/NVBNET">
            <Class id ="VBNetFormatter" class = "VBNetBinding.FormattingStrategy.VBFormattingStrategy"/>
        </Path>

        <Path name = "/Workspace/Parser">
            <Parser id    = "NC#"
                    supportedextensions  = ".ncs"
                    projectfileextension = ".csproj"
                    class = "CSharpBinding.Parser.TParser"/>
        </Path>

        <Path name = "/Workspace/Parser">
            <Parser id    = "NVBNet"
                supportedextensions  = ".nvb"
                projectfileextension = ".vbproj"
                class = "VBNetBinding.Parser.TParser"/>
        </Path>

        <Path name="/SharpDevelop/ViewContent/DefaultTextEditor/SyntaxModes">
            <SyntaxMode id="NC#.SyntaxMode"
                        extensions=".ncs"
                        name="C#"
                        resource="ICSharpCode.TextEditor.Resources.CSharp-Mode.xshd"/>
        </Path>

        <Path name="/SharpDevelop/ViewContent/DefaultTextEditor/SyntaxModes">
            <SyntaxMode id="VBNet.SyntaxMode"
                        extensions=".nvb"
                        name="VBNET"
                        resource="ICSharpCode.TextEditor.Resources.VBNET-Mode.xshd"/>
        </Path>
    </AddIn>

  • 05-18-2008 5:54 PM In reply to

    Re: Adding file associations and IDE for script engine...

    Thanks, dude!

    Now, is there a way to set the File Mode for these file types (NCS → C#, NVB → VBNet)?

    Before you answer RTFM could you point me to a tutorial site with the answer(s)?

     

    TIA... 

    The 3 sentences that will get you through life:
    1) "Pssst! Cover for me."
    2) "Oh, good idea, boss."
    3) "Well, it was like that when I got here."
    -- Homer J. Simpson
  • 05-19-2008 8:19 AM In reply to

    Re: Adding file associations and IDE for script engine...

    The NScript.addin file already sets the file mode like this. The SyntaxMode part does this for you.
Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.