Skip to content

Commit

Permalink
Add Icons and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozott00 committed Jan 4, 2024
1 parent 1b64ddd commit 909b8fa
Show file tree
Hide file tree
Showing 10 changed files with 125 additions and 37 deletions.
53 changes: 17 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,25 @@
# wokwi-intellij
# Intellij Wokwi Simulator Plugin

![Build](https://github.com/Jozott00/wokwi-intellij/workflows/Build/badge.svg)
[![Version](https://img.shields.io/jetbrains/plugin/v/PLUGIN_ID.svg)](https://plugins.jetbrains.com/plugin/PLUGIN_ID)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/PLUGIN_ID.svg)](https://plugins.jetbrains.com/plugin/PLUGIN_ID)
Integrates the [Wokwi](https://wokwi.com/) simulator for ESP32 devices in Intellij based IDEs by Jetbrains.

## Template ToDo list
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
- [ ] Get familiar with the [template documentation][template].
- [ ] Adjust the [pluginGroup](./gradle.properties), [plugin ID](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin).
- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
- [ ] Set the `PLUGIN_ID` in the above README badges.
- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables).
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate).
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.
The project is in early stage and not yet published on Jetbrains' marketplace.

<!-- Plugin description -->
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.
# Roadmap

This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process.
- [x] Run simulation on specified binary
- [x] Auto restart simulation on new build
- [ ] Custom partition table support
- [ ] Custom bootloader support
- [ ] Custom Wokwi diagram support
- [ ] Support GDB debugging with IDE integration
- [ ] IDE native logging window
- [ ] Automatic binary detection

To keep everything working, do not remove `<!-- ... -->` sections.
<!-- Plugin description end -->
# Current State

## Installation
Currently it is possible to specify and run a binary on the Wokwi simulator within
the IDE. By enabling the binary watch, the simulation restarts on every new binary build.

- Using the IDE built-in plugin system:

<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "wokwi-intellij"</kbd> >
<kbd>Install</kbd>

- Manually:
![Simulation Configuration](https://github.com/Jozott00/wokwi-intellij/blob/main/blob/imgs/sim_screenshot0.png)

Download the [latest release](https://github.com/Jozott00/wokwi-intellij/releases/latest) and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>


---
Plugin based on the [IntelliJ Platform Plugin Template][template].

[template]: https://github.com/JetBrains/intellij-platform-plugin-template
[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation
![Running Simulation](https://github.com/Jozott00/wokwi-intellij/blob/main/blob/imgs/sim_screenshot1.png)
Binary file added blob/imgs/sim_screenshot0.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_screenshot1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.github.jozott00.wokwiintellij.services

import com.github.jozott00.wokwiintellij.listeners.WokwiElfFileListener
import com.github.jozott00.wokwiintellij.states.WokwiConfigState
import com.github.jozott00.wokwiintellij.utils.WokwiNotifier
import com.github.jozott00.wokwiintellij.wokwiServer.WokwiServer
import com.intellij.openapi.Disposable
import com.intellij.openapi.components.Service
Expand Down Expand Up @@ -56,6 +57,7 @@ class WokwiProjectService(val project: Project) : Disposable {

fun elfFileUpdate() {
println("FILE UPDATED ... restart")
WokwiNotifier.notifyBalloon("New build available, restarting simulation...", project)
simulationService.restartAll()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class WokwiToolWindow(private val configPanel: DialogPanel, private val simulati
panel.add(simulationPanel)
simulationPanel.loadSimulator()
panel.revalidate()
panel.repaint()
}

fun showConfig() {
Expand All @@ -27,6 +28,7 @@ class WokwiToolWindow(private val configPanel: DialogPanel, private val simulati
panel.add(configPanel)
simulationPanel.stopSimulator()
panel.revalidate()
panel.repaint()
}


Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin>
<id>com.github.jozott00.wokwiintellij</id>
<name>wokwi-intellij Template</name>
<name>Wokwi Simulator</name>
<vendor>jozott00</vendor>

<depends>com.intellij.modules.platform</depends>
Expand All @@ -11,6 +11,7 @@
<extensions defaultExtensionNs="com.intellij">
<toolWindow factoryClass="com.github.jozott00.wokwiintellij.toolWindow.SimulatorWindowFactory" anchor="right"
id="Wokwi Simulator"
icon="/icons/pluginIcon.svg"
/>
<postStartupActivity implementation="com.github.jozott00.wokwiintellij.listeners.WokwiPostStartupActivity"/>

Expand Down
45 changes: 45 additions & 0 deletions src/main/resources/META-INF/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 src/main/resources/META-INF/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.
45 changes: 45 additions & 0 deletions src/main/resources/icons/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 src/main/resources/icons/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.

0 comments on commit 909b8fa

Please sign in to comment.