jansorg / pycharm-webinar-base

Setup used for the PyCharm webinar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Full implementation

The full implementation, based on this base setup, is available at https://github.com/jansorg/pycharm-flake8. It's available in the plugin repository at https://plugins.jetbrains.com/plugin/11563-flake8-support.

PyCharm Webinar 2019

Welcome to the PyCharm webinar!

This is the base setup used in Webinar. For details about the webinar see the PyCharm blog.

Please report an issue if the setup isn't working for you!

I'm sorry that the initial setup is this complicated. You'll only need to this once, promise!

These steps won't be shown during the webinar. They're necessary only once to setup your environment to work on a Python plugin.

Setup your IDE

  1. Clone this repository:

    git clone https://github.com/jansorg/pycharm-webinar-base.git
  2. Install IntelliJ 2018.3.3 (Community or Ultimate).

    Download it from JetBrains. Feel free to use the Toolbox app, if you prefer that.

    In the following steps we assume that you downloaded 2018.3.3. If you didn't, then make sure that you choose the right versions of the Python plugins.

  3. Start the IntelliJ IDE. Make sure that the DevKit plugin is enabled, we'll need it!

    • If it's the first statup, then it'll look like this. Choosing 'Skip Remaining and Set Defaults' is fine.

    • Choose 'Open' if it's the first startup or "File > Open" if you're already using IntelliJ.
  4. Make sure to choose the repository directory pycharm-webinar-base in the file selector. If you don't then the project won't work for plugin development.

  5. Setup your Java 8 SDK. IntelliJ still needs a Java 8 JDK.

    Both OpenJDK or Oracle versions are compatible. Make sure to download a Java 8 SE JDK, not a JRE! Of course, if you already have Java 8 installed, then you dont't need to download it again.

    Oracle's downloads are available at www.oracle.com/technetwork/java.

    • Choose File > Project settings.... Click on New..., then click on JDK.

    • In the file selector choose the installation path of your Java 8 SDK:

    • Now setup your IntelliJ SDK. Click New... on the project page and select IntelliJ Platform Plugin SDK. The default location should be the installation path of your IntelliJ 2018.3.3. Use this path for your new SDK setting.

    • Make sure to select your Java 1.8 SDK in the next screen:

  6. Configure your IntelliJ SDK

    • Choose File > Project settings...

    • Now setup your IntelliJ SDK. Click New... on the project page and select IntelliJ Platform Plugin SDK. The default location should be the installation path of your IntelliJ 2018.3.3. Use this path for your new SDK setting.

    • Make sure to choose your Java 1.8 SDK in the next screen:

  7. Now download the Python plugin to finish the setup of your project's SDK.

    Note: The PyCharm package can't be used as an SDK because it's not coming with the plugin development tooling we need.

    Download the PyCharm plugin which matches your edition of IntelliJ. Choose the download which is compatible with 2018.3.3. The red markers are highlighting the compatible versions.

  8. The downloaded file is a ZIP file. Unzip it on disk. We'll need it in the next step.

  9. Add the PyCharm plugin to the SDK to let IntelliJ know about the Python plugin:

    1. Choose File > Project Settings ... and select the page SDK:

    2. Navigate to the directory of the unzipped Python plugin. Select everything belwo python-ce/libs/ and click Ok:

    3. Close the dialog with Ok.

  10. Almost ready!

  11. Run the plugin to test your environment: Click on the little arrow next to the run configuration Webinar Plugin:

  12. Now the plugin will be compiled, packaged and started within a new instance of IntelliJ. If you see error messages, the there's something wrong with your setup.

General notes

Run the plugin using Gradle

If you just want to execute your plugin in a IntelliJ test environment then execute this command:```bash

gradle runIDE

Of course, you'll need to install Gradle if you've not yet done that.

Directory structure

  • src/main/java: Java sources
  • src/main/resources: Java resource files
  • src/test/java: Java test case sources
  • src/test/resources: Java test case resource files

Continuous integration builds

.travis.yml configures a travis-ci.com build.

Relevant Documentation

About

Setup used for the PyCharm webinar


Languages

Language:Java 100.0%