-
Open Settings (or Preferences) then Plugins | ⚙️
-
Select Manage Plugin Repositories…
-
Enter
https://plugins.jetbrains.com/plugins/eap/list?pluginId=17096
-
Open Settings (or Preferences) then Plugins | ⚙️
-
Select Install Plugin from Disk…
This plugin has been bootstrapped from the IntelliJ Platform Plugin Template. It might be worth tracking upstream changes if they can be applied there too.
.
├── .github
│ └── workflows (6)
├── .run (7)
├── CHANGELOG.md (1)
├── excalidraw-assets (2)
├── plugin (3)
├── project-fixture (4)
└── settings.gradle.kts (5)
-
The changelog to manually edit
-
This is the Excalidraw React web-app, this is a Gradle project
-
This is the actual IntelliJ plugin code base, it’s a Gradle project
-
Simple project to open in the sand-boxed IDE.
-
Usual declaration of the gradle subprojects (
excalidraw-assets
andplugin
) -
GitHub Action workflows
-
IntelliJ IDEA’s run configurations (Run Plugin, etc.)
excalidraw-assets
├── build.gradle.kts (1)
├── config-overrides.js (2)
├── node_modules (8)
├── package.json (3)
├── public (4)
│ └── index.html
├── src (5)
│ ├── App.tsx
│ ├── index.tsx
│ ├── react-app-env.d.ts
│ └── styles.css
├── tsconfig.json (6)
└── yarn.lock (7)
-
The Gradle build configuration, configure
node
andyarn
tasks, also defines input/output for better cache-ability. -
This is a webpack override configuration, used by
react-app-rewired
, in particular it allows to inline source maps to allow debugging in a JCEF devtools. -
Usual
package.json
that declares dependencies, with unbounded ranges. -
The location of the
index.html
-
The location of the React app sources in typescript.
-
Configuration file necessary for typescript.
-
A Yarn lock file represents the exact dependencies, it allows reproducible builds.
-
The
node_modules
folder is where the dependencies are downloaded. Its location is hardcoded innode
ornpm
.
JS and React are stranger things to me, their official documentation can be overwhelming at first; I found this blog post useful to introduce me to basic concepts.
On the same topic, here’s a blog post with the typescript angle.
Use the predefined task Run Plugin
, whose configuration is saved in the .run
folder.
This plugin is using the diagnostic logger at DEBUG level, that means the log events
will be appended in the usual idea.log
.
However, the log category has to be configured at DEBUG level, in order to do so
-
Run the plugin configuration
-
Once the sand-boxed IDE is ready, open Help | Diagnostic Tools | Debug Log Settings…
-
Enter
#com.github.bric3.excalidraw
The sand-boxed IDE’s log file is located here : plugin/build/idea-sandbox/system/log/idea.log
.
Once the sandbox has been run once, this configuration will appear in the following file under the following element:
/application/component[@name='PropertiesComponent']/property[@name='log.debug.categories']
Unfortunately, some dependencies sources are not available, in particular rd
.
This project was bumped to 2022.2 and gradle-intellij-plugin is now able to pull
the sources, which now embed the ones of JCef are embedded.
If this is ever interesting to you, it’s possible to clone sources of [JetBrains/jcef](https://github.com/JetBrains/jcef). Whe running the app one can use the JCEF type
org.cef.CefApp
, and get the version something alongCefApp.getInstance().getVersion()
then checkout the matching branch e.g.git checkout cef-81.2.24
.
Part of this code is generated from C/C#, however types that are interacted with are available in this rd project. Since updating to 2022.2 the jar don’t have the version in its name, so unsure about what’s following but the releases seems somewhat aligned to IntelliJ releases so 2022.5 then navigate the repo to the associated tag.
-
Lifetime or LifetimeDef types are generated.
Be sure to check the official documentation