///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>JavascriptSyntaxLanguage</c> class. /// </summary> public JavascriptSyntaxLanguage() : base("Javascript") { // Initialize this language from a language definition SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "JavaScript.langdef"); // // NOTE: Make sure that you've set up an ambient parse request dispatcher for your application // (see documentation on 'Parse Requests and Dispatchers') so that this parser is called in // a worker thread as the editor is updated // // Register a parser that will construct a complete range-based outlining source for the document // within a worker thread after any text change... for this sample, the outlining source is returned // as the parser's result to the ICodeDocument.ParseData property, where it is retrieved by // the outliner below... note that if we were doing more advanced parsing // by constructing an AST of the document, we'd want to use the AST result to construct the // range-based outlining source instead this.RegisterService <IParser>(new JavascriptOutliningParser()); // Register an outliner, which tells the document's outlining manager that // this language supports automatic outlining, and helps drive outlining updates this.RegisterService <IOutliner>(new JavascriptOutliner()); // Register a built-in service that automatically provides quick info tips // when hovering over collapsed outlining nodes this.RegisterService(new CollapsedRegionQuickInfoProvider()); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>CollapsedRegionSyntaxLanguage</c> class. /// </summary> public CollapsedRegionSyntaxLanguage() : base("CollapsedRegion") { // Initialize this language from a language definition SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "CSharp.langdef"); // Register a tagger provider on the language as a service that can create CollapsedRegionTag objects this.RegisterService(new CodeDocumentTaggerProvider <CollapsedRegionTagger>(typeof(CollapsedRegionTagger))); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>CustomSyntaxLanguage</c> class. /// </summary> public CustomSyntaxLanguage() : base("CustomDecorator") { // Initialize this language from a language definition SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "CSharp.langdef"); // Register a tagger provider on the language as a service that can create CustomTag objects this.RegisterService(new TextViewTaggerProvider <WordHighlightTagger>(typeof(WordHighlightTagger))); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>CustomSyntaxLanguage</c> class. /// </summary> public CustomSyntaxLanguage() : base("CustomDecorator") { // Initialize this language from a language definition SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "CSharp.langdef"); // Register a provider service that can create the custom adornment manager this.RegisterService(new AdornmentManagerProvider <AlternatingRowsAdornmentManager>(typeof(AlternatingRowsAdornmentManager))); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>ColorPreviewSyntaxLanguage</c> class. /// </summary> public ColorPreviewSyntaxLanguage() : base("ColorPreview") { // Initialize this language from a language definition SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "Css.langdef"); // Register a tagger provider on the language as a service that can create ColorPreviewTag objects this.RegisterService(new CodeDocumentTaggerProvider <ColorPreviewTagger>(typeof(ColorPreviewTagger))); // Register a provider service that can create the custom adornment manager this.RegisterService(new AdornmentManagerProvider <ColorPreviewAdornmentManager>(typeof(ColorPreviewAdornmentManager))); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>IntraTextNoteSyntaxLanguage</c> class. /// </summary> public IntraTextNoteSyntaxLanguage() : base("IntraTextNote") { // Initialize this language from a language definition SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "CSharp.langdef"); // Register a provider service that can create the custom adornment manager this.RegisterService(new AdornmentManagerProvider <IntraTextNoteAdornmentManager>(typeof(IntraTextNoteAdornmentManager))); // Register a tagger provider on the language as a service that can create IntraTextNoteTag objects this.RegisterService(new CodeDocumentTaggerProvider <IntraTextNoteTagger>(typeof(IntraTextNoteTagger))); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>SimpleSyntaxLanguage</c> class. /// </summary> public SimpleSyntaxLanguage() : base("Simple") { // Initialize the language using the lexer and token tagger in the .langdef file SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "Simple-Basic.langdef"); // // NOTE: Make sure that you've set up an ambient parse request dispatcher for your application // (see documentation on 'Parse Requests and Dispatchers') so that this parser is called in // a worker thread as the editor is updated // this.RegisterParser(new SimpleParser()); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>JavascriptSyntaxLanguage</c> class. /// </summary> public JavascriptSyntaxLanguage() : base("Javascript") { // Initialize this language from a language definition SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "JavaScript.langdef"); // Register an outliner, which tells the document's outlining manager that // this language supports automatic outlining, and helps drive outlining updates this.RegisterService <IOutliner>(new TokenOutliner <JavascriptOutliningSource>()); // Register a built-in service that automatically provides quick info tips // when hovering over collapsed outlining nodes this.RegisterService(new CollapsedRegionQuickInfoProvider()); }
///////////////////////////////////////////////////////////////////////////////////////////////////// // OBJECT ///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Initializes a new instance of the <c>CollapsedRegionSyntaxLanguage</c> class. /// </summary> public CollapsedRegionSyntaxLanguage() : base("CollapsedRegion") { // Initialize this language from a language definition SyntaxEditorHelper.InitializeLanguageFromResourceStream(this, "CSharp.langdef"); // Register a provider service that can create the custom adornment manager this.RegisterService(new AdornmentManagerProvider <CollapsedRegionAdornmentManager>(typeof(CollapsedRegionAdornmentManager))); // Register a tagger provider on the language as a service that can create CollapsedRegionTag objects this.RegisterService(new CodeDocumentTaggerProvider <CollapsedRegionTagger>(typeof(CollapsedRegionTagger))); // Register a quick info provider for collapsed regions this.RegisterService(new CollapsedRegionQuickInfoProvider()); }