Facets and modules

Hello!
I am currently writing a custom language plugin for idea and sooner or later i will need a module or something similar.
I heard about facets and i am now a bit confused about modules and their relation to facets.

Will all modules be replaced by facets or only J2EE?
What's more convinient: to implement a module or facet or both?

And in general: what's the functional difference between module and facet?

Thanks!

7 comments
Comment actions Permalink

That's quite easy: a module might have one or more facets. If you
implement your module type - you should forget forever for other IDEA
features to work for you. If you instead implement facet - a user can
add it to his java modules and have all the functionality coexist.

The main question to answer is: "Am I adding some functionality to Java
module?". If yes - go the facet way.


> Will all modules be replaced by facets or only J2EE?

At the moment we have fixed plans for J2EE modules only. However we're
also thinking about J2ME & DevKit.

0
Comment actions Permalink

Thank you much!

So a ruby plugin for instance doesn't have to implement facet because it add nothing to java.
And to be sure: do some js, css, xml or maybe some other non-java languages and functionaly somehow depend on module type?

0
Comment actions Permalink

On 2007-03-30 22:50:03 +0400, Jay <a4blank@yahoo.com> said:

Thank you much!

So a ruby plugin for instance doesn't have to implement facet because
it add nothing to java.
And to be sure: do some js, css, xml or maybe some other non-java
languages and functionaly somehow depend on module type?


As the matter of fact if we expand this idea even further, we can
eliminate java module type and introduce java facet for general purpose
model. In fact, java facet introduces source roots and dependencies on
something other than other modules.

0
Comment actions Permalink

If I get you right, than one could add some "plain" module to his project, then add "language facet" to it (java, ruby, whatever), then some language-specific facets.

Do you need modules then?

0
Comment actions Permalink

On 2007-04-02 16:39:35 +0400, Jay <a4blank@yahoo.com> said:

If I get you right, than one could add some "plain" module to his
project, then add "language facet" to it (java, ruby, whatever), then
some language-specific facets.

Do you need modules then?


Yes. Modules enforce allowed dependencies and... we need something to
apply facets to, right? :)

0
Comment actions Permalink

Well i sense that modules are useful but i just cant make it clear to myself (:

You can apply facets to project itself.

0
Comment actions Permalink

Module is the unit of dependency control. If you don't need any - you
could throw modules away and apply facets directly to project.

0

Please sign in to leave a comment.