Plugin Wizard – Improved plugin publishing procedure

GitHub repo: https://github.com/jMonkeyEngine/sdk-plugin-wizard

Creating plugins can be somewhat confusing, and the project I am outlining below serves to replace that procedure by means of a Project Wizard.

As opposed to the multiple-step instruction guide for plugin development this wizard reduces the steps required by means of automation and simplifies the process further by pre-defining settings instead of setting them yourself.

To create a plugin click “File => New Project => JME => JME Plugin”. Choose a directory, a plugin name, and the base package for the plugin.

Its as simple as that. You will more than likely want to change the default descriptions, but everything else should be setup in accordance to the plugin development wiki page.

If or when you want to create another plugin, just choose the same “suite directory” as you did before. You will know if you chose the correct directory by the color of the suite folder textbox. Yellow indicates that a new plugin suite will be created, and green indicates that it has found a plugin suite and will use that instead of creating a new one.

If you already have a project that you created and want to turn it into a plugin, check the “Wrap an existing project” checkbox and locate the built jar file of your existing project. Your project is now a plugin.

The wizard is currently still under development to ensure that we get it right and make the process as simple as possible, and as such this phase of the process is intended for testing and criticism before being added as a permanent fixture.

HOWTO:
Since this is a development module, you will need to install the “Netbeans Plugin Development” plugin via Tools→Plugins. If you don’t, the SDK wont recognize the newly created projects that the wizard creates. We plan to automate this process at some point. After downloading the project from git it and opening it in the jmonkey SDK you have two options:

  • Run the module, which will open up a new netbeans SDK. You can create a new plugin as described above from this instance of netbeans. You will also need to install the “Netbeans Plugin Development” plugin for this IDE.

  • Right-Click the module and select “Create NBM” and then “Install/Reload in Development IDE” - which will install the wizard/module in the JME SDK.

18 Likes

This is awesome. I guess if you added a way to directly wrap a jar file in the same wizard many people would be completely set with this :slight_smile:

4 Likes

This is really cool!

Sounds great.

Would this affect the procedure for updating an existing plugin?

Good work! I will try this out =) next thing I want is a big shiny button (I like shiny buttons) “Share plugin” that uploads it to right location so it will be available for download in the SDK!

@normen said: This is awesome. I guess if you added a way to directly wrap a jar file in the same wizard many people would be completely set with this :)

Thy will be done.

@sgold said: Sounds great.

Would this affect the procedure for updating an existing plugin?

If you already have a module-suite and module/plugin then you may as well continue to use that instead of start over with this. It effectively does exactly what you had to do to make the module suite and module, it just saves you the bother of having to do all of that. It also currently forces the module suite to be called “jme-plugins” for the sake of simplicity when adding another plugin to the same suite, so unless your moduleSuite is called “jme-plugins” it won’t work with it. I guess this is a case of moving forward, and eventually everyone will hopefully be using this wizard, so it won’t be an issue in the future.

@kwando said: Good work! I will try this out =) next thing I want is a big shiny button (I like shiny buttons) "Share plugin" that uploads it to right location so it will be available for download in the SDK!

Well this project is part of the Plugin Repository idea for JMESoC. Eventually all plugins will be hosted on github, and the user just provides the github repo URL to a submission page for approval. We could add a context menuItem called “Submit to JME for approval” which leads to the submission page… I guess that would make it a little more integrated and straightforward.

2 Likes

One thing that might be worth thinking about for the wizard is what I struggled with when trying my hands at plugins. It wasn’t so much making a plugin to enhance the SDK. I rather had trouble with getting build scripts and meta-data correct for module dependencies. If someone has a good pattern for solving those I think it would be valuable to have that pattern encoded in the wizard.

For example, I wanted to have a JAR-file that a SimpleApplication could include, that provided a library for recording and exposing metrics like FPS, memory use and so on. A also wanted to build a GUI in the SDK for graphing those metrics while the SimpleApplication was running. So you could from the SDK see a graph of FPS while the application was running. The SDK would poll the application using JMX.

This means that when developing for example the SDK GUI I wanted to trigger a build of the GUI-SDK-module, and that should trigger a build of a wrapped-JAR-module that the GUI-module depended on, but that build should in turn trigger the build of the JAR-file from source. And of course the JAR file itself should be available to use as a dependecy in the SimpleApplication so it needed to generate a layer.xml to be visible as a dependency to the SimpleApplication.

I nearly got it all working but there was a lot of ANT-magic and weird plumbing in netbeans build files that never felt stable. So wizard help for inter-module dependencies and build scripts would be really nice.

Added the ability to wrap jar files as @Normen suggested. Original post has been updated to reflect the addition.

2 Likes
@jayfella said: If you already have a module-suite and module/plugin then you may as well continue to use that instead of start over with this. It effectively does exactly what you had to do to make the module suite and module, it just saves you the bother of having to do all of that. It also currently forces the module suite to be called "jme-plugins" for the sake of simplicity when adding another plugin to the same suite, so unless your moduleSuite is called "jme-plugins" it won't work with it. I guess this is a case of moving forward, and eventually everyone will hopefully be using this wizard, so it won't be an issue in the future.

But for plugins created using this wizard, what is the procedure for updating them?

@sgold said: But for plugins created using this wizard, what is the procedure for updating them?

@relucri asked the same quiestion so I’ll tag him. Updating the plugin is the same procedure; committing it as normal to jmonkey. If you wrapped your jar you will need to either manually copy over the changed jar to “./release/modules/ext” or use an ant build script outlined on the plugin development page. This is not the most ideal situation, so I’ll add an option to “keep the plugin updated when you rebuild your project” in the wizard.

@jayfella said: @relucri asked the same quiestion so I'll tag him. Updating the plugin is the same procedure; committing it as normal to jmonkey. If you wrapped your jar you will need to either manually copy over the changed jar to "./release/modules/ext" or use an ant build script outlined on the plugin development page. This is not the most ideal situation, so I'll add an option to "keep the plugin updated when you rebuild your project" in the wizard.

The J2SE libraries are stored in release/libs, the files in modules/ext are dependencies for the plugin itself, not a Library the user can use. If you add a new “J2SE” library via the wizard you get the files that your wizard should create.

@jayfella, I’m either doing something wrong or not doing something right ;-/

To start with, as all I had under the previous version of jME were tutorial projects from the book (loved the book, btw :slight_smile: ), I uninstalled jME, downloaded jME 3.0 stable and installed it.

I installed the netbeans plugin development plugin.

I’ve downloaded the sdk-plugin-wizard, imported it into jME and built it successfully. But I do not have that fourth plugin option you show in your first screenshot.

Wait…

“…and then “Install/Reload in Development IDE””

RTFM, right?

That did the trick.

Was going to just delete this post, but maybe someone else is as near-sighted and needs a little boost :stuck_out_tongue:

@Sheldondync said:
da comrade )) as I'm not sure if there is 1 person responsible for such tasks, let me highlight @normen since you were the last activ dev in this thread. I am quite such this lovely fellow might be a spam bot.
@netsky08 said: I am quite such this lovely fellow might be a spam bot.
Right you are. Taken care of :)

thanks!

ups double post Oo