JetBrains / intellij-platform-plugin-template

Template repository for creating plugins for IntelliJ Platform
Apache License 2.0
3.05k stars 618 forks source link

Can't open a project in IDEA when using "Run Plugin" task #338

Closed fbjorn closed 1 year ago

fbjorn commented 1 year ago

Describe the bug: I'm trying to run an IDE with the plugin, but it crashes when I open a project in the IDE.

Steps to reproduce:

  1. Build a project (repo is attached, but I specifically didn't customize anything)
  2. Run Run Plugin task from IDEA
  3. Click Projects -> Open -> Select any folder -> "Trust Project"
  4. Get the error below. Project is not opened
    Caused by: kotlin.NotImplementedError: An operation is not implemented: Don't forget to remove all non-needed sample code files with their corresponding registration entries in `plugin.xml`.

Expected behavior: Since I'm trying to write a plugin that watches for currently opened files, I need to open some project to debug the plugin. But I can't, and I don't understand why.

Additional context: GH Repo: https://github.com/fbjorn/aw-watcher-jetbrains-ide OS: MacOS Ventura 13.0.1 IDEA: 2022.3.1 CE

lukeribchester commented 1 year ago

The error message comes from the TODO() calls in the sample services and sample listener — delete these and the references to them in plugin.xml. 🙌🏻

fbjorn commented 1 year ago

@lukeribchester thanks for a quick answer! I don't work with Kotlin so I couldn't imagine that calling TODO() would cause a NotImplementedError.

Hope this thread will help someone like me in the future 🙂