How to Get Cursor Position in Class Permanently deleted user 创建于 2014年07月25日 10:03 Hi everyone, I need to get my cursor position in open editor. But I cant manage to get correct number.When I click the "create log", I need to get this line information. (In this example it is 21)
http://confluence.jetbrains.com/display/IDEADEV/Plugin+Development+FAQ contains an answer to this question.
Thx for reply, but I've already tried it and it doesnt work and it is also deprecated.
What exactly doesn't work?
I assume you have an Action that executes when you select that menu item. In your action you can:
Thanks for the reply. This method gives me caret with x and y. How can I seperate these these two?
Edit: I did this with using method: editor.getLineHeight.
Now I have new problem: How can I get class or file location information of these files? I mean, I need a classpath of these files for autocomplete.
Edit: I solved it with some string methods. Now I have a new problem in new topic:
http://devnet.jetbrains.com/message/5521111#5521111
Hi guys,
Now I figure editor.getLineHeight isnt worked. So I need line number of my cursor.