-
-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose Arduino state to VS Code extensions #2110
Conversation
- Update a shared state on fqbn, port, sketch path, and etc. changes. VS Code extensions can access it and listen on changes. - Force VISX activation order: API VSIX starts first. Signed-off-by: dankeboy36 <[email protected]>
Ref: eclipse-theia/theia#12587 Signed-off-by: dankeboy36 <[email protected]>
Removed the toolbar contribution from the UI. Ref: eclipse-theia/theia#12626/ Signed-off-by: dankeboy36 <[email protected]>
b36448b
to
18366e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Akos!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the code, and looks fine to me! 👍
Just left an unimportant comment but it's not blocking.
@@ -0,0 +1,23 @@ | |||
import { injectable } from '@theia/core/shared/inversify'; | |||
import { TerminalWidgetImpl as TheiaTerminalWidgetImpl } from '@theia/terminal/lib/browser/terminal-widget-impl'; | |||
import debounce from 'p-debounce'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that in most files in the project we're using lodash.debounce
, while only in one other file than this one we are using p-debounce
. Maybe it makes sense to stick to one of them and remove a dependency from the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noticing it; I did not. It's because the change is the "cherry-pick" of the upstream fix, which uses p-debounce
. See here: eclipse-theia/theia@6ab16d5#diff-da3ea75041150eb2403247c5ed84542210774c326c0e3b334029f4e3afb51fc0R45.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related: eclipse-theia/theia#9139
The follow-up PR of #2071.
Motivation
To provide a way to implement external tools for the Arduino IDE without modifying the IDE codebase. See #58.
This PR introduces a tiny layer of code to listen to Arduino context-related changes and set it on the VS Code extension. Other VS Code extensions can import this new VSIX API and retrieve context information from the Arduino IDE—information such as the sketch path, FQBN of the currently selected board, etc. See
vscode-arduino-api
for more details.I have an ongoing reference re-implementation of the well-known ESP exception decoder. It works in the Arduino IDE.
Change description
Other information
Reviewer checklist