如何打开java代码编辑窗口,在eclipse插件中:我如何以编程方式突出显示java编辑器中的代码行?...

I am trying to develop an eclipse plugin that does some documentation check on java code and highlights some lines of code in the editor.

To achieve my goal, I DON'T want to create a new editor in eclipse, I simply want to extend the default java editor to draw a line under (or highlight) the methods that do not satisfy some set of predetermined requirements.

Do I need to create a PresentationReconciler? If yes, how do I make the JDT or workbench use my reconciler.

I have never done plugin development and this is my first attempt.

解决方案

Several starting points for you:

Annotations are an UI feature of JFace's text editor that allows you to visually mark some places in an open editor.

Markers are a Workbench feature, more high-level. They are generic "objects that may be associated with Workbench resources", and they can display in several places: in text editors (as annotations) or in the Problems view, for example.

Depending on what you want to do, you would plug in your plug-in into extension points related to either of those.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值