Open LordLyng opened 5 years ago
Hi @LordLyng,
I cannot really tell only from manifest file. It's better to have communication (JSON messages) log attached.
To have overlay shows up, it needs a couple conditions.
Even flow would be following: 1) Plugin initiate to connect Send "register" message 2) LogiOption receive 1)'s message Generate session_id Send "register_ack" to plugin with session_id (GUID) 3) Plugin receive 2)'s message Send "tool_change" event with 2)'s session_id ex) {"message_type":"tool_change","session_id":"ba382f6b-444c-4613-9aaa-6bc83cb3dc4e","tool_id":"default"} note: sample session_id is randomly generated now.
Interestingly enough i initially gave up. I thought it was related to the focus manager in Options, since i supplied what i thought to be the correct exe name and PID but i noticed that options sent an activation message to my extension no matter which instance of VS code received focus.
After revisiting my code to create a communication log for this post, the overlay was working. It did however show up with "missing description" for all tool options. which i found weird since i did supply a language file.
This has led me to believe that maybe options caches plugins? So maybe the overlay wasn't showing because i had already loaded a previous version of the plugin where there were no more than one options per tool.
Is there any official guidelines as to what is needed for Options to reload the plugin correctly during development? IS it enough to edit the files? Should i remove the profile and install it again? Does it require Options to restart? When is the profiles loaded?
Furthermore, I've been snooping around in the default plugins that ship with options. Here i noticed that many of these supply a long list of tasks in tools.json - all these tasks seems to relate to some kind of system function as they are mapped with id's for both mac and windows. Is there any documentation available for what tasks are available and how they should be configured?
You can make sure Logi Option restart following steps. I think it is easier than reinstalling.
Mac: 1) Stop deamon /bin/launchctl unload /Library/LaunchAgents/com.logitech.manager.daemon.plist
2) Start deamon /bin/launchctl load /Library/LaunchAgents/com.logitech.manager.daemon.plist
Win: 1) Stop Logitech Options related tasks from Task Manager Task Manager: Process Tab: Sort by Name: Seach for LogiOptions It might have a couple related tasks.
2) Start Logitech Option Open Logitech Option UI
You might have a look to a library I wrote in C# that should ease plugin development for the Craft: https://github.com/ju2pom/logicraftsdk.NET Let me know if you find it useful.
I've been oweking on an VS Code extension utilizing the Craft. I have however encoutnered an issue where the tool options overlay aren't diplayed on touch events.
defaults.json:
tools.json:
don't mind the values they are literally palceholders for seing it work.
On my client i register my plugin, and then send a toolchange request to select the default tool. Touching the Crown doesn't display overlay and following turn events doesn't have a currnet_tool_option in it's task options