mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
* 2023.1 release: update gh-links, re-gen EP lists * code samples: update target version * code samples: fix framework_basics missing dependency on Java plugin * stub_indexes.md: update -master GH link * EP lists: improve "Topic" presentation * internal_ui_inspector.md: fix link * kotlin_demo: fix link * Generate Android Studio releases * publishing_plugin.md: add note about plugin signing * plugin_signing.md: Update information about providing `certificateChainFile` and `privateKeyFile` + minor changes * tools_gradle_intellij_plugin.md: add `verifyPluginSignature` task * plugin_signing.md: add Plugin Signature Verification * plugin_signing.md: fixed anchor * creating_plugin_project.md: update * GH: set final 2023.1 tag * GH code samples: update PV version * code samples: ComparingStringReferencesInspection compatibility with 231.*
Maximum Open Projects Sample 
Reference: Plugin Services in IntelliJ SDK Docs
Quickstart
Maximum Open Projects Sample implements a ProjectManagerListener
with two methods applied to check if the current projects have been opened or closed.
Each method refers to the ProjectCountingService
service registered as an com.intellij.applicationService
extension point.
It provides methods to increase and decrease the global counter of the currently opened projects in the IDE.
After opening each one, a message dialog is presented to the user with the current number.
Extension Points
Name | Implementation | Extension Point Class |
---|---|---|
com.intellij.applicationService |
ProjectCountingService | n/a |
Reference: Plugin Extension Points in IntelliJ SDK Docs
Application Listeners
Name | Implementation | Listener Class |
---|---|---|
listener | ProjectOpenCloseListener | ProjectManagerListener |
Reference: Plugin Listeners in IntelliJ SDK Docs