This project provides an IntelliJ plugin that assists in the usage of classes using members generated by the
PySynthetic
library.
The goal of this plugin is to provide:
- Auto-completion of the names of generated members when using PySynthetic-using types;
- Type information for the generated members, if available (via the use of
contract
); - Initializer editing assistance;
This plugin uses Parboiled for parsing contracts. Because of a dependency issue (IntelliJ already has an asm.jar in its classpath, in version 5.0.3), we depend on Parboiled version 1.1.7.
Build IDE version: 191.7141 Build Python Community Edition version: 2019.1.191.7141.2
- IDE setup
- You need to have IntelliJ IDEA (Community Edition is enough), with the matching version
- Ensure that you have the plugin development kit
- Download the Python Community Edition plugin that matches the IDE version.
- Open the pysynthetic-intellij project in IDEA
- Configure an IntelliJ SDK version that matches the current IDE version
- Open 'File/Project Structure...'
- Add an IntelliJ Plugin development SDK if it does not exist, in 'Platform Settings/SDKs'
- Configure the project to use the newly-created SDK, in 'Project Settings/Project'
- In the SDK Library classpath, add
lib/python-ce.jar
(you will have to unzip the plugin zip file)
- Configure an IntelliJ SDK version that matches the current IDE version
Now, you should be able to successfully build the plugin using the entries in the "Build" menu.
- Run plugin with IntelliJ "run" command
- The IntelliJ "run" command will automatically launch a version of IntelliJ, with a separate set of plugins.
- The first time you run that IDE, ensure that the Python CE plugin is installed
- Then open a Python project and check that everything works as expected
- Link to Python CE source code for debugging
- Download the files from IntelliJ CE public repository,
from the branch that matches the Python plugin version.
- I recommend downloading a zip file instead of cloning, as there are a lot of files. (Just the zip is already a few hundred megabytes)
- Add
python/src
to the SDK source paths - Warning: The downloaded source files are not an exact match for the compiled plugin. I do not know how to determine which commit matches a published plugin version.
- Create tag
- Compile module to zip file ("Build/Prepare plugin module for deployment...")
- Push tag and master branch to GitHub
- Put zip file on GitHub
- Put zip file on plugins.jetbrains.com