Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: expose Arduino state to VS Code extensions #2110

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

Merged
kittaakos merged 3 commits into arduino:main from dankeboy36:set-arduino-context
Jul 5, 2023

Conversation

Copy link
Contributor

@dankeboy36 dankeboy36 commented Jun 21, 2023
edited by kittaakos
Loading

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

  • 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.

Other information

Reviewer checklist

  • PR addresses a single concern.
  • The PR has no duplicates (please search among the Pull Requests before creating one)
  • PR title and description are properly filled.
  • Docs have been added / updated (for bug fixes / features)

 - 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 <dankeboy36@gmail.com>
@kittaakos kittaakos added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 21, 2023
Ref: eclipse-theia/theia#12587
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Removed the toolbar contribution from the UI.
Ref: eclipse-theia/theia#12626/
Signed-off-by: dankeboy36 <dankeboy36@gmail.com>
Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Akos!

Copy link
Contributor

@AlbyIanna AlbyIanna left a 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';
Copy link
Contributor

@AlbyIanna AlbyIanna Jul 5, 2023

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.

Copy link
Contributor Author

@dankeboy36 dankeboy36 Jul 5, 2023

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.

Copy link
Contributor Author

@dankeboy36 dankeboy36 Jul 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kittaakos kittaakos merged commit 954fee4 into arduino:main Jul 5, 2023
@kittaakos kittaakos self-assigned this Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@per1234 per1234 per1234 approved these changes

+2 more reviewers

@kittaakos kittaakos kittaakos approved these changes

@AlbyIanna AlbyIanna AlbyIanna approved these changes

Reviewers whose approvals may not affect merge requirements
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /