关于eclipse语法高亮插件syntaxcoloringforeclipse,请参考下面文章http://blog.sina.com.cn/s/blog_43eb3cdc0100cyft.html默认的插件不支持SAS语法高亮。我的目的是增加对SAS的支持。这个插件是基于jEdit的语法高亮开发的,用了jEdit的语法高亮的配置文件。http://www.codecommit.com/blog/eclipse/general-purpose-editor-within-eclipse而jEdit是支持SAS语法的http://www.jedit.org/index.php?page=features它支持以下130种语法SyntaxHighlightingjEditsupportssyntaxhighlightingformorethan130filetypes:ActionScript Ada95 ANTLR ApacheHTTPD APDL AppleScript ASPAspect-J Assembly AWK Bformalmethod Batch BBj BCELBibTeX C C++ C# CHILL CIL COBOLColdFusion CSS CVSCommit D DOxygen DSSSL EiffelEmbPerl Erlang Factor Fortran Foxpro FreeMarker FortranGettext Groovy Haskell HTML Icon IDL InformINI InnoSetup Informix4GL Interlis Io Java JavaScriptJCL JHTML JMK JSP Latex Lilypond LispLOTOS Lua Makefile Maple ML Modula-3 MoinMoinMQSC NetRexx NQC NSIS2 ObjectiveC ObjectRexx OccamOmnimark Parrot Pascal Patch Perl PHP PikePL-SQL PL/I Pop11 PostScript Povray PowerDynamo Progress4GLProlog Properties PSP PV-WAVE Pyrex Python REBOLRedcode Relax-NG RelationalView Rest Rib RPMspec RTFRuby Ruby-HTML RView S+ S# SAS SchemeSDL/PL SGML ShellScript SHTML Smalltalk SMIMIB SQRSquidconf SVNCommit Swig TCL TeX Texinfo TPLTransact-SQL UnrealScript VBScript Velocity Verilog VHDL XMLXSL ZPTThereareevenmorecontributedsyntaxhighlightingmodesatthejEditcommunitywebsite.所以只要将jEdit的文件加到syntaxcoloringforeclipse中就可以实现目的。做法如下1.下载syntaxcoloringforeclipse插件下载页面http://gstaff.org/colorEditor/download.html得到cbg.editor_1.2.6.jar,解压到任意目录下的cbg.editor_1.2.6目录下。2.下载安装jEdit,为了得到sas.xml配置文件下载页面http://www.jedit.org/index.php?page=download安装后将jEdit/modes下的sas.xml拷贝到刚才的cbg.editor_1.2.6/modes目录下3.修改cbg.editor_1.2.6/modes/catalog文件在里面增加<!–copyfromJeditmode–><MODENAME=”sas” FILE=”sas.xml” FILE_NAME_GLOB=”*.sas”/>4.修改cbg.editor_1.2.6/modes/sas.xml,因为我发现里面对SAS的注释和字符串定义不完整增加 <!–SASstylecomment:)–> <SPANTYPE=”COMMENT1″> <BEGIN>*</BEGIN> <END>;</END> </SPAN> <SPANTYPE=”LITERAL1″NO_LINE_BREAK=”FALSE”> <BEGIN>”</BEGIN> <END>”</END> </SPAN>5.拷贝cbg.editor_1.2.6到eclipse/plugins目录下注:如果之前已经安装过这个插件,在eclipse/plugins目录下会有cbg.editor_1.2.6.jar文件,删除即可6.启动eclipse,按照插件的使用方法,关联sas文件和”SyntaxColoringEditor”eclipse菜单Window->Preferences…->General->Editors->FileAssociations设置好后,关闭已经打开的sas文件,重新打开。或者在文件上点右键->OpenWith->SyntaxColoringEditor享受eclipse的高亮效果吧。