/// <summary> /// Constructor with parameters</summary> /// <param name="fileType">File type (a string like "Text", "Lua", etc)</param> /// <param name="extension">Extension</param> /// <param name="imageName">Name of image file for editor's Open icon</param> /// <param name="bOpenEverything">Whether to open all documents</param> /// <param name="syntaxHighlighter">SledDocumentSyntaxHighlighter</param> /// <param name="embeddedTypes">SledDocumentEmbeddedTypeInfo array</param> public SledDocumentClient(string fileType, string extension, string imageName, bool bOpenEverything, SledDocumentSyntaxHighlighter syntaxHighlighter, params SledDocumentEmbeddedTypeInfo[] embeddedTypes) { Info = new DocumentClientInfo(fileType, extension, null, null) { NewIconName = imageName, OpenIconName = imageName }; if (bOpenEverything) { if (s_catchAllClient != null) throw new InvalidOperationException("catch-all ISledDocumentClient already set"); s_catchAllClient = this; } SyntaxHighlighter = syntaxHighlighter; EmbeddedTypes = new List<SledDocumentEmbeddedTypeInfo>( embeddedTypes); }
public DocumentClient(Editor editor, string extension) { m_editor = editor; string fileType = CodeDocument.GetDocumentType(extension); m_info = new DocumentClientInfo(fileType, extension, null, null); }