简单文本编辑器中的语法着色 [英] syntax colouring in simple text editor

查看:109
本文介绍了简单文本编辑器中的语法着色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个简单的文本/代码编辑器。我认为到目前为止一切进展顺利。我创建了一个基本的GUI,可以执行简单的操作,如打开,保存和创建文件。



现在我正在通过阅读单词来进行语法突出显示文件,但这已经变得非常混乱,如果有人只是在GUI中输入,它不会突出显示语法。



任何人都可以给出一些提示,步骤,参考,或其他..我只是想为c,c ++,java ...等语言编写一个文本编辑器,它具有语法着色等功能(如语言支持)

可能我们有textpad中的选项(configue ---> preferenceclass - >文档类)

i希望在netbeans中执行此操作..



thanx

Im writing a simple text/code editor. I think everything has been going well so far. I created a basic GUI and can do simple operations like Open, Save, and Create files.

Right now I am doing syntax highlighting by reading the words as I open a file but this has turned out to be really messy and it doesnt highlight the syntax if someone is just typing in the GUI.

Could anyone please give some tips, steps, references, or something else.. I just want to make a text editor only for c, c++, java...etc languages that has functions like syntax coloring(like language support)
probably we have that option in textpad(configue--->preferenceclass-->document class)
i want to do this in netbeans..

thanx

推荐答案

谷歌是你的朋友:好好经常拜访他。他可以比在这里发布问题更快地回答问题......



一次非常快速的搜索得到了22,000个结果: Google:语法coloriser java [ ^ ]



将来,请尝试自己做至少基础研究,不要浪费你的时间或我们的时间。
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search gave 22,000 results: Google: syntax coloriser java[^]

In future, please try to do at least basic research yourself, and not waste your time or ours.


这篇关于简单文本编辑器中的语法着色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆