编写一个定制的Eclipse验证器 [英] writing a custom Eclipse validator

查看:134
本文介绍了编写一个定制的Eclipse验证器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个我要通过eclipse验证的自定义文件格式。换句话说,当我在eclipse编辑器中查看这个文件时,我想要一个红色的波浪线显示错误。这似乎应该是一件很容易的事情。有人可以指出我的写方向吗?

解决方案

如Konstantin所说,Xtext是一个伟大的方式,如果你可以定义你的完整格式。如果您只想验证一些复杂格式的一个方面,可能会更容易在文件上手动创建标记,请参阅 http://www.eclipsepluginsite.com/builders-natures-markers.html 如何显示语法eclipse编辑器插件中的错误


I have a custom file format that I'd like validated by eclipse. In other words when I view this file in the eclipse editor I'd like a red squiggly line to show up under errors. This seems like it should be a pretty easy thing to do. Can someone point me in the write direction?

解决方案

As mentioned by Konstantin, Xtext is a great way if you can define your complete format. If you just want to validate one aspect of some complex format, it might be easier to manually create markers on the file, see http://www.eclipsepluginsite.com/builders-natures-markers.html and How to show syntax errors in an eclipse editor plugin

这篇关于编写一个定制的Eclipse验证器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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