public DocumentClient(Editor editor, string extension) { m_editor = editor; string fileType = CodeDocument.GetDocumentType(extension); m_info = new DocumentClientInfo(fileType, extension, null, null); }
/// <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 KeyValueEditor(ICommandService commandService, IControlHostService controlHostService, IContextRegistry contextRegistry, IDocumentRegistry documentRegstiry, IDocumentService documentService) { this.commandService = commandService; this.contextRegistry = contextRegistry; this.controlHostService = controlHostService; this.documentRegstiry = documentRegstiry; this.documentService = documentService; documentInfo = new DocumentClientInfo("KVDocument", (string)null, null, null, true); }
public ModelViewer(IDocumentRegistry documentRegistry) { string[] exts = { ".atgi", ".dae" }; m_info = new DocumentClientInfo("3D Model", exts, null, null, false); m_documentRegistry = documentRegistry; }
/// <summary> /// Returns whether the client can open or create a document at the given URI</summary> /// <param name="uri">Document URI</param> /// <returns>True iff the client can open or create a document at the given URI</returns> public bool CanOpen(Uri uri) { return(DocumentClientInfo.IsCompatibleUri(uri)); }