I'm looking for the right extension point for my plugin to access the cursor position in the editor. The aim is to provide additional information to the current code line in a plugin view. I sure it is possible, since the Outline view for example highlights the current function which I'm within. thx
相关问题
- Eclipse and Mylyn : how to disable grey files in t
- Installing Pydev for Eclipse throws error
- Error in Scala Compiler: java.lang.AssertionError:
- How to remove unused imports using Eclipse and not
- Assume/switch role in aws toolkit for eclipse 2.0
相关文章
- selenium+eclipse 打开网页时报错
- Eclipse failing to open
- Eclipse how can I indent C++ preprocessor macros
- Why is FindBugs ignoring my check for null?
- Eclipse cleanup - what are the “.index” files - ca
- Eclipse plugin to find out unused methods in a cla
- Spring NamespaceHandler issue when launching Maven
- How best to use ViewerFilter on a TreeViewer?
The following code does what I want
You can use
textSelection.getOffset()
from the pattern you've found and then use theorg.eclipse.jface.text.IDocument
interface to extract text from the document to do whatever analysis you want.IDocument
has methods to convert back and forth between character offsets and lines.