edvin / tornadofx-idea-plugin

TornadoFX Plugin for IntelliJ IDEA
Apache License 2.0
73 stars 20 forks source link

Create new TornadoFX module #4

Closed luleyleo closed 8 years ago

luleyleo commented 8 years ago

Currently there is no option to create a module based on TornadoFX. So File -> Project Structure -> Modules -> + -> New Module doesn't show the TornadoFX folder

edvin commented 8 years ago

I might be able to add that. What build system are you using? Gradle or Maven?

luleyleo commented 8 years ago

I prefere Gradle but with OSGI there is currently just Maven as option So I use both

edvin commented 8 years ago

So to be clear, you have a multi module OSGi Maven project and you want to add a new module that should be an empty project but with TornadoFX dependency already loaded? Or do you want the module configured in an other way?

The problem now is that since you can't choose the TornadoFX templates, you'd have to create an empty maven based project and then add the TornadoFX dependency manually, is that it?

luleyleo commented 8 years ago

My Problem is that I must create a new Project and with that a new Window if I want to use the template. I just prefer to have one project with multiple modules.

So this

The problem now is that since you can't choose the TornadoFX templates, you'd have to create an empty maven based project and then add the TornadoFX dependency manually, is that it?

is my problem, yes

edvin commented 8 years ago

I understand. I don't think it's possible to supply templates to Maven modules in that way, as you can see no other plugins provide something for the Maven module view either.

I think the best approach would be to let your parent module have TornadoFX as a provided dependency and create new Maven modules in the normal way. They would automatically inherit the TornadoFX dependency, so there is really no setup needed. Isn't that right?

luleyleo commented 8 years ago

I had to set the scope to provided for the tornadofx dependency and import the project as a maven project. But now it works :tada:

Thanks a lot!

edvin commented 8 years ago

Great :) I will try to look for better ways to create a module though :)