2.1. Interfaces you should know

All file wizards have to implement this interface:

namespace SharpDevelop.Internal.Templates { 
    public interface INewFileWizard 
    { 
        void StartWizard(Form mainWindow, INewFileCreator creator, string parameters); 
    } 
} 
				

The mainWindow parameter is passed only for setting the Owner property of the wizard form correctly (and maybe for really advanced wizards to cast it to a MainWindow - and then gain full access to the SharpDevelop object model).

The second parameter is of interface type INewFileCreator:

namespace SharpDevelop.Internal.Templates { 
    public interface INewFileCreator 
    { 
        bool IsFilenameAvailable(string fileName); 
        void SaveFile(string filename, string content, string languageName, bool showFile); 
    } 
} 
				

The StartWizard method receives an INewFileCreator object. Currently it is used for "writing" a file to the IDE. The languageName parameter has to be set correctly according to the language name, or the syntax highlighting won't work correctly.

The parameters string is the "optional" string which can be defined in the wizard's definition Xml (described in the next section). Reasoning: you can use one assembly which creates VB, C#, JScript ... code and give a parameter in the Xml template which defines which language to generate by this parameter.