wakatime / jetbrains-wakatime

IntelliJ IDEA, PyCharm, RubyMine, PhpStorm, AppCode, AndroidStudio, Goland, Rider, & WebStorm plugin for quantifying your coding.
https://wakatime.com/intellij-idea
BSD 3-Clause "New" or "Revised" License
1.14k stars 167 forks source link

Add extra attributes to Heartbeat #211

Closed gandarez closed 2 years ago

gandarez commented 2 years ago

This PR adds three extra attributes to Heartbeat which are lines in file, is unsaved entity and line number.

alanhamlett commented 2 years ago

What does this return: document.getLineNumber(event.getOffset())

Maybe getLineNumber is for converting a character offset into the corresponding line number?

alanhamlett commented 2 years ago

Just noticed we should use alternate_project instead of project here: https://github.com/wakatime/jetbrains-wakatime/pull/211/files#diff-312591f623254611255f4912e5dd328801d6957f80417b5309ab88fcbe128318L343

Could you add that to this PR?

gandarez commented 2 years ago

@alanhamlett thanks for helping me to implement getLineNumber(). I also changed to alternate_project as mentioned.