Sparkplug loaded in LoginDialog


We need to customize spark for our client to connect to our network. Depending on the client configuration, we will connect differently to our server. I was thinking to add some preferences in the LoginDialog (just liek the one used for sso …), and to add a sparkplug which would handle connection on specific port. I thought to use the sparkplug system, because we use some library developed internally, and we don’t want to provide the source code for this.

My problem, is that the sparkplug api seems to load the plugins only once spark is logged on the server. (because the saprk manager workspace /mainwindow are loaded only once the login is valid), but in my case I want to load my plugin before, just when the user click on the login button.

Again, I could just modify the spark sources to do that, but as wedon’t want to provide the source code for this, for security reason, I do not want this part to be directly within spark source code.

Does someone see some work around here ?

Thank you,


1 Like

this question is nice, can load plugin before we login in spark client?

In the latest Spark source code plugins are loaded before workspace initialization:

Here is a code fragment from

//load plugins before Workspace initialization to avoid any UI delays

//during plugin rendering

final PluginManager pluginManager = PluginManager.getInstance();


This is part of the effort of:

this particular enhancement was addressed by:


1 Like

Salut Melanie,

Can I ask you how you could change the login dialog ? Did you do it with the sparkplug or did you have to modify the original source code ?

Merci beaucoup

A bientot.


We introduced class overwritting mechanism in Spark: SPARK-1403 ticket

Now LoginDialog can be extended in your plugin. You can implement your own layout, you have methods to overwrite for things to happen before login and after login

Look in SPARK-1403 comments and latest Spark source code


1 Like


I have Spark imported in netbean. How can I apply this patch ? I am sorry I am newbie …

Do you have the sample code of a plugin who changes the size of the login dialog for example ?

Thank you very very much.



I right click on the src folder, I did apply dif patch, but It says that the patch has been applied partialy then I can’t build the project

You don’t need to apply any patch, everyting was commited in spark trunk. What you have to do is to get latest Spark source code from trunk

SPARK-1403 ticket shows some explanation on how this can be used and you also have a testPlugin.jar attached. This plugin sample is old and does not work, but it contains java source classes that will give you an idea on how can be done

I will post new example and write some docs this week

Thank you very much. I am sorry, I can’t find the java source classes. Where can I get them ?

The java source classes are inside the jar file. You have to unpack the archive