Reference: Plugin Services in IntelliJ SDK Docs
Maximum Open Projects Sample implements a StartupActivity
extension point to run on project open as well as a
ProjectManagerListener
for tracking projects being closed.
Both use ProjectCountingService
application-level light service.
It provides methods to increase and decrease the counter of currently opened projects in the IDE.
When opening more projects than the maximum allowed (3), a message dialog is shown.
Name | Implementation | Extension Point Class |
---|---|---|
com.intellij.postStartupActivity |
ProjectOpenStartupActivity | StartupActivity |
Name | Implementation | Listener Class |
---|---|---|
listener | ProjectOpenCloseListener | ProjectManagerListener |
Reference: Plugin Listeners in IntelliJ SDK Docs