Files generated during "New Module"


Hi,

If I want to generate a bunch of source files upon the "Finish" of the "New
Module" wizard, what is the recommended approach, to make sure that SVN is
part of the process and so on?

The most obvious is to override JavaModuleBuilder.setupRootModel(), obtain
the source roots and stick my packages and files in there. If that is it,
then how do I obtain the Application instance to wrap it in the
runWriteAction() ??


Cheers
Niclas

2 comments

Niclas Hedhman wrote:

then how do I obtain the Application instance to wrap it in the
runWriteAction() ??


Disregard this bit. Obviously not awake yet ;o)

But I would still like to know if there is some 2-phase commit thing that I
am expected to participate in, regarding the creation of files.


Cheers
Niclas

0

You can get the application at any time with ApplicationManager.getApplication().

0

Please sign in to leave a comment.