Use ICSharpCode. TextEditor to highlight multi-file text syntax

Source: Internet
Author: User
Tags sharpdevelop

Use ICSharpCode. TextEditor to highlight text Syntax of multiple file types (including T-SQL script syntax highlighting not officially included) (including VS. NET2003 solution)

SharpDevelop (# develop) has many "by-products". Among them, the most famous class libraries are SharpZipLib (# ziplib) and pure C #. In SharpDevelop (# develop, "hides" many excellent class libraries, including ICSharpCode. textEditor is the table creator.
ICSharpCode. the source code of TextEditor is hidden in \ SharpDevelop \ src \ Libraries \ ICSharpCode. in TextEditor, you can use SharpDevelop (# develop) to open ICSharpCode. textEditor. cmbx, you can also look at its example (\ SharpDevelop \ samples \ SharpPad) SharpPad. cmbx.
OnSimple ms SQL database table content script generator, supporting multi-level Association (including source code) (Update: re-purchase code, add special support for NVARCHAR, result saving, SQL syntax highlighting)To implement syntax highlighting for the T-SQL, but ICsharpCode does not officially include support for the T-SQL.
So I think, since it is open source, and open the format, there should be developers have the same requirements as me, will write a T-SQL syntax highlighting file (tsql-mode.xshd ), I guess the file name because I analyzed ICSharpCode. after the naming rules of the TextEditor syntax file are derived, and then google, there is still the source code (\ SharpDevelop \ src \ Libraries \ ICSharpCode. in TextEditor), used as the resource compilation, but before compilation, modify SyntaxModes. add the following content at the end of the xml file:
<Mode file = "TSQL-Mode.xshd"
Name = "TSQL"
Extensions = ". SQL"/>
Compile ICSharpCode. TextEditor. dll and reference it.
Advantages of ICSharpCode. TextEditor:
1. provides most of the excellent text editor functions;
2. high scalability: support for any new file format/syntax;
3. Efficiency: the syntax highlighting speed is very fast, regardless of the file size. I used a 6 m SQL file for testing. When a syntax highlighting tool crashed, ICSharpCode. TextEditor completed the work in an instant.
Some friends may need direct source code, so I have created a special solution for VS. NET2003, Which is packed and uploaded for your convenience.
Click here to download: ICSharpCode.TextEditor.zip

Http://www.cnblogs.com/unruledboy/archive/2005/07/19/TSQLSyntaxHighlight.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.