Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
a90e3ae
Bump org.jetbrains.kotlinx:kotlinx-serialization-json
dependabot[bot] Jan 4, 2024
ef19f62
Bump org.java-websocket:Java-WebSocket from 1.5.4 to 1.5.5
dependabot[bot] Jan 4, 2024
8f0f14e
Bump org.gradle.toolchains.foojay-resolver-convention
dependabot[bot] Jan 12, 2024
52673ce
Bump actions/cache from 3 to 4
dependabot[bot] Jan 17, 2024
416ead3
Bump org.jetbrains.intellij from 1.16.1 to 1.17.0
dependabot[bot] Jan 18, 2024
e2411a8
Add developer notes documentation and related XML files
Jozott00 Jan 19, 2024
a2c591b
Remove developer node images
Jozott00 Jan 19, 2024
05b7c11
Initial rebuild
Jozott00 Jan 22, 2024
0b57c18
Clean up
Jozott00 Jan 23, 2024
88317f5
Refactor code to streamline simulation functionality
Jozott00 Jan 23, 2024
5cf651e
Bump JetBrains/qodana-action from 2023.3.0 to 2023.3.1
dependabot[bot] Jan 23, 2024
36dea65
Add simple console logger for simulation output
Jozott00 Jan 24, 2024
1e7a5cb
Add new SVG icons for logging and plugin
Jozott00 Jan 24, 2024
5070c09
Update TOML files for simulator improvements
Jozott00 Jan 25, 2024
df4baa6
Bump jtalk/url-health-check-action from 3 to 4
dependabot[bot] Jan 26, 2024
d212c75
Bump gradle/gradle-build-action from 2 to 3
dependabot[bot] Jan 26, 2024
92de8b0
Bump codecov/codecov-action from 3 to 4
dependabot[bot] Jan 31, 2024
8caa512
Implement refined Wokwi configuration processing
Jozott00 Feb 2, 2024
d96c23d
Merge pull request #13 from Jozott00/dependabot/github_actions/codeco…
Jozott00 Feb 3, 2024
ada56eb
Merge pull request #12 from Jozott00/dependabot/github_actions/gradle…
Jozott00 Feb 3, 2024
15bff05
Merge pull request #11 from Jozott00/dependabot/github_actions/jtalk/…
Jozott00 Feb 3, 2024
f0b3036
Merge pull request #10 from Jozott00/dependabot/github_actions/JetBra…
Jozott00 Feb 3, 2024
fa74945
Merge pull request #9 from Jozott00/dependabot/gradle/org.jetbrains.i…
Jozott00 Feb 3, 2024
bf7fb66
Merge pull request #7 from Jozott00/dependabot/github_actions/actions…
Jozott00 Feb 3, 2024
13a515e
Merge pull request #6 from Jozott00/dependabot/gradle/org.gradle.tool…
Jozott00 Feb 3, 2024
8546e39
Merge pull request #5 from Jozott00/dependabot/gradle/org.java-websoc…
Jozott00 Feb 3, 2024
b17b971
Merge branch 'rebuild' into dependabot/gradle/org.jetbrains.kotlinx-k…
Jozott00 Feb 3, 2024
99b5ca5
Merge pull request #4 from Jozott00/dependabot/gradle/org.jetbrains.k…
Jozott00 Feb 3, 2024
071a54c
Disable/Enable ConsoleToolWindow on demand
Jozott00 Feb 3, 2024
37f8c12
Merge remote-tracking branch 'origin/rebuild' into rebuild
Jozott00 Feb 3, 2024
dc8397d
Refactor simulator start process and implement firmware watch
Jozott00 Feb 10, 2024
2fee699
Refactor simulator start process, enable checking if running
Jozott00 Feb 10, 2024
b8dacea
Update wokwi path settings to be project path relative
Jozott00 Feb 10, 2024
2352b34
Implement licensing service and path resolving
Jozott00 Feb 10, 2024
e27bb56
Optimize imports
Jozott00 Feb 10, 2024
468cbcd
Add Wokwi Run Configuration
Jozott00 Feb 11, 2024
453a67c
Add GDBServer
Jozott00 Feb 17, 2024
91b0ce3
Add WokwiStartDebugConfig which enables controlled start of wokwi usi…
Jozott00 Feb 17, 2024
1f6cf90
Add Wokwi Simulator Debug Configuration
Jozott00 Feb 17, 2024
80a76e9
Refactor code for Coroutine usage in Wokwi IntelliJ plugin
Jozott00 Feb 20, 2024
74729b0
Improve WokwiGDBServer by implementing coroutines
Jozott00 Feb 20, 2024
20d741a
Add ElfPathMacro and GdbServerMacro
Jozott00 Feb 20, 2024
8b2f8cb
Add various files for Wokwi Intellij Plugin Guide
Jozott00 Feb 20, 2024
13ee6bd
Add GitHub Action for generating documentation
Jozott00 Feb 20, 2024
ea1df0d
Add automated testing and deployment to documentation workflow
Jozott00 Feb 20, 2024
d9c132e
Revise Github workflow for simpler build and deployment
Jozott00 Feb 20, 2024
553be39
Update Wokwi configuration and debugging setup
Jozott00 Feb 21, 2024
4136f31
Add new SVG icons for logs and plugins
Jozott00 Feb 21, 2024
ebdd824
Refactor imports and remove unused ones
Jozott00 Feb 21, 2024
386a3f6
Remove build-docs CI workflow
Jozott00 Feb 21, 2024
f8ca5d8
Improved license verification and UI, code cleanup
Jozott00 Feb 22, 2024
baf138a
Refactor license verification and UI updates
Jozott00 Feb 22, 2024
f64fbb9
Update Wokwi debug configuration and restrict inspection for Wokwi co…
Jozott00 Feb 22, 2024
7f659f9
Add new icon sizes
Jozott00 Feb 22, 2024
dcc84f1
Checkout possibility to run wokwi as run configuration
Jozott00 Feb 22, 2024
a6184ef
Refactor inspections from 'toml' to 'ide' package
Jozott00 Feb 22, 2024
341e070
Add error handling and improve firmware support
Jozott00 Feb 22, 2024
4df7843
Fix esp-idf firmware packaging
Jozott00 Feb 23, 2024
3b20ad8
Refactor firmware format detection and command start logic
Jozott00 Feb 23, 2024
d3d5f52
Add SVG icons and update README
Jozott00 Feb 23, 2024
40826c6
Update README.md
Jozott00 Feb 23, 2024
f5b17a4
Add new colorful SVG logo
Jozott00 Feb 23, 2024
a45aed8
Remove WokwiConfigTest and add new SVG logo
Jozott00 Feb 23, 2024
327b007
Merge remote-tracking branch 'origin/main' into rebuild
Jozott00 Feb 23, 2024
d6e9124
Remove plugin guide docs
Jozott00 Feb 23, 2024
0058250
Refactor codebase for clarity and performance
Jozott00 Feb 23, 2024
bdcceb9
Refactor and clean-up codebase
Jozott00 Feb 23, 2024
719cc2a
Remove unnecessary code and improve HTML language attribute
Jozott00 Feb 23, 2024
6c48aa8
Refactor method parameters and suppress annotation usage
Jozott00 Feb 23, 2024
a24184e
Update README.md
Jozott00 Feb 23, 2024
ce4dae8
Update WokwiConfigInspectionBase and gradle parameters
Jozott00 Feb 23, 2024
bf07153
Update platformVersion in gradle.properties and deprecate method in C…
Jozott00 Feb 23, 2024
c7c24b9
Merge remote-tracking branch 'origin/rebuild' into rebuild
Jozott00 Feb 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true

Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true

Expand All @@ -131,7 +131,7 @@ jobs:

# Upload the Kover report to CodeCov
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ${{ github.workspace }}/build/reports/kover/report.xml

Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/[email protected].0
uses: JetBrains/[email protected].1
with:
cache-default-branch-only: true

Expand Down Expand Up @@ -197,13 +197,13 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

# Setup Gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@v3
with:
gradle-home-cache-cleanup: true

Expand All @@ -54,7 +54,7 @@ jobs:

# Wait for IDEA to be started
- name: Health Check
uses: jtalk/url-health-check-action@v3
uses: jtalk/url-health-check-action@v4
with:
url: http://127.0.0.1:8082
max-attempts: 15
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
.idea
.qodana
build

.notes
.run
1 change: 1 addition & 0 deletions .run/Run Plugin.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@

## [Unreleased]
### Added
- Initial scaffold created from [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template)
- Embedded Wokwi simulator
- Wokwi console to control simulator
- wokwi.toml analysis support
- Wokwi simulation debugging support
121 changes: 110 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,119 @@
# IntelliJ Wokwi Simulator Plugin

This plugin integrates the [Wokwi](https://wokwi.com/) simulator for ESP32 devices into JetBrains' IntelliJ-based IDEs.
The project is currently in its early stages and has not yet been published on JetBrains' Marketplace.
<a name="readme-top"></a>

## Project Status
<!-- PROJECT SHIELDS -->
[![Contributors][contributors-shield]][contributors-url]
[![MIT License][license-shield]][license-url]
[![Issues][issues-shield]][issues-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]

The version in the `main` branch is very unstable and uses a non-maintaned version of the Wokwi simulator. Therefore, the plugin is rewritten and uses the same Wokwi simulator as the official VS-Code extension. In addition, the plugin configuration is aligned with the VS-Code configuration, i.e. the file `wokwi.toml` defines all relevant settings. This makes switching between IDEs effortless.
<!-- PROJECT LOGO -->
<br />
<div align="center">
<a href="https://github.com/Jozott00/wokwi-intellij">
<!--
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./blob/imgs/pluginIcon_dark.svg" width="80" height="80">
<img alt="Wokwi Intellij Icon" src="./blob/imgs/logoColorful.svg" width="80" height="80">
</picture>
-->
<img alt="Wokwi Intellij Icon" src="./blob/imgs/logoColorful.svg" width="120" height="120">
</a>


The progress of the new plugin version is tracked in the pull request [#14](https://github.com/Jozott00/wokwi-intellij/pull/14).
<h3 align="center">Wokwi Intellij Plugin</h3>

<p align="center">
Integrate Wokwi in Intellij-based Jetbrains IDEs.
<br />
<a href="https://jozott00.github.io/wokwi-intellij/starter-topic.html"><strong>Explore the docs »</strong></a>
<br />
<br />
<a href="https://github.com/Jozott00/wokwi-intellij/issues">Report Bug</a>
·
<a href="https://github.com/Jozott00/wokwi-intellij/issues">Request Feature</a>
</p>
</div>

<!-- ABOUT THE PROJECT -->
## About The Plugin

## Main branch version
![Wokwi Debug Showcase](blob/imgs/sim_running.png)

At present, it is possible to specify and run a binary on the Wokwi simulator within the IDE. By enabling binary watch,
the simulation automatically restarts after each new binary build.
<!-- Plugin description -->
The Wokwi Intellij plugin, an open-source tool, integrates the [Wokwi](https://wokwi.com) simulator with Jetbrains IDEs like CLion and RustRover.
It adopts the Wokwi VS Code extension's configuration approach for seamless IDE transitions, supporting the same platforms.

This plugin is a community plugin and not maintained by the [Wokwi](https://wokwi.com) team.
<!-- Plugin description end -->

### Features
- Run simulation in IDE window
- Automatically restart the simulation on rebuild
- Intelligent configuration checking
- Intellij idiomatic debugging (CLion only)

<!-- GETTING STARTED -->
## Documentation

Please visit the [Wokwi Intellij documentation](https://jozott00.github.io/wokwi-intellij/starter-topic.html).

### Installation

To follow the installation instructions, users typically navigate to the [installation section](https://jozott00.github.io/wokwi-intellij/starter-topic.html#installation).

For building and installing the plugin from source:
1. Clone or download the repository.
2. Execute `./gradlew buildPlugin`. <br/> This action saves the plugin build as `build/distributions/wokwi-intellij-x.x.x.zip`.
3. Follow steps to [install the plugin from disk](https://www.jetbrains.com/help/idea/managing-plugins.html#install_plugin_from_disk).



<!-- ROADMAP -->
## Roadmap

- [ ] Make Console writable
- [ ] Add Serial Port forwarding
- [ ] Add IoT gateway
- [ ] Support custom chips
- [ ] Add diagram.json editor

See the [open issues](https://github.com/Jozott00/wokwi-intellij/issues) for a full list of proposed features (and known issues).


<!-- CONTRIBUTING -->
## Contributing

To make this plugin even better, contributions are very welcome!

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag `enhancement`.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request



<!-- LICENSE -->
## License

Distributed under the MIT License. See `LICENSE.txt` for more information.




<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/jozott00/wokwi-intellij.svg
[contributors-url]: https://github.com/Jozott00/wokwi-intellij/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/jozott00/wokwi-intellij.svg
[forks-url]: https://github.com/Jozott00/wokwi-intellij/network/members
[stars-shield]: https://img.shields.io/github/stars/jozott00/wokwi-intellij.svg
[stars-url]: https://github.com/Jozott00/wokwi-intellij/stargazers
[issues-shield]: https://img.shields.io/github/issues/jozott00/wokwi-intellij.svg
[issues-url]: https://github.com/Jozott00/wokwi-intellij/issues
[license-shield]: https://img.shields.io/github/license/Jozott00/wokwi-intellij.svg
[license-url]: https://github.com/Jozott00/wokwi-intellij/blob/master/LICENSE.txt

![Simulation Configuration](https://github.com/Jozott00/wokwi-intellij/blob/main/blob/imgs/sim_screenshot0.png)
![Running Simulation](https://github.com/Jozott00/wokwi-intellij/blob/main/blob/imgs/sim_screenshot1.png)
16 changes: 16 additions & 0 deletions blob/imgs/logoColorful.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions blob/imgs/pluginIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions blob/imgs/pluginIcon_dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blob/imgs/sim_cfg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blob/imgs/sim_dbg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blob/imgs/sim_running.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ repositories {
dependencies {
implementation(files("libs/espimg-0.1.0.jar"))
implementation("org.java-websocket:Java-WebSocket:1.5.4")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
implementation("com.beust:klaxon:5.6")
implementation("com.akuleshov7:ktoml-core:0.5.1")
implementation("com.akuleshov7:ktoml-file:0.5.1")
implementation("io.arrow-kt:arrow-core:1.2.1")
}

// Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+.
Expand Down Expand Up @@ -148,7 +152,6 @@ tasks {
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
channels =
properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.').first()) }
channels = properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.').first()) }
}
}
6 changes: 6 additions & 0 deletions docs/devnotes/c.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE categories
SYSTEM "https://resources.jetbrains.com/writerside/1.0/categories.dtd">
<categories>
<category id="wrs" name="Writerside documentation" order="1"/>
</categories>
13 changes: 13 additions & 0 deletions docs/devnotes/redirection-rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rules SYSTEM "https://resources.jetbrains.com/writerside/1.0/redirection-rules.dtd">
<rules>
<!-- format is as follows
<rule id="<unique id>">
<accepts>page.html</accepts>
</rule>
-->
<rule id="8f79c39">
<description>Created after removal of "Debug Architecture" from wokwi-intellij-notes</description>
<accepts>Debug-Architecture.html</accepts>
</rule>
</rules>
24 changes: 24 additions & 0 deletions docs/devnotes/topics/Communication-Architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Communication Architecture

The plugin uses a wrapper around the simulator webview (iframe), to establish communication with the plugin.
It essentially serves as communcation proxy between the plugin and webview, as the communication
requirements for both sides are different.

> **Wcode** is the VSCode version of the Wokwi Simulator

```mermaid
sequenceDiagram
Intellij Plugin -->> Wcode Wrapper: Injects MessageRouter to listen on window.jcef()
Wcode -->> Wcode Wrapper: Sends message using postMessage(..., port)

Wcode Wrapper --> Wcode: Communicates over exchanged port
Intellij Plugin --> Wcode Wrapper: Communicates over injected message router

Intellij Plugin --> Wcode: Communicates using Wcode Wrapper in between
```

## Wcode

The url of the Wcode simulator is `https://wokwi.com/vscode/wcode?v=<version>`

E.g. `https://wokwi.com/vscode/wcode?v=2.4.0&g=10277ff&u=385442252248670209`
11 changes: 11 additions & 0 deletions docs/devnotes/topics/Debugger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Debugger

> This is not yet a good note
{style="warning"}

<procedure title="Implementing the debugger" id="implementing_the_debugger">
<step>Research on other debuggers</step>
<step>Create custom runner</step>
</procedure>

See [Custom Intellij Debugger](Intellij-Debugger.md) for research results.
17 changes: 17 additions & 0 deletions docs/devnotes/topics/Intellij-Debugger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Intellij Debugger

Research results regarding the Intellij platform debuggers.

**Intellij Community Classes**
- [XDebugProcess Abstract Class](https://github.com/JetBrains/intellij-community/blob/master/platform/xdebugger-api/src/com/intellij/xdebugger/XDebugProcess.java#L37)
provides debugging capabilities for a custom language/framework


## Python Intellij Debugger
[Source Directory](https://github.com/JetBrains/intellij-community/tree/master/python/src/com/jetbrains/python/debugger)

The [PyRemoteDebugProcess](https://github.com/JetBrains/intellij-community/blob/master/python/src/com/jetbrains/python/debugger/PyRemoteDebugProcess.java)
and its [PyDebugProcess](https://github.com/JetBrains/intellij-community/blob/master/python/src/com/jetbrains/python/debugger/PyDebugProcess.java) might be
a good starting point to implement a debug process to attach to Wokwi's GDB stub.

For the Runner take a look at the [Execution Documentation](https://plugins.jetbrains.com/docs/intellij/execution.html)
Loading