创建 VerticalRuler 并添加信息

2022-01-16 00:00:00 eclipse-plugin eclipse eclipse-rcp

我是 Eclipse 插件的新手,我想创建一个 VerticalRuler,我发现这张 Subeclipse 的图片启发了我将信息添加到特定的代码行.现在我不知道从哪里开始添加这样的列.我的第一次尝试是在我的编辑器插件中创建一个列,但什么也没发生.我对每一个帮助我开始的提示感到高兴.干杯

I'm pretty new to Eclipse plugins and I want to create a VerticalRuler, I found this picture of Subeclipse which inspired me to add information to a specific code line. Right now I have no Clue where I would start adding a column like that. My first try was to create a column within my editor-plugin, but nothing happened. I'm happy about every hint that helps me start. cheers

CompositeRuler ruler2;    
ruler2= new CompositeRuler();
ruler2.addDecorator(0, new AnnotationRulerColumn(100));

推荐答案

我不确定你要做什么,但如果你正在创建一个新的编辑器,你可以覆盖createVerticalRuler(...) 方法.标尺列还有一个扩展点.请参阅 这里.

I'm not sure what you are trying to do but if you are creating a new editor, you can overwrite the createVerticalRuler(...) method. There is also an extension point for ruler Columns. See here.

相关文章