Application, Project or module scope?

What should I consider when making the choice between using application, project or module scope for a component?

-- Randy

0
2 comments

Hello Randy,

What should I consider when making the choice between using
application, project or module scope for a component?


First of all, in most cases you shouldn't use components at all - instead,
you should use services and extension points as much as possible.

The scope of a component or a service depends on what it's doing. For example,
the PSI is project-level, so all components or services that do something
with the PSI are typically project-level as well. Other subsystems, like
VFS and documents, are application scope.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Avatar
Permanently deleted user

Dmitry,

Thank you for the reply!

Interesting that the default assumption is to not build a component. Let me be concrete about my plans and see if you can help me along my path of learning.

My plan is to build support within IntelliJ for NetKernel. Minimally, I would like to control an instance (start/stop it) and associate IntelliJ modules with NetKernel modules (NetKernel modules are a unit of deployment in the form of either an exploded directory or a JAR file).

My second step is to add editor support for NetKernel's module.xml file which defines the structure of a NetKernel module.

The third step is to add the ability to package a module in a JAR file and several modules into a NetKernel package file (a JAR of JAR files).

I am new to IntelliJ plugin development and would appreciate any tips or pointers.

Thank you,

Randy

0

Please sign in to leave a comment.