Editor的语法着色原理:Eclipse使用damage ,repair和reconcile模型来实现语法着色功能,当用户每次修改了document,Reconciler就会去计算文档中哪些可视区域是无效的以及如何去repair之:这里的damage表示需要重新加以显示的文本,repair则表示重新进行显示的方式,而reconcile则是这个重新显示的过程.为了定制damage和repair,需要给TextEditor配置自定义的SourceViewerConfigration,TextEditor中的主要组成部分叫SourceViewer,默认情况下SourceViewer不支持语法着色功能,而通过扩展SourceViewerConfiguration就可以对SourceViewer进行定制,通过复写SourceViewerConfiguration的getPresentationReconciler()方法就可以定制我们自己的Reconciler,定制Reconciler主要是给其配置相关的Damager和Repairer,而这两个东东又会跟RuleScanner关联:
java 代码
- PresentationReconciler reconciler = new PresentationReconciler();
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer (getTagScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
RuleScanner定义了各种用于区分各种Token的规则以及相关的TextAttribute(颜色属性就定义在里面)
内容辅助功能的实现:需要改写SourceViewerConfiguration.getContentAssistance()方法,而自动完成行为的设置通过定义不同的CompletionProcessor来实现, CompletionProcessor需要复写getCompletionProposalAutoActivationCharacters()来告诉编辑器在输入何种内容时给出自动提示的内容,同时还需要实现computeCompletionProposals()方法来告诉要显示的提示内容(completion proposal)
分享到:
相关推荐
1. Patch Description: Patch SAPscript Legacy Text Editor 2. Patch Name: SAPSLTESP00_0-70001053 Since SAPGUI for Windows Release 7.40 Compilation 2 (Patch 05) and higher, the controls for SAPscript ...
TextEditor TextEditor下载
SAPscript Legacy Text Editor patch 报错补丁程序。 SAP GUI 740/750 Smartforms Editor 报错补丁,SAPscript Legacy Text Editor patch, sap smartforms ,scriptforms SAPscript Legacy Text Editor patch
ICSharpCode.TextEditor_2.2(含源代码)是一个很强大的编辑器,使用C#语言编写,能实现撤销,恢复,行号,语法加亮等的操作
安装sap gui 750后,打开smartforms或scriptforms提示:CSapEditorCtrl::GetObject: Object 13 does not exist的解决方法: 下载SAPscript Legacy Text Editor patch,安装到本机就OK了。
包含32位 和 64位,安装时,自动进行选择
eclipse中texteditor的插件
ICSharpCode.TextEditor 是一款非常不错的.NET代码编辑控件,内置了多种高亮语言支持,同时完美支持中文,非常赞!
ICSharpCode.TextEditor更新版本
超强文本编辑器(Jota Text Editor)是一个为超长文本文件设计的文本编辑器。她的名字发音为 i-o-ta。 特性: - 支援多达 100 万个字符(能否成功解码取决于Android 系统的实现方式). - 变更字符编码。 - 自动检测...
CSapEditorCtrl::GetObject: Object XX does not exist的解决方法
SAP SMARTFORMS打开文本编辑器出现弹窗报错:"CSapEditorCtrl::GetObject: Object 15 does not exist" 或者 se71打开报错Graphical Form Painter could not be called 请打上此补丁
E-TextEditor是一款新概念的窗口本文编辑软件,带有强大文字编辑功能,和一些统一的能力。支持多种语言文字,可以输入大量和实时性通信信息。
E-TextEditor是一款新概念的窗口本文编辑软件,带有强大文字编辑功能,和一些统一的能力。支持多种语言文字,可以输入大量和实时性通信信息。
HTML Text Editor ,HTML Text Editor 实现了基于 WebView 上的 CKEditor 编辑器的功能。
E-TextEditor.v1.0.43.Cracked-EAT
kPad - Lightweight Text Editor文本编辑器
TextEditor文本整理器V3.0.zip
利用ICSharpCode.TextEditor.dll做了一个简单的例子 http://download.csdn.net/detail/ray624908246/9819510
Web Wiz Rich Text Editor 4.17 更新日志:2016-12-161.RTE_configuration/RTE_setup.asp - 更新的版本号和已删除的包含2.functions/functions_upload - 当使用Persists AspUpload时允许上传脚本文件的修复漏洞