how to make a new module plugin?

Hi,

I have a target in my ant build script that allows me to create new
template portlet projects. e.g. ant new-project and it prompts you for a
module name and title. It then preprocess and places files in the
directory contained by the chosen module name.
I would like to develop a plugin that displays when selecting
New Module and it would offer "Portlet Module" then it would run my
script (or provide a dialog to get the two needed parameters) and then
create a new module just as I have done it. Is there any way to do this
and what docs should I follow if so?
It seems like I need to use the ModuleType, ModuleTypeManager,
ModuleWizardStepsProvider classes but I have no idea how-- if anyone has done anything similar I would sure like the source code.


Thanks, Jason

5 comments
Comment actions Permalink

Jason,

Take a look at the sources of the DevKit plugin. It's a good example of
introducing a new plugin module type.

Martin

Jason Novotny wrote:

Hi,

I have a target in my ant build script that allows me to create new
template portlet projects. e.g. ant new-project and it prompts you for a
module name and title. It then preprocess and places files in the
directory contained by the chosen module name.
I would like to develop a plugin that displays when selecting
New Module and it would offer "Portlet Module" then it would run my
script (or provide a dialog to get the two needed parameters) and then
create a new module just as I have done it. Is there any way to do this
and what docs should I follow if so?
It seems like I need to use the ModuleType, ModuleTypeManager,
ModuleWizardStepsProvider classes but I have no idea how-- if anyone has done anything similar I would sure like the source code.


Thanks, Jason


--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com

0
Comment actions Permalink

Hi Martin,

Thanks a lot-- I found the devkit sirectory in my Plugin Development Package, but there is absolutely no documentation :( For one thing what must I do to compile the code and try it out? It's really quite sad that a lot of work has put into creating a bunch of samples but without any docs I can't see this being too useful....

Cheers, Jason

0
Comment actions Permalink

Hello Jason,

JN> Thanks a lot-- I found the devkit sirectory in my Plugin Development
JN> Package, but there is absolutely no documentation :( For one thing
JN> what must I do to compile the code and try it out? It's really quite
JN> sad that a lot of work has put into creating a bunch of samples but
JN> without any docs I can't see this being too useful....

These are not "a bunch of samples", these are real plugins included in the
distribution of IntelliJ IDEA.

The JavaDoc coverage of OpenAPI is still far from complete, but we're working
on expanding it.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

That's great-- I look forward to a future announcement! I have two basic points:

1) Documentation is more than javadocs, that's like saying look at the source code ;)

2) Using "real" plugins is a bit too much for a beginning plugin writer to bite off-- my recommendation would be to start with the hello world of plugins (which funny enough seems to be what Eclipse does) and then step it up to include something more representative of the real world.

But you guys have done an incredible job with IntelliJ-- I absolutely love it! From my readings on other forums, the plugin stuff is possibly the only area where IntelliJ falls short. In fact I'm ashamed to admit that while I and other core members use IntelliJ, my pointy-haired boss wants us to write Eclipse plugins :(

Jason

0
Comment actions Permalink

Hello Jason,

JN> 2) Using "real" plugins is a bit too much for a beginning plugin
JN> writer to bite off-- my recommendation would be to start with the
JN> hello world of plugins (which funny enough seems to be what Eclipse
JN> does) and then step it up to include something more representative
JN> of the real world.

We do have several "hello world" level examples, for example, this one:
http://www.jetbrains.com/idea/training/demos/google_search.html

But the "stepping up" part is quite hard because there are so many directions
in which people may want to step up - we aren't able to cover them all with
the limited resources that we have. A good thing is that many of the plugins
developed by IDEA users are open-source, and can also be used as examples
in addition to plugins that we supply with IDEA.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.