wakatime / delphi-wakatime

Embarcadero Delphi plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/delphi
BSD 3-Clause "New" or "Revised" License
29 stars 6 forks source link

C++ Builder Support #8

Open shaunroselt opened 11 months ago

shaunroselt commented 11 months ago

Describe the bug I installed this into my RAD Studio IDE and it works fine for Delphi and C++. When I use Delphi files, then it shows I am using Delphi and when I use C++ files, then it says I am using C++.

But the issue is with the Editor. It says I am using Delphi for both Delphi and C++. It should say C++ Builder as my Editor when I'm using C++ files.

To Reproduce Steps to reproduce the behavior:

  1. Work on any C++ Builder Project

Expected behavior I would expect my Editor to be C++ Builder, but I only see Delphi: image

diegomgarcia commented 11 months ago

Nice catch, I will add a filter on the file type to change the editor to C++ Builder. However I'm relocating to another country so I expect to get into this issue on next month.

shaunroselt commented 9 months ago

I'm thinking now.

If you add this feature to show C++ Builder, then it probably makes sense to rename this repo to "rad-studio-wakatime" as it's not just Delphi anymore.

diegomgarcia commented 9 months ago

Hey @shaunroselt, I think it make sense. First we just have to check if creating just the filter will fix everything for C++ or if it will raise some new issues. If something like this happens it would be better to separate into two packages.

Lets test it as soon as I have a little more time to get into this issue to work on.

alanhamlett commented 9 months ago

The editor displayed on your dashboard comes from parsing the heartbeat's User-Agent header or plugin json post value. For C++ Builder to be parsed I'll need to first add it to the list of supported editors.

shaunroselt commented 8 months ago

The editor displayed on your dashboard comes from parsing the heartbeat's User-Agent header or plugin json post value. For C++ Builder to be parsed I'll need to first add it to the list of supported editors.

Can we perhaps get it added so long then, please?

It can probably have the same color as Delphi since its logos are pretty much the same in terms of dominant colors.

alanhamlett commented 8 months ago

Added C++ Builder to the list of supported IDEs. The User-Agent header will need to be changed when the plugin detects itself running in C++ builder from:

https://github.com/wakatime/delphi-wakatime/blob/91461c9355bedca452abc04730f51273aa3db02f/src/WakaTimeSendHeartbeatThread.pas#L107

To:

UserAgent = 'delphi/' + DelphiVersion + ' cppbuilder-wakatime/' + PluginVersion;

diegomgarcia commented 8 months ago

Thanks @alanhamlett it's on my todo list now ;)

diegomgarcia commented 8 months ago

Hey @shaunroselt can you test the latest commit from the development branch to see if it works?

shaunroselt commented 8 months ago

Hey @shaunroselt can you test the latest commit from the development branch to see if it works?

Ah. You beat me to it 😁. I wanted to add C++ Builder support this weekend 😂.

Thanks. I'll test the development branch over the weekend and get back to you.

shaunroselt commented 4 months ago

I ended up never testing the development branch.

Is C++ Builder support still planned?

I'm still keen on this feature. It would be nice to have.