*/
protected void postInstallApplication()
{
super.postInstallApplication();
PluginMgr pm = PluginMgr.getInstance();
// Initialize the client environment
GUIClientModule.getInstance().initialize();
// This will load the model data.
ModelConnector.getInstance().initialize(GUIClientModule.getInstance());
// Set the custom descriptor directory and custom descriptor set name specified by the user
initCustomDescriptors();
// Add global plugins
// This will automatically create the display object plugin
DisplayObjectPlugin.getInstance();
// Load all skin data and initialize the icon model accordingly
SkinMgr.getInstance().load();
// Add these plugins first, they will create menu items for the global menu
pm.createInstance(ErrorDialogPlugin.class, this);
// Try to connect to the server
// By default, use an anonymous login
ServerConnection connection = ServerConnection.getInstance();
connection.setLoginInfo(new ClientLoginInfo("Anonymous", null));
try
{
connection.connect(true);
}
catch (OpenBPException e)
{
// Show dialog box if the user has not chose to skip it before
if (! SettingUtil.getBooleanSetting("openbp.cockpit.connectionwarning.hide", false))
{
// Hide splash screen.
if (splashScreen != null)
{
splashScreen.setVisible(false);
}
int response = JMsgBox.show(null, getPluginResourceCollection().getRequiredString(
"connectionerror.title"), ResourceCollectionUtil.formatMsg(getPluginResourceCollection(),
"connectionerror.description", new Object[]
{
connection.getConnectionInfo().getRmiServerHost(),
new Integer(connection.getConnectionInfo().getRmiServerPort()), e.getMessage()
}), JMsgBox.ICON_INFO | JMsgBox.TYPE_OK | JMsgBox.DEFAULT_OK | JMsgBox.TYPE_DO_NOT_SHOW_AGAIN);
if ((response & JMsgBox.TYPE_DO_NOT_SHOW_AGAIN) != 0)
{
// Skip this dialog the next time
SettingUtil.setBooleanSetting("openbp.cockpit.connectionwarning.hide", true);
SettingUtil.saveSettings(null);
}
}
}
// After adding the first page, we have a component we need for the glass pane access
// for the wait cursor, so turn it on now
ApplicationUtil.waitCursorOn();
try
{
// Add the standard pages
addPage((JaspiraPage) pm.createInstance(ModelerPage.class, this));
pm.createInstance(GeneratorPlugin.class, this);
// pm.createInstance (DataTypeSearchPlugin.class, this);
// pm.createInstance(EclipseEditorPlugin.class, this);
pm.createInstance(ModelerOptionPlugin.class, this);
pm.createInstance(SkinPlugin.class, this);
pm.createInstance(ItemOpenDispatcherPlugin.class, this);
pm.createInstance(CommandLinePlugin.class, this);
pm.createInstance(ExternalAssociationPlugin.class, this);
pm.createInstance(AssociationPlugin.class, this);
// Load global custom plugins
PluginMgr.getInstance().loadCustomPlugins("openbp.cockpit.plugins.global");
// Load custom plugins from the 'plugin' directory.