Hi Folks,

I had a question regarding calculating caret positions. I was writing some test cases for java.completion module, to make sure that invoking code completion results as the desired output. But in order to do that, I needed the caret position of where code completion needs to be invoked. (as can be seen in JavaCompletionTask18FeaturesTest.java <https://github.com/apache/incubator-netbeans/blob/master/java/java.completion/test/unit/src/org/netbeans/modules/java/completion/JavaCompletionTask18FeaturesTest.java>)

So, my question is how can I calculate the caret position of a particular position in a java file in NetBeans? I apologize for the naivety of the question. Any pointers are appreciated.

Thanks,
Sarvesh

Reply via email to